| Index: content/browser/service_worker/service_worker_job_unittest.cc
|
| diff --git a/content/browser/service_worker/service_worker_job_unittest.cc b/content/browser/service_worker/service_worker_job_unittest.cc
|
| index dd2c165450ba992171ef5f597408cdb37e27fc35..942df0fc071eee050c029bd4e6210fcff496ea5d 100644
|
| --- a/content/browser/service_worker/service_worker_job_unittest.cc
|
| +++ b/content/browser/service_worker/service_worker_job_unittest.cc
|
| @@ -132,7 +132,7 @@ TEST_F(ServiceWorkerJobTest, SameDocumentSameRegistration) {
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/"),
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, &original_registration));
|
| EXPECT_FALSE(called);
|
| base::RunLoop().RunUntilIdle();
|
| @@ -159,7 +159,7 @@ TEST_F(ServiceWorkerJobTest, SameMatchSameRegistration) {
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/"),
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, &original_registration));
|
| EXPECT_FALSE(called);
|
| base::RunLoop().RunUntilIdle();
|
| @@ -190,7 +190,7 @@ TEST_F(ServiceWorkerJobTest, DifferentMatchDifferentRegistration) {
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/one/"),
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called1, &original_registration1));
|
|
|
| bool called2;
|
| @@ -198,7 +198,7 @@ TEST_F(ServiceWorkerJobTest, DifferentMatchDifferentRegistration) {
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/two/"),
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called2, &original_registration2));
|
|
|
| EXPECT_FALSE(called1);
|
| @@ -229,7 +229,7 @@ TEST_F(ServiceWorkerJobTest, Register) {
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/"),
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, ®istration));
|
|
|
| ASSERT_FALSE(called);
|
| @@ -248,7 +248,7 @@ TEST_F(ServiceWorkerJobTest, Unregister) {
|
| job_coordinator()->Register(
|
| pattern,
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, ®istration));
|
|
|
| ASSERT_FALSE(called);
|
| @@ -298,7 +298,7 @@ TEST_F(ServiceWorkerJobTest, RegisterNewScript) {
|
| job_coordinator()->Register(
|
| pattern,
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, &old_registration));
|
|
|
| ASSERT_FALSE(called);
|
| @@ -322,7 +322,7 @@ TEST_F(ServiceWorkerJobTest, RegisterNewScript) {
|
| job_coordinator()->Register(
|
| pattern,
|
| GURL("http://www.example.com/service_worker_new.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, &new_registration));
|
|
|
| ASSERT_FALSE(called);
|
| @@ -355,7 +355,7 @@ TEST_F(ServiceWorkerJobTest, RegisterDuplicateScript) {
|
| job_coordinator()->Register(
|
| pattern,
|
| script_url,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, &old_registration));
|
|
|
| ASSERT_FALSE(called);
|
| @@ -377,7 +377,7 @@ TEST_F(ServiceWorkerJobTest, RegisterDuplicateScript) {
|
| job_coordinator()->Register(
|
| pattern,
|
| script_url,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, &new_registration));
|
|
|
| ASSERT_FALSE(called);
|
| @@ -424,7 +424,7 @@ TEST_F(ServiceWorkerJobTest, Register_FailToStartWorker) {
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/"),
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(
|
| SERVICE_WORKER_ERROR_START_WORKER_FAILED, &called, ®istration));
|
|
|
| @@ -446,7 +446,7 @@ TEST_F(ServiceWorkerJobTest, ParallelRegUnreg) {
|
| job_coordinator()->Register(
|
| pattern,
|
| script_url,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, ®istration_called, ®istration));
|
|
|
| bool unregistration_called = false;
|
| @@ -483,7 +483,7 @@ TEST_F(ServiceWorkerJobTest, ParallelRegNewScript) {
|
| job_coordinator()->Register(
|
| pattern,
|
| script_url1,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(
|
| SERVICE_WORKER_OK, ®istration1_called, ®istration1));
|
|
|
| @@ -493,7 +493,7 @@ TEST_F(ServiceWorkerJobTest, ParallelRegNewScript) {
|
| job_coordinator()->Register(
|
| pattern,
|
| script_url2,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(
|
| SERVICE_WORKER_OK, ®istration2_called, ®istration2));
|
|
|
| @@ -527,7 +527,7 @@ TEST_F(ServiceWorkerJobTest, ParallelRegSameScript) {
|
| job_coordinator()->Register(
|
| pattern,
|
| script_url,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(
|
| SERVICE_WORKER_OK, ®istration1_called, ®istration1));
|
|
|
| @@ -536,7 +536,7 @@ TEST_F(ServiceWorkerJobTest, ParallelRegSameScript) {
|
| job_coordinator()->Register(
|
| pattern,
|
| script_url,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(
|
| SERVICE_WORKER_OK, ®istration2_called, ®istration2));
|
|
|
| @@ -604,7 +604,7 @@ TEST_F(ServiceWorkerJobTest, AbortAll_Register) {
|
| job_coordinator()->Register(
|
| pattern1,
|
| script_url1,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_ERROR_ABORT,
|
| ®istration_called1, ®istration1));
|
|
|
| @@ -613,7 +613,7 @@ TEST_F(ServiceWorkerJobTest, AbortAll_Register) {
|
| job_coordinator()->Register(
|
| pattern2,
|
| script_url2,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_ERROR_ABORT,
|
| ®istration_called2, ®istration2));
|
|
|
| @@ -679,7 +679,7 @@ TEST_F(ServiceWorkerJobTest, AbortAll_RegUnreg) {
|
| job_coordinator()->Register(
|
| pattern,
|
| script_url,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_ERROR_ABORT,
|
| ®istration_called, ®istration));
|
|
|
| @@ -717,7 +717,7 @@ TEST_F(ServiceWorkerJobTest, UnregisterWaitingSetsRedundant) {
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/"),
|
| script_url,
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, ®istration));
|
| base::RunLoop().RunUntilIdle();
|
| ASSERT_TRUE(called);
|
| @@ -758,7 +758,7 @@ TEST_F(ServiceWorkerJobTest, UnregisterActiveSetsRedundant) {
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/"),
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, ®istration));
|
| base::RunLoop().RunUntilIdle();
|
| ASSERT_TRUE(called);
|
| @@ -789,7 +789,7 @@ TEST_F(ServiceWorkerJobTest,
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/"),
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, ®istration));
|
| base::RunLoop().RunUntilIdle();
|
| ASSERT_TRUE(called);
|
| @@ -912,7 +912,7 @@ class UpdateJobTestHelper
|
| job_coordinator()->Register(
|
| test_origin.Resolve(kScope),
|
| test_origin.Resolve(kScript),
|
| - mock_render_process_id(),
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, ®istration));
|
| base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(called);
|
| @@ -1112,7 +1112,7 @@ TEST_F(ServiceWorkerJobTest, Update_NewestVersionChanged) {
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/one/"),
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, ®istration));
|
|
|
| EXPECT_FALSE(called);
|
| @@ -1145,7 +1145,7 @@ TEST_F(ServiceWorkerJobTest, Update_UninstallingRegistration) {
|
| job_coordinator()->Register(
|
| GURL("http://www.example.com/one/"),
|
| GURL("http://www.example.com/service_worker.js"),
|
| - render_process_id_,
|
| + NULL,
|
| SaveRegistration(SERVICE_WORKER_OK, &called, ®istration));
|
|
|
| EXPECT_FALSE(called);
|
|
|