[AndroidWebViewShell] Replace rebaseline script with a new version using test_runner.py
[chromium-blink-merge.git] / components / test_runner / mock_credential_manager_client.cc
blobbed265344e94ef93fd60007c79a9f4fffecf8a98
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::dispatchSignedIn(
23 const blink::WebCredential&,
24 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks) {
25 callbacks->onSuccess();
26 delete callbacks;
29 void MockCredentialManagerClient::dispatchRequireUserMediation(
30 NotificationCallbacks* callbacks) {
31 callbacks->onSuccess();
32 delete callbacks;
35 void MockCredentialManagerClient::dispatchRequest(
36 bool zeroClickOnly,
37 const blink::WebVector<blink::WebURL>& federations,
38 RequestCallbacks* callbacks) {
39 callbacks->onSuccess(credential_.get());
40 delete callbacks;
43 } // namespace test_runner