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

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

Issue 2061203002: WIP Reland: service worker: Don't control a subframe of an insecure context Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: maybe fix drmemory Created 4 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/service_worker_request_handler_unittest.cc
diff --git a/content/browser/service_worker/service_worker_request_handler_unittest.cc b/content/browser/service_worker/service_worker_request_handler_unittest.cc
index 56dcac66425bd13010c1405779ebce95c34b7a84..7316c919828e78241c49691552b67b8e6f0975b2 100644
--- a/content/browser/service_worker/service_worker_request_handler_unittest.cc
+++ b/content/browser/service_worker/service_worker_request_handler_unittest.cc
@@ -42,20 +42,20 @@ class ServiceWorkerRequestHandlerTest : public testing::Test {
helper_.reset(new EmbeddedWorkerTestHelper(base::FilePath()));
// A new unstored registration/version.
- registration_ = new ServiceWorkerRegistration(
- GURL("http://host/scope/"), 1L, context()->AsWeakPtr());
+ registration_ = new ServiceWorkerRegistration(GURL("https://host/scope/"),
+ 1L, context()->AsWeakPtr());
version_ = new ServiceWorkerVersion(registration_.get(),
- GURL("http://host/script.js"),
- 1L,
+ GURL("https://host/script.js"), 1L,
context()->AsWeakPtr());
// An empty host.
std::unique_ptr<ServiceWorkerProviderHost> host(
- new ServiceWorkerProviderHost(helper_->mock_render_process_id(),
- MSG_ROUTING_NONE, kMockProviderId,
- SERVICE_WORKER_PROVIDER_FOR_WINDOW,
- context()->AsWeakPtr(), nullptr));
- host->SetDocumentUrl(GURL("http://host/scope/"));
+ new ServiceWorkerProviderHost(
+ helper_->mock_render_process_id(), MSG_ROUTING_NONE,
+ kMockProviderId, SERVICE_WORKER_PROVIDER_FOR_WINDOW,
+ ServiceWorkerProviderHost::FrameSecurityLevel::SECURE,
+ context()->AsWeakPtr(), nullptr));
+ host->SetDocumentUrl(GURL("https://host/scope/"));
provider_host_ = host->AsWeakPtr();
context()->AddProviderHost(std::move(host));

Powered by Google App Engine
This is Rietveld 408576698