summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_uitest.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-07 10:17:12 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-07 10:17:12 +0000
commit72cbd32707a2ede460bcc1b3cb199e653282a8ed (patch)
treed212d36fbd064fd4b8c5783a9002f235c98d7a2d /chrome/browser/browser_uitest.cc
parent2fe25aac3d317086338a761e3b040cbcffc3a873 (diff)
downloadchromium_src-72cbd32707a2ede460bcc1b3cb199e653282a8ed.zip
chromium_src-72cbd32707a2ede460bcc1b3cb199e653282a8ed.tar.gz
chromium_src-72cbd32707a2ede460bcc1b3cb199e653282a8ed.tar.bz2
Switching things to FilePath:
Remove following deprecated wstring-using functions: net/net_util: FilePathToFileURL net/net_util: FileURLToFilePath Switch net/base/upload_data to FilePath. Switch upload-related parts of net/url_request/url_request to FilePath. Made necessary adjustments in rest of code (a lot). Review URL: http://codereview.chromium.org/63011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_uitest.cc')
-rw-r--r--chrome/browser/browser_uitest.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc
index a30016a..3a05636 100644
--- a/chrome/browser/browser_uitest.cc
+++ b/chrome/browser/browser_uitest.cc
@@ -61,8 +61,8 @@ class VisibleBrowserTest : public UITest {
// Launch the app on a page with no title, check that the app title was set
// correctly.
TEST_F(BrowserTest, NoTitle) {
- std::wstring test_file = test_data_directory_;
- file_util::AppendToPath(&test_file, L"title1.html");
+ FilePath test_file(FilePath::FromWStringHack(test_data_directory_));
+ test_file = test_file.AppendASCII("title1.html");
NavigateToURL(net::FilePathToFileURL(test_file));
Sleep(sleep_timeout_ms()); // The browser lazily updates the title.
@@ -74,8 +74,8 @@ TEST_F(BrowserTest, NoTitle) {
// Launch the app, navigate to a page with a title, check that the app title
// was set correctly.
TEST_F(BrowserTest, Title) {
- std::wstring test_file = test_data_directory_;
- file_util::AppendToPath(&test_file, L"title2.html");
+ FilePath test_file(FilePath::FromWStringHack(test_data_directory_));
+ test_file = test_file.AppendASCII("title2.html");
NavigateToURL(net::FilePathToFileURL(test_file));
Sleep(sleep_timeout_ms()); // The browser lazily updates the title.
@@ -90,8 +90,8 @@ TEST_F(BrowserTest, Title) {
// had a hard limit of 31 processes and this test is mainly directed at
// verifying that we don't crash when we pass this limit.
TEST_F(BrowserTest, ThirtyFourTabs) {
- std::wstring test_file = test_data_directory_;
- file_util::AppendToPath(&test_file, L"title2.html");
+ FilePath test_file(FilePath::FromWStringHack(test_data_directory_));
+ test_file = test_file.AppendASCII("title2.html");
GURL url(net::FilePathToFileURL(test_file));
scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
// There is one initial tab.
@@ -116,8 +116,8 @@ TEST_F(BrowserTest, ThirtyFourTabs) {
// The browser should quit quickly if it receives a WM_ENDSESSION message.
TEST_F(BrowserTest, WindowsSessionEnd) {
- std::wstring test_file = test_data_directory_;
- file_util::AppendToPath(&test_file, L"title1.html");
+ FilePath test_file(FilePath::FromWStringHack(test_data_directory_));
+ test_file = test_file.AppendASCII("title1.html");
NavigateToURL(net::FilePathToFileURL(test_file));
Sleep(action_timeout_ms());
@@ -186,12 +186,12 @@ TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- std::wstring test_file(test_data_directory_);
+ FilePath test_file(FilePath::FromWStringHack(test_data_directory_));
scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
scoped_ptr<TabProxy> tab(window->GetActiveTab());
// Start with a file:// url
- file_util::AppendToPath(&test_file, L"title2.html");
+ test_file = test_file.AppendASCII("title2.html");
tab->NavigateToURL(net::FilePathToFileURL(test_file));
int orig_tab_count = -1;
ASSERT_TRUE(window->GetTabCount(&orig_tab_count));
@@ -226,12 +226,12 @@ TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
- std::wstring test_file(test_data_directory_);
+ FilePath test_file(FilePath::FromWStringHack(test_data_directory_));
scoped_ptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
scoped_ptr<TabProxy> tab(window->GetActiveTab());
// Start with a file:// url
- file_util::AppendToPath(&test_file, L"title2.html");
+ test_file = test_file.AppendASCII("title2.html");
tab->NavigateToURL(net::FilePathToFileURL(test_file));
int orig_tab_count = -1;
ASSERT_TRUE(window->GetTabCount(&orig_tab_count));
@@ -263,8 +263,8 @@ TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
}
TEST_F(VisibleBrowserTest, WindowOpenClose) {
- std::wstring test_file(test_data_directory_);
- file_util::AppendToPath(&test_file, L"window.close.html");
+ FilePath test_file(FilePath::FromWStringHack(test_data_directory_));
+ test_file = test_file.AppendASCII("window.close.html");
NavigateToURL(net::FilePathToFileURL(test_file));