diff options
Diffstat (limited to 'chrome/browser/repost_form_warning_uitest.cc')
-rw-r--r-- | chrome/browser/repost_form_warning_uitest.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/repost_form_warning_uitest.cc b/chrome/browser/repost_form_warning_uitest.cc index 8f779c7..c6e9514 100644 --- a/chrome/browser/repost_form_warning_uitest.cc +++ b/chrome/browser/repost_form_warning_uitest.cc @@ -15,7 +15,7 @@ namespace { -const wchar_t kDocRoot[] = L"chrome/test/data"; +const FilePath::CharType kDocRoot[] = FILE_PATH_LITERAL("chrome/test/data"); } // namespace @@ -29,9 +29,9 @@ typedef UITest RepostFormWarningTest; #endif TEST_F(RepostFormWarningTest, MAYBE_TestDoubleReload) { - scoped_refptr<net::HTTPTestServer> server( - net::HTTPTestServer::CreateServer(kDocRoot)); - ASSERT_TRUE(NULL != server.get()); + net::TestServer test_server(net::TestServer::TYPE_HTTP, FilePath(kDocRoot)); + ASSERT_TRUE(test_server.Start()); + scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); ASSERT_TRUE(browser.get()); @@ -39,7 +39,7 @@ TEST_F(RepostFormWarningTest, MAYBE_TestDoubleReload) { ASSERT_TRUE(tab.get()); // Load a form. - ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("files/form.html"))); + ASSERT_TRUE(tab->NavigateToURL(test_server.GetURL("files/form.html"))); // Submit it. ASSERT_TRUE(tab->NavigateToURL(GURL( "javascript:document.getElementById('form').submit()"))); @@ -49,7 +49,7 @@ TEST_F(RepostFormWarningTest, MAYBE_TestDoubleReload) { tab->ReloadAsync(); // Navigate away from the page (this is when the test usually crashes). - ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("bar"))); + ASSERT_TRUE(tab->NavigateToURL(test_server.GetURL("bar"))); } #if defined(OS_WIN) @@ -60,9 +60,9 @@ TEST_F(RepostFormWarningTest, MAYBE_TestDoubleReload) { #endif TEST_F(RepostFormWarningTest, MAYBE_TestLoginAfterRepost) { - scoped_refptr<net::HTTPTestServer> server( - net::HTTPTestServer::CreateServer(kDocRoot)); - ASSERT_TRUE(NULL != server.get()); + net::TestServer test_server(net::TestServer::TYPE_HTTP, FilePath(kDocRoot)); + ASSERT_TRUE(test_server.Start()); + scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); ASSERT_TRUE(browser.get()); @@ -70,7 +70,7 @@ TEST_F(RepostFormWarningTest, MAYBE_TestLoginAfterRepost) { ASSERT_TRUE(tab.get()); // Load a form. - ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("files/form.html"))); + ASSERT_TRUE(tab->NavigateToURL(test_server.GetURL("files/form.html"))); // Submit it. ASSERT_TRUE(tab->NavigateToURL(GURL( "javascript:document.getElementById('form').submit()"))); @@ -80,11 +80,11 @@ TEST_F(RepostFormWarningTest, MAYBE_TestLoginAfterRepost) { // Navigate to a page that requires authentication, bringing up another // tab-modal sheet. - ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("auth-basic"))); + ASSERT_TRUE(tab->NavigateToURL(test_server.GetURL("auth-basic"))); // Try to reload it again. tab->ReloadAsync(); // Navigate away from the page. - ASSERT_TRUE(tab->NavigateToURL(server->TestServerPage("bar"))); + ASSERT_TRUE(tab->NavigateToURL(test_server.GetURL("bar"))); } |