Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598
[chromium-blink-merge.git] / components / test_runner / mock_credential_manager_client.cc
blob7c9cce16392dfad8a1e4a674dc642502609ff987
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();
26 delete callbacks;
29 void MockCredentialManagerClient::dispatchRequireUserMediation(
30 NotificationCallbacks* callbacks) {
31 callbacks->onSuccess();
32 delete callbacks;
35 void MockCredentialManagerClient::dispatchGet(
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