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

Side by Side Diff: components/test_runner/mock_credential_manager_client.h

Issue 2707183003: Move //components/test_runner back into //content/shell (Closed)
Patch Set: Trim DEPS Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_
6 #define COMPONENTS_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "third_party/WebKit/public/platform/WebCredentialManagerClient.h"
12 #include "third_party/WebKit/public/platform/WebCredentialManagerError.h"
13 #include "third_party/WebKit/public/platform/WebVector.h"
14
15 namespace blink {
16 class WebCredential;
17 class WebURL;
18 }
19
20 namespace test_runner {
21
22 class MockCredentialManagerClient : public blink::WebCredentialManagerClient {
23 public:
24 MockCredentialManagerClient();
25 virtual ~MockCredentialManagerClient();
26
27 // We take ownership of the |credential|.
28 void SetResponse(blink::WebCredential* credential);
29 void SetError(const std::string& error);
30
31 // blink::WebCredentialManager:
32 void dispatchStore(const blink::WebCredential& credential,
33 NotificationCallbacks* callbacks) override;
34 void dispatchRequireUserMediation(NotificationCallbacks* callbacks) override;
35 void dispatchGet(bool zero_click_only,
36 bool include_passwords,
37 const blink::WebVector<blink::WebURL>& federations,
38 RequestCallbacks* callbacks) override;
39
40 private:
41 std::unique_ptr<blink::WebCredential> credential_;
42 blink::WebCredentialManagerError error_;
43
44 DISALLOW_COPY_AND_ASSIGN(MockCredentialManagerClient);
45 };
46
47 } // namespace test_runner
48
49 #endif // COMPONENTS_TEST_RUNNER_MOCK_CREDENTIAL_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698