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

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

Issue 2771823002: Implement updateViaCache flag and no-cache by default for main service worker scripts
Patch Set: fix tests Created 3 years, 9 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/foreign_fetch_request_handler_unittest.cc
diff --git a/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc b/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
index cdf52f73ca12bc39f7f729c9e7e046ad369f3c8a..c1b116326063ef23784e688e99f899f4264c64b9 100644
--- a/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
+++ b/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
@@ -71,8 +71,8 @@ class ForeignFetchRequestHandlerTest : public testing::Test {
// Create a registration for the worker which has foreign fetch event
// handler.
- registration_ = new ServiceWorkerRegistration(kScope, kRegistrationId,
- context()->AsWeakPtr());
+ registration_ = new ServiceWorkerRegistration(
+ kScope, false /* use_cache */, kRegistrationId, context()->AsWeakPtr());
version_ = new ServiceWorkerVersion(registration_.get(), kResource1,
kVersionId, context()->AsWeakPtr());
version_->set_foreign_fetch_scopes({kScope});
@@ -179,7 +179,8 @@ class ForeignFetchRequestHandlerTest : public testing::Test {
// Create another worker whose requests will be intercepted by the foreign
// fetch event handler.
scoped_refptr<ServiceWorkerRegistration> registration =
- new ServiceWorkerRegistration(GURL("https://host/scope"), 1L,
+ new ServiceWorkerRegistration(GURL("https://host/scope"),
+ false /* use_cache */, 1L,
context()->AsWeakPtr());
scoped_refptr<ServiceWorkerVersion> version = new ServiceWorkerVersion(
registration.get(), GURL("https://host/script.js"), 1L,

Powered by Google App Engine
This is Rietveld 408576698