summaryrefslogtreecommitdiffstats
path: root/chrome/worker
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/worker
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/worker')
-rw-r--r--chrome/worker/worker_uitest.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/chrome/worker/worker_uitest.cc b/chrome/worker/worker_uitest.cc
index f054be4..b4c64da 100644
--- a/chrome/worker/worker_uitest.cc
+++ b/chrome/worker/worker_uitest.cc
@@ -189,7 +189,8 @@ TEST_F(WorkerTest, IncognitoSharedWorkers) {
RunIncognitoTest(FilePath(FILE_PATH_LITERAL("incognito_worker.html")));
}
-const wchar_t kDocRoot[] = L"chrome/test/data/workers";
+const FilePath::CharType kDocRoot[] =
+ FILE_PATH_LITERAL("chrome/test/data/workers");
#if defined(OS_WIN)
// http://crbug.com/33344 - NavigateAndWaitForAuth times out on the Windows
@@ -198,14 +199,13 @@ const wchar_t kDocRoot[] = L"chrome/test/data/workers";
#endif
// Make sure that auth dialog is displayed from worker context.
TEST_F(WorkerTest, WorkerHttpAuth) {
- 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<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab.get());
- GURL url = server->TestServerPage("files/worker_auth.html");
+ GURL url = test_server.GetURL("files/worker_auth.html");
EXPECT_TRUE(NavigateAndWaitForAuth(tab, url));
}
@@ -216,14 +216,13 @@ TEST_F(WorkerTest, WorkerHttpAuth) {
#endif
// Make sure that auth dialog is displayed from shared worker context.
TEST_F(WorkerTest, SharedWorkerHttpAuth) {
- 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<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab.get());
- GURL url = server->TestServerPage("files/shared_worker_auth.html");
+ GURL url = test_server.GetURL("files/shared_worker_auth.html");
EXPECT_TRUE(NavigateAndWaitForAuth(tab, url));
// TODO(atwilson): Add support to automation framework to test for auth
// dialogs displayed by non-navigating tabs.