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

Unified Diff: Source/modules/serviceworkers/MockWebServiceWorkerProvider.h

Issue 400903002: Check that Service Workers are registered from secure origins. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Do not open testing namespace for Windows build. Created 6 years, 5 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
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/serviceworkers/ServiceWorkerContainer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/MockWebServiceWorkerProvider.h
diff --git a/Source/modules/serviceworkers/MockWebServiceWorkerProvider.h b/Source/modules/serviceworkers/MockWebServiceWorkerProvider.h
new file mode 100644
index 0000000000000000000000000000000000000000..f6d0c1a7f18d910877bae4a1d127a26c1717bc25
--- /dev/null
+++ b/Source/modules/serviceworkers/MockWebServiceWorkerProvider.h
@@ -0,0 +1,22 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MockWebServiceWorkerProvider_h
+#define MockWebServiceWorkerProvider_h
+
+#include "public/platform/WebServiceWorkerProvider.h"
+#include <gmock/gmock.h>
Michael van Ouwerkerk 2014/07/18 09:37:57 Drive-by nit: it seems quite uncommon to use gmock
+
+namespace testing {
+
+class MockWebServiceWorkerProvider : public blink::WebServiceWorkerProvider {
+public:
+ MOCK_METHOD1(setClient, void(blink::WebServiceWorkerProviderClient*));
+ MOCK_METHOD3(registerServiceWorker, void(const blink::WebURL&, const blink::WebURL&, WebServiceWorkerCallbacks*));
+ MOCK_METHOD2(unregisterServiceWorker, void(const blink::WebURL&, WebServiceWorkerCallbacks*));
+};
+
+} // namespace testing
+
+#endif // MockWebServiceWorkerProvider_h
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/serviceworkers/ServiceWorkerContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698