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.
5 #include "components/test_runner/mock_credential_manager_client.h"
7 #include "third_party/WebKit/public/platform/WebCredential.h"
9 namespace test_runner
{
11 MockCredentialManagerClient::MockCredentialManagerClient() {
14 MockCredentialManagerClient::~MockCredentialManagerClient() {
17 void MockCredentialManagerClient::SetResponse(
18 blink::WebCredential
* credential
) {
19 credential_
.reset(credential
);
22 void MockCredentialManagerClient::dispatchStore(
23 const blink::WebCredential
&,
24 blink::WebCredentialManagerClient::NotificationCallbacks
* callbacks
) {
25 callbacks
->onSuccess();
29 void MockCredentialManagerClient::dispatchRequireUserMediation(
30 NotificationCallbacks
* callbacks
) {
31 callbacks
->onSuccess();
35 void MockCredentialManagerClient::dispatchGet(
37 const blink::WebVector
<blink::WebURL
>& federations
,
38 RequestCallbacks
* callbacks
) {
39 callbacks
->onSuccess(credential_
.get());
43 } // namespace test_runner