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

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

Issue 2071433003: Reland: service worker: Don't control a subframe of an insecure context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revised 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_context_unittest.cc
diff --git a/content/browser/service_worker/service_worker_context_unittest.cc b/content/browser/service_worker/service_worker_context_unittest.cc
index d4de33260642902957cd8a6cefb2ea82fafda2bd..05409c833aaba021039bacbda59de0b798a4dcdf 100644
--- a/content/browser/service_worker/service_worker_context_unittest.cc
+++ b/content/browser/service_worker/service_worker_context_unittest.cc
@@ -532,25 +532,33 @@ TEST_F(ServiceWorkerContextTest, ProviderHostIterator) {
// Host1 (provider_id=1): process_id=1, origin1.
ServiceWorkerProviderHost* host1(new ServiceWorkerProviderHost(
kRenderProcessId1, MSG_ROUTING_NONE, provider_id++,
- SERVICE_WORKER_PROVIDER_FOR_WINDOW, context()->AsWeakPtr(), nullptr));
+ SERVICE_WORKER_PROVIDER_FOR_WINDOW,
+ ServiceWorkerProviderHost::FrameSecurityLevel::SECURE,
+ context()->AsWeakPtr(), nullptr));
host1->SetDocumentUrl(kOrigin1);
// Host2 (provider_id=2): process_id=2, origin2.
ServiceWorkerProviderHost* host2(new ServiceWorkerProviderHost(
kRenderProcessId2, MSG_ROUTING_NONE, provider_id++,
- SERVICE_WORKER_PROVIDER_FOR_WINDOW, context()->AsWeakPtr(), nullptr));
+ SERVICE_WORKER_PROVIDER_FOR_WINDOW,
+ ServiceWorkerProviderHost::FrameSecurityLevel::SECURE,
+ context()->AsWeakPtr(), nullptr));
host2->SetDocumentUrl(kOrigin2);
// Host3 (provider_id=3): process_id=2, origin1.
ServiceWorkerProviderHost* host3(new ServiceWorkerProviderHost(
kRenderProcessId2, MSG_ROUTING_NONE, provider_id++,
- SERVICE_WORKER_PROVIDER_FOR_WINDOW, context()->AsWeakPtr(), nullptr));
+ SERVICE_WORKER_PROVIDER_FOR_WINDOW,
+ ServiceWorkerProviderHost::FrameSecurityLevel::SECURE,
+ context()->AsWeakPtr(), nullptr));
host3->SetDocumentUrl(kOrigin1);
// Host4 (provider_id=4): process_id=2, origin2, for ServiceWorker.
ServiceWorkerProviderHost* host4(new ServiceWorkerProviderHost(
kRenderProcessId2, MSG_ROUTING_NONE, provider_id++,
- SERVICE_WORKER_PROVIDER_FOR_CONTROLLER, context()->AsWeakPtr(), nullptr));
+ SERVICE_WORKER_PROVIDER_FOR_CONTROLLER,
+ ServiceWorkerProviderHost::FrameSecurityLevel::SECURE,
+ context()->AsWeakPtr(), nullptr));
host4->SetDocumentUrl(kOrigin2);
context()->AddProviderHost(base::WrapUnique(host1));

Powered by Google App Engine
This is Rietveld 408576698