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

Unified Diff: content/shell/renderer/test_runner/mock_web_push_client.h

Issue 784873004: Push API: delete MockWebPushClient [switchover 2/6] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years 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 | « content/shell/BUILD.gn ('k') | content/shell/renderer/test_runner/mock_web_push_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/mock_web_push_client.h
diff --git a/content/shell/renderer/test_runner/mock_web_push_client.h b/content/shell/renderer/test_runner/mock_web_push_client.h
deleted file mode 100644
index 6ffc3a62ede9d42302d41b074c16675b437056ad..0000000000000000000000000000000000000000
--- a/content/shell/renderer/test_runner/mock_web_push_client.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// 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 CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_PUSH_CLIENT_H_
-#define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_PUSH_CLIENT_H_
-
-#include <string>
-
-#include "third_party/WebKit/public/platform/WebPushClient.h"
-
-namespace blink {
-class WebServiceWorkerProvider;
-} // namespace blink
-
-namespace content {
-
-// MockWebPushClient is a mock implementation of WebPushClient to be able to
-// test the Push Message API in Blink without depending on the content layer.
-// The mock, for legacy reasons, automatically fails if it wasn't set to another
-// state. Consumers can set its success values and error values by calling
-// respectively SetMockSuccessValues and SetMockErrorValues. When
-// SetMockSuccessValues is called, the mock will always succeed until
-// SetMockErrorValues is called at which point it will always fail.
-class MockWebPushClient : public blink::WebPushClient {
- public:
- MockWebPushClient();
- virtual ~MockWebPushClient();
-
- void SetMockSuccessValues(const std::string& end_point,
- const std::string& registration_id);
-
- void SetMockErrorValues(const std::string& message);
-
- private:
- // WebPushClient implementation.
- virtual void registerPushMessaging(
- blink::WebPushRegistrationCallbacks* callbacks,
- blink::WebServiceWorkerProvider* service_worker_provider);
- virtual void getPermissionStatus(
- blink::WebPushPermissionStatusCallback* callback,
- blink::WebServiceWorkerProvider* provider);
-
- std::string end_point_;
- std::string registration_id_;
- std::string error_message_;
-
- DISALLOW_COPY_AND_ASSIGN(MockWebPushClient);
-};
-
-} // namespace content
-
-#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_PUSH_CLIENT_H_
« no previous file with comments | « content/shell/BUILD.gn ('k') | content/shell/renderer/test_runner/mock_web_push_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698