Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: content/browser/service_worker/service_worker_job_unittest.cc

Issue 443593002: ServiceWorker: Move worker candidate process knowledge to ServiceWorkerProcessManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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, &registration));
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, &registration));
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, &registration));
@@ -446,7 +446,7 @@ TEST_F(ServiceWorkerJobTest, ParallelRegUnreg) {
job_coordinator()->Register(
pattern,
script_url,
- render_process_id_,
+ NULL,
SaveRegistration(SERVICE_WORKER_OK, &registration_called, &registration));
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, &registration1_called, &registration1));
@@ -493,7 +493,7 @@ TEST_F(ServiceWorkerJobTest, ParallelRegNewScript) {
job_coordinator()->Register(
pattern,
script_url2,
- render_process_id_,
+ NULL,
SaveRegistration(
SERVICE_WORKER_OK, &registration2_called, &registration2));
@@ -527,7 +527,7 @@ TEST_F(ServiceWorkerJobTest, ParallelRegSameScript) {
job_coordinator()->Register(
pattern,
script_url,
- render_process_id_,
+ NULL,
SaveRegistration(
SERVICE_WORKER_OK, &registration1_called, &registration1));
@@ -536,7 +536,7 @@ TEST_F(ServiceWorkerJobTest, ParallelRegSameScript) {
job_coordinator()->Register(
pattern,
script_url,
- render_process_id_,
+ NULL,
SaveRegistration(
SERVICE_WORKER_OK, &registration2_called, &registration2));
@@ -604,7 +604,7 @@ TEST_F(ServiceWorkerJobTest, AbortAll_Register) {
job_coordinator()->Register(
pattern1,
script_url1,
- render_process_id_,
+ NULL,
SaveRegistration(SERVICE_WORKER_ERROR_ABORT,
&registration_called1, &registration1));
@@ -613,7 +613,7 @@ TEST_F(ServiceWorkerJobTest, AbortAll_Register) {
job_coordinator()->Register(
pattern2,
script_url2,
- render_process_id_,
+ NULL,
SaveRegistration(SERVICE_WORKER_ERROR_ABORT,
&registration_called2, &registration2));
@@ -679,7 +679,7 @@ TEST_F(ServiceWorkerJobTest, AbortAll_RegUnreg) {
job_coordinator()->Register(
pattern,
script_url,
- render_process_id_,
+ NULL,
SaveRegistration(SERVICE_WORKER_ERROR_ABORT,
&registration_called, &registration));
@@ -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, &registration));
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, &registration));
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, &registration));
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, &registration));
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, &registration));
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, &registration));
EXPECT_FALSE(called);

Powered by Google App Engine
This is Rietveld 408576698