OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 #include "chromeos/attestation/mock_attestation_flow.h" |
| 6 |
| 7 #include "testing/gmock/include/gmock/gmock.h" |
| 8 |
| 9 using testing::_; |
| 10 using testing::Invoke; |
| 11 |
| 12 namespace chromeos { |
| 13 namespace attestation { |
| 14 |
| 15 MockServerProxy::MockServerProxy() {} |
| 16 |
| 17 MockServerProxy::~MockServerProxy() {} |
| 18 |
| 19 void MockServerProxy::DeferToFake(bool success) { |
| 20 fake_.set_result(success); |
| 21 ON_CALL(*this, SendEnrollRequest(_, _)) |
| 22 .WillByDefault(Invoke(&fake_, &FakeServerProxy::SendEnrollRequest)); |
| 23 ON_CALL(*this, SendCertificateRequest(_, _)) |
| 24 .WillByDefault(Invoke(&fake_, &FakeServerProxy::SendCertificateRequest)); |
| 25 } |
| 26 |
| 27 MockObserver::MockObserver() {} |
| 28 |
| 29 MockObserver::~MockObserver() {} |
| 30 |
| 31 } // namespace attestation |
| 32 } // namespace chromeos |
OLD | NEW |