summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_restore_uitest.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 20:07:11 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 20:07:11 +0000
commit95409e1020037b0bbfbce17f861d3de090d10186 (patch)
tree90a893af1247b1d4a3767c5ab14aae797f467946 /chrome/browser/tab_restore_uitest.cc
parent701e869b30deffda579c5c413cf1d73defee34fa (diff)
downloadchromium_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/tab_restore_uitest.cc')
-rw-r--r--chrome/browser/tab_restore_uitest.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/chrome/browser/tab_restore_uitest.cc b/chrome/browser/tab_restore_uitest.cc
index 7c2c9da..fcd73fb 100644
--- a/chrome/browser/tab_restore_uitest.cc
+++ b/chrome/browser/tab_restore_uitest.cc
@@ -455,12 +455,12 @@ TEST_F(TabRestoreUITest, FLAKY_RestoreIntoSameWindow) {
// Tests that a duplicate history entry is not created when we restore a page
// to an existing SiteInstance. (Bug 1230446)
TEST_F(TabRestoreUITest, RestoreWithExistingSiteInstance) {
- const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<net::HTTPTestServer> server(
- net::HTTPTestServer::CreateServer(kDocRoot));
- ASSERT_TRUE(NULL != server.get());
- GURL http_url1(server->TestServerPage("files/title1.html"));
- GURL http_url2(server->TestServerPage("files/title2.html"));
+ net::TestServer test_server(net::TestServer::TYPE_HTTP,
+ FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ ASSERT_TRUE(test_server.Start());
+
+ GURL http_url1(test_server.GetURL("files/title1.html"));
+ GURL http_url2(test_server.GetURL("files/title2.html"));
scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser_proxy.get());
@@ -502,12 +502,12 @@ TEST_F(TabRestoreUITest, RestoreWithExistingSiteInstance) {
// are given appropriate max page IDs, even if the renderer for the entry
// already exists. (Bug 1204135)
TEST_F(TabRestoreUITest, RestoreCrossSiteWithExistingSiteInstance) {
- const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<net::HTTPTestServer> server(
- net::HTTPTestServer::CreateServer(kDocRoot));
- ASSERT_TRUE(NULL != server.get());
- GURL http_url1(server->TestServerPage("files/title1.html"));
- GURL http_url2(server->TestServerPage("files/title2.html"));
+ net::TestServer test_server(net::TestServer::TYPE_HTTP,
+ FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ ASSERT_TRUE(test_server.Start());
+
+ GURL http_url1(test_server.GetURL("files/title1.html"));
+ GURL http_url2(test_server.GetURL("files/title2.html"));
scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser_proxy.get());
@@ -644,11 +644,11 @@ TEST_F(TabRestoreUITest, RestoreTabWithSpecialURL) {
// Restore tab with special URL in its navigation history, go back to that
// entry and see that it loads properly. See http://crbug.com/31905
TEST_F(TabRestoreUITest, RestoreTabWithSpecialURLOnBack) {
- const wchar_t kDocRoot[] = L"chrome/test/data";
- scoped_refptr<net::HTTPTestServer> server(
- net::HTTPTestServer::CreateServer(kDocRoot));
- ASSERT_TRUE(server.get());
- const GURL http_url(server->TestServerPage("files/title1.html"));
+ net::TestServer test_server(net::TestServer::TYPE_HTTP,
+ FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ ASSERT_TRUE(test_server.Start());
+
+ const GURL http_url(test_server.GetURL("files/title1.html"));
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get());