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

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: change useCache to updateViaCache Created 3 years, 6 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 d83152d006e2633be5855ee75e553c9656c5cdf1..8226d0b80960a9093275a0b332f1bb0e4b35b3ff 100644
--- a/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
+++ b/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
@@ -72,8 +72,9 @@ 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(ServiceWorkerRegistrationOptions(kScope),
+ kRegistrationId, context()->AsWeakPtr());
version_ = new ServiceWorkerVersion(registration_.get(), kResource1,
kVersionId, context()->AsWeakPtr());
version_->set_foreign_fetch_scopes({kScope});
@@ -185,8 +186,9 @@ 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,
- context()->AsWeakPtr());
+ new ServiceWorkerRegistration(
+ ServiceWorkerRegistrationOptions(GURL("https://host/scope")), 1L,
+ context()->AsWeakPtr());
scoped_refptr<ServiceWorkerVersion> version = new ServiceWorkerVersion(
registration.get(), GURL("https://host/script.js"), 1L,
context()->AsWeakPtr());

Powered by Google App Engine
This is Rietveld 408576698