| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_ATTESTATION_MOCK_ATTESTATION_FLOW_H_ | 5 #ifndef CHROMEOS_ATTESTATION_MOCK_ATTESTATION_FLOW_H_ |
| 6 #define CHROMEOS_ATTESTATION_MOCK_ATTESTATION_FLOW_H_ | 6 #define CHROMEOS_ATTESTATION_MOCK_ATTESTATION_FLOW_H_ |
| 7 | 7 |
| 8 #include "chromeos/attestation/attestation_flow.h" | 8 #include "chromeos/attestation/attestation_flow.h" |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 | 13 |
| 14 class AccountId; |
| 15 |
| 14 namespace chromeos { | 16 namespace chromeos { |
| 15 namespace attestation { | 17 namespace attestation { |
| 16 | 18 |
| 17 // A fake server proxy which just appends "_response" to every request. | 19 // A fake server proxy which just appends "_response" to every request. |
| 18 class FakeServerProxy : public ServerProxy { | 20 class FakeServerProxy : public ServerProxy { |
| 19 public: | 21 public: |
| 20 FakeServerProxy(); | 22 FakeServerProxy(); |
| 21 ~FakeServerProxy() override; | 23 ~FakeServerProxy() override; |
| 22 | 24 |
| 23 void set_result(bool result) { | 25 void set_result(bool result) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 virtual ~MockObserver(); | 61 virtual ~MockObserver(); |
| 60 | 62 |
| 61 MOCK_METHOD2(MockCertificateCallback, void(bool, const std::string&)); | 63 MOCK_METHOD2(MockCertificateCallback, void(bool, const std::string&)); |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 class MockAttestationFlow : public AttestationFlow { | 66 class MockAttestationFlow : public AttestationFlow { |
| 65 public: | 67 public: |
| 66 MockAttestationFlow(); | 68 MockAttestationFlow(); |
| 67 virtual ~MockAttestationFlow(); | 69 virtual ~MockAttestationFlow(); |
| 68 | 70 |
| 69 MOCK_METHOD5(GetCertificate, void(AttestationCertificateProfile, | 71 MOCK_METHOD5(GetCertificate, |
| 70 const std::string&, | 72 void(AttestationCertificateProfile, |
| 71 const std::string&, | 73 const AccountId& account_id, |
| 72 bool, | 74 const std::string&, |
| 73 const CertificateCallback&)); | 75 bool, |
| 76 const CertificateCallback&)); |
| 74 }; | 77 }; |
| 75 | 78 |
| 76 } // namespace attestation | 79 } // namespace attestation |
| 77 } // namespace chromeos | 80 } // namespace chromeos |
| 78 | 81 |
| 79 #endif // CHROMEOS_ATTESTATION_MOCK_ATTESTATION_FLOW_H_ | 82 #endif // CHROMEOS_ATTESTATION_MOCK_ATTESTATION_FLOW_H_ |
| OLD | NEW |