From 724214aea569fd0fe6be1ecbacf9e7d8c5e87555 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Thu, 29 Dec 2011 23:58:00 +0000 Subject: Create an API around WorkerService that chrome consumes. Rename the existing WorkerService to WorkerServiceImpl and put it in the content namespace while at it. Also move WorkerServiceObserver to the public directory and into the content namespace. BUG=98716 Review URL: http://codereview.chromium.org/9052007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116007 0039d316-1c4b-4281-b951-d872f2087c98 --- content/worker/test/worker_uitest.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'content/worker') diff --git a/content/worker/test/worker_uitest.cc b/content/worker/test/worker_uitest.cc index 698062c..ed22c52 100644 --- a/content/worker/test/worker_uitest.cc +++ b/content/worker/test/worker_uitest.cc @@ -13,10 +13,12 @@ #include "chrome/test/base/layout_test_http_server.h" #include "chrome/test/base/ui_test_utils.h" #include "chrome/test/ui/ui_layout_test.h" -#include "content/browser/worker_host/worker_service.h" +#include "content/browser/worker_host/worker_service_impl.h" #include "content/public/common/url_constants.h" #include "net/test/test_server.h" +using content::WorkerServiceImpl; + namespace { const char kTestCompleteCookie[] = "status"; @@ -586,7 +588,7 @@ TEST_F(WorkerTest, FLAKY_MessagePorts) { #define MAYBE_LimitPerPage FLAKY_LimitPerPage #endif TEST_F(WorkerTest, MAYBE_LimitPerPage) { - int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; + int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate; GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), FilePath(kManyWorkersFile)); url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab + 1)); @@ -601,8 +603,8 @@ TEST_F(WorkerTest, MAYBE_LimitPerPage) { // Possibly causing ui_tests to hang on Mac: http://crbug.com/88958 // Times out consistently on all platforms. TEST_F(WorkerTest, DISABLED_LimitTotal) { - int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; - int total_workers = WorkerService::kMaxWorkersWhenSeparate; + int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate; + int total_workers = WorkerServiceImpl::kMaxWorkersWhenSeparate; int tab_count = (total_workers / max_workers_per_tab) + 1; GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), @@ -647,7 +649,7 @@ TEST_F(WorkerTest, FLAKY_WorkerClose) { TEST_F(WorkerTest, FLAKY_QueuedSharedWorkerShutdown) { // Tests to make sure that queued shared workers are started up when // shared workers shut down. - int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; + int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate; GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), FilePath(kQuerySharedWorkerShutdownFile)); url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab)); @@ -665,7 +667,7 @@ TEST_F(WorkerTest, FLAKY_QueuedSharedWorkerShutdown) { TEST_F(WorkerTest, FLAKY_MultipleTabsQueuedSharedWorker) { // Tests to make sure that only one instance of queued shared workers are // started up even when those instances are on multiple tabs. - int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; + int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate; GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), FilePath(kManySharedWorkersFile)); url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab+1)); @@ -699,7 +701,7 @@ TEST_F(WorkerTest, FLAKY_MultipleTabsQueuedSharedWorker) { TEST_F(WorkerTest, FLAKY_QueuedSharedWorkerStartedFromOtherTab) { // Tests to make sure that queued shared workers are started up when // an instance is launched from another tab. - int max_workers_per_tab = WorkerService::kMaxWorkersPerTabWhenSeparate; + int max_workers_per_tab = WorkerServiceImpl::kMaxWorkersPerTabWhenSeparate; GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), FilePath(kManySharedWorkersFile)); url = GURL(url.spec() + StringPrintf("?count=%d", max_workers_per_tab+1)); -- cgit v1.1