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

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

Issue 501453002: Decouple script_url from ServiceWorkerRegistration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 0a074c59e712b4dba5aad483982a94ac12d21672..25ac70373283da5f575c9cc6dd3df154935ee193 100644
--- a/content/browser/service_worker/service_worker_job_unittest.cc
+++ b/content/browser/service_worker/service_worker_job_unittest.cc
@@ -715,9 +715,10 @@ TEST_F(ServiceWorkerJobTest, AbortAll_RegUnreg) {
TEST_F(ServiceWorkerJobTest, UnregisterWaitingSetsRedundant) {
scoped_refptr<ServiceWorkerRegistration> registration;
bool called = false;
+ GURL script_url("http://www.example.com/service_worker.js");
job_coordinator()->Register(
GURL("http://www.example.com/"),
- GURL("http://www.example.com/service_worker.js"),
+ script_url,
render_process_id_,
SaveRegistration(SERVICE_WORKER_OK, &called, &registration));
base::RunLoop().RunUntilIdle();
@@ -727,7 +728,7 @@ TEST_F(ServiceWorkerJobTest, UnregisterWaitingSetsRedundant) {
// Manually create the waiting worker since there is no way to become a
// waiting worker until Update is implemented.
scoped_refptr<ServiceWorkerVersion> version = new ServiceWorkerVersion(
- registration, 1L, helper_->context()->AsWeakPtr());
+ registration, script_url, 1L, helper_->context()->AsWeakPtr());
ServiceWorkerStatusCode status = SERVICE_WORKER_ERROR_FAILED;
version->StartWorker(CreateReceiverOnCurrentThread(&status));
base::RunLoop().RunUntilIdle();

Powered by Google App Engine
This is Rietveld 408576698