| Index: content/browser/service_worker/service_worker_browsertest.cc
|
| diff --git a/content/browser/service_worker/service_worker_browsertest.cc b/content/browser/service_worker/service_worker_browsertest.cc
|
| index 81f329693da82b7d60e2d2fc8ddb575f8e240f87..1b64818a7cf91ff2eab0069bb8249f198780ebf1 100644
|
| --- a/content/browser/service_worker/service_worker_browsertest.cc
|
| +++ b/content/browser/service_worker/service_worker_browsertest.cc
|
| @@ -194,31 +194,6 @@
|
| }
|
| }
|
|
|
| - void InstallTestHelper(const std::string& worker_url) {
|
| - RunOnIOThread(base::Bind(&self::SetUpRegistrationOnIOThread, this,
|
| - worker_url));
|
| -
|
| - // Dispatch install on a worker.
|
| - ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED;
|
| - base::RunLoop install_run_loop;
|
| - BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
|
| - base::Bind(&self::InstallOnIOThread, this,
|
| - install_run_loop.QuitClosure(),
|
| - &status));
|
| - install_run_loop.Run();
|
| - ASSERT_EQ(SERVICE_WORKER_OK, status);
|
| -
|
| - // Stop the worker.
|
| - status = SERVICE_WORKER_ERROR_FAILED;
|
| - base::RunLoop stop_run_loop;
|
| - BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
|
| - base::Bind(&self::StopOnIOThread, this,
|
| - stop_run_loop.QuitClosure(),
|
| - &status));
|
| - stop_run_loop.Run();
|
| - ASSERT_EQ(SERVICE_WORKER_OK, status);
|
| - }
|
| -
|
| void SetUpRegistrationOnIOThread(const std::string& worker_url) {
|
| const int64 version_id = 1L;
|
| registration_ = new ServiceWorkerRegistration(
|
| @@ -318,19 +293,28 @@
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest, Install) {
|
| - InstallTestHelper("/service_worker/worker.js");
|
| -}
|
| -
|
| -IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest,
|
| - InstallWithWaitUntil_Fulfilled) {
|
| - InstallTestHelper("/service_worker/worker_install_fulfilled.js");
|
| -}
|
| -
|
| -IN_PROC_BROWSER_TEST_F(ServiceWorkerVersionBrowserTest,
|
| - InstallWithWaitUntil_Rejected) {
|
| - // TODO(kinuko): This should also report back an error, but we
|
| - // don't have plumbing for it yet.
|
| - InstallTestHelper("/service_worker/worker_install_rejected.js");
|
| + RunOnIOThread(base::Bind(&self::SetUpRegistrationOnIOThread, this,
|
| + "/service_worker/worker.js"));
|
| +
|
| + // Dispatch install on a worker.
|
| + ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED;
|
| + base::RunLoop install_run_loop;
|
| + BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
|
| + base::Bind(&self::InstallOnIOThread, this,
|
| + install_run_loop.QuitClosure(),
|
| + &status));
|
| + install_run_loop.Run();
|
| + ASSERT_EQ(SERVICE_WORKER_OK, status);
|
| +
|
| + // Stop the worker.
|
| + status = SERVICE_WORKER_ERROR_FAILED;
|
| + base::RunLoop stop_run_loop;
|
| + BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
|
| + base::Bind(&self::StopOnIOThread, this,
|
| + stop_run_loop.QuitClosure(),
|
| + &status));
|
| + stop_run_loop.Run();
|
| + ASSERT_EQ(SERVICE_WORKER_OK, status);
|
| }
|
|
|
| } // namespace content
|
|
|