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

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

Issue 565943002: Credential Manager: Introduce a MockCredentialManagerClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/shell/renderer/test_runner/mock_credential_manager_client.h
diff --git a/content/shell/renderer/test_runner/mock_credential_manager_client.h b/content/shell/renderer/test_runner/mock_credential_manager_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..b876bf345984563ff6d4ab77a4da2638ef1a6597
--- /dev/null
+++ b/content/shell/renderer/test_runner/mock_credential_manager_client.h
@@ -0,0 +1,46 @@
+// 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_CREDENTIAL_MANAGER_CLIENT_H_
+#define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_
+
+#include "base/macros.h"
+#include "third_party/WebKit/public/platform/WebCredentialManagerClient.h"
+#include "third_party/WebKit/public/platform/WebVector.h"
+
+namespace blink {
+class WebCredential;
+class WebFrame;
+class WebURL;
+}
+
+namespace content {
+
+class MockCredentialManagerClient : public blink::WebCredentialManagerClient {
+ public:
+ MockCredentialManagerClient();
+ virtual ~MockCredentialManagerClient();
+
+ void SetResponse(blink::WebCredential*);
jochen (gone - plz use gerrit) 2014/09/12 14:16:25 nit. add parameters names (chromium style)
+
+ // blink::WebCredentialManager:
+ virtual void dispatchFailedSignIn(const blink::WebCredential& credential,
jochen (gone - plz use gerrit) 2014/09/12 14:16:25 no override on blink API implementations
+ NotificationCallbacks* callbacks) OVERRIDE;
+ virtual void dispatchSignedIn(const blink::WebCredential& credential,
+ NotificationCallbacks* callbacks) OVERRIDE;
+ virtual void dispatchSignedOut(NotificationCallbacks* callbacks) OVERRIDE;
+ virtual void dispatchRequest(
+ bool zero_click_only,
+ const blink::WebVector<blink::WebURL>& federations,
+ RequestCallbacks* callbacks) OVERRIDE;
+
+ private:
+ blink::WebCredential* credential_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockCredentialManagerClient);
+};
+
+} // namespace content
+
+#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698