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

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

Issue 625533002: Respect content settings for Service Worker registration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testing
Patch Set: better diff Created 6 years, 2 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_dispatcher_host_unittest.cc
diff --git a/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc b/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
index bdb95ea0aa912fccae56532601dccfefef04690e..140d7b3454ef949eeb99aba2df2565656f9d22b6 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
@@ -16,6 +16,7 @@
#include "content/common/service_worker/embedded_worker_messages.h"
#include "content/common/service_worker/service_worker_messages.h"
#include "content/public/common/content_switches.h"
+#include "content/public/test/mock_resource_context.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -28,8 +29,9 @@ class TestingServiceWorkerDispatcherHost : public ServiceWorkerDispatcherHost {
TestingServiceWorkerDispatcherHost(
int process_id,
ServiceWorkerContextWrapper* context_wrapper,
+ ResourceContext* resource_context,
EmbeddedWorkerTestHelper* helper)
- : ServiceWorkerDispatcherHost(process_id, NULL),
+ : ServiceWorkerDispatcherHost(process_id, NULL, resource_context),
bad_messages_received_count_(0),
helper_(helper) {
Init(context_wrapper);
@@ -60,7 +62,7 @@ class ServiceWorkerDispatcherHostTest : public testing::Test {
virtual void SetUp() {
helper_.reset(new EmbeddedWorkerTestHelper(kRenderProcessId));
dispatcher_host_ = new TestingServiceWorkerDispatcherHost(
- kRenderProcessId, context_wrapper(), helper_.get());
+ kRenderProcessId, context_wrapper(), &resource_context_, helper_.get());
}
virtual void TearDown() {
@@ -120,6 +122,7 @@ class ServiceWorkerDispatcherHostTest : public testing::Test {
}
TestBrowserThreadBundle browser_thread_bundle_;
+ content::MockResourceContext resource_context_;
scoped_ptr<EmbeddedWorkerTestHelper> helper_;
scoped_refptr<TestingServiceWorkerDispatcherHost> dispatcher_host_;
};

Powered by Google App Engine
This is Rietveld 408576698