diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-17 20:07:11 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-17 20:07:11 +0000 |
commit | 95409e1020037b0bbfbce17f861d3de090d10186 (patch) | |
tree | 90a893af1247b1d4a3767c5ab14aae797f467946 /chrome/browser/views | |
parent | 701e869b30deffda579c5c413cf1d73defee34fa (diff) | |
download | chromium_src-95409e1020037b0bbfbce17f861d3de090d10186.zip chromium_src-95409e1020037b0bbfbce17f861d3de090d10186.tar.gz chromium_src-95409e1020037b0bbfbce17f861d3de090d10186.tar.bz2 |
Test server cleanup patch of death:
- reduce the number of different classes
- clean up the internal code
- modify the interface to expose less internal details
(this will allow more flexibility with port numbers)
TEST=many
BUG=49680
Review URL: http://codereview.chromium.org/3080029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56405 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/find_bar_host_interactive_uitest.cc | 18 | ||||
-rw-r--r-- | chrome/browser/views/find_bar_host_uitest.cc | 8 |
2 files changed, 10 insertions, 16 deletions
diff --git a/chrome/browser/views/find_bar_host_interactive_uitest.cc b/chrome/browser/views/find_bar_host_interactive_uitest.cc index 991338c..f866f09 100644 --- a/chrome/browser/views/find_bar_host_interactive_uitest.cc +++ b/chrome/browser/views/find_bar_host_interactive_uitest.cc @@ -24,7 +24,6 @@ namespace { // The delay waited after sending an OS simulated event. static const int kActionDelayMs = 500; -static const wchar_t kDocRoot[] = L"chrome/test/data"; static const char kSimplePage[] = "files/find_in_page/simple.html"; class FindInPageTest : public InProcessBrowserTest { @@ -89,12 +88,10 @@ class FindInPageTest : public InProcessBrowserTest { } // namespace IN_PROC_BROWSER_TEST_F(FindInPageTest, CrashEscHandlers) { - scoped_refptr<net::HTTPTestServer> server( - net::HTTPTestServer::CreateServer(kDocRoot)); - ASSERT_TRUE(NULL != server.get()); + ASSERT_TRUE(test_server()->Start()); // First we navigate to our test page (tab A). - GURL url = server->TestServerPage(kSimplePage); + GURL url = test_server()->GetURL(kSimplePage); ui_test_utils::NavigateToURL(browser(), url); browser()->Find(); @@ -130,11 +127,9 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, CrashEscHandlers) { } IN_PROC_BROWSER_TEST_F(FindInPageTest, FocusRestore) { - scoped_refptr<net::HTTPTestServer> server( - net::HTTPTestServer::CreateServer(kDocRoot)); - ASSERT_TRUE(NULL != server.get()); + ASSERT_TRUE(test_server()->Start()); - GURL url = server->TestServerPage("title1.html"); + GURL url = test_server()->GetURL("title1.html"); ui_test_utils::NavigateToURL(browser(), url); // Focus the location bar, open and close the find-in-page, focus should @@ -180,11 +175,10 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, PrepopulateRespectBlank) { return; #endif - net::HTTPTestServer* server = StartHTTPServer(); - ASSERT_TRUE(server); + ASSERT_TRUE(test_server()->Start()); // First we navigate to any page. - GURL url = server->TestServerPage(kSimplePage); + GURL url = test_server()->GetURL(kSimplePage); ui_test_utils::NavigateToURL(browser(), url); gfx::NativeWindow window = browser()->window()->GetNativeHandle(); diff --git a/chrome/browser/views/find_bar_host_uitest.cc b/chrome/browser/views/find_bar_host_uitest.cc index a8a88ba..df4ea0e 100644 --- a/chrome/browser/views/find_bar_host_uitest.cc +++ b/chrome/browser/views/find_bar_host_uitest.cc @@ -25,11 +25,11 @@ const std::string kSimplePage = "404_is_enough_for_us.html"; // The find window should not change its location just because we open and close // a new tab. TEST_F(FindInPageControllerTest, FindMovesOnTabClose_Issue1343052) { - scoped_refptr<net::HTTPTestServer> server = - net::HTTPTestServer::CreateServer(L"chrome/test/data"); - ASSERT_TRUE(NULL != server.get()); + net::TestServer test_server(net::TestServer::TYPE_HTTP, + FilePath(FILE_PATH_LITERAL("chrome/test/data"))); + ASSERT_TRUE(test_server.Start()); - GURL url = server->TestServerPage(kSimplePage); + GURL url = test_server.GetURL(kSimplePage); scoped_refptr<TabProxy> tabA(GetActiveTab()); ASSERT_TRUE(tabA.get()); ASSERT_TRUE(tabA->NavigateToURL(url)); |