[Media Router] Add integration tests and e2e tests for media router and presentation...
[chromium-blink-merge.git] / components / test_runner / mock_credential_manager_client.cc
blob6532d6a69aff4bfc17d0ea2e0f05af3ae3d5b2d3
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::dispatchFailedSignIn(
23 const blink::WebCredential&,
24 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks) {
25 callbacks->onSuccess();
26 delete callbacks;
29 void MockCredentialManagerClient::dispatchSignedIn(
30 const blink::WebCredential&,
31 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks) {
32 callbacks->onSuccess();
33 delete callbacks;
36 void MockCredentialManagerClient::dispatchSignedOut(
37 NotificationCallbacks* callbacks) {
38 callbacks->onSuccess();
39 delete callbacks;
42 void MockCredentialManagerClient::dispatchRequest(
43 bool zeroClickOnly,
44 const blink::WebVector<blink::WebURL>& federations,
45 RequestCallbacks* callbacks) {
46 callbacks->onSuccess(credential_.get());
47 delete callbacks;
50 } // namespace test_runner