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/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "components/user_manager/user_id.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
13 | 14 |
14 namespace chromeos { | 15 namespace chromeos { |
15 namespace attestation { | 16 namespace attestation { |
16 | 17 |
17 // A fake server proxy which just appends "_response" to every request. | 18 // A fake server proxy which just appends "_response" to every request. |
18 class FakeServerProxy : public ServerProxy { | 19 class FakeServerProxy : public ServerProxy { |
19 public: | 20 public: |
20 FakeServerProxy(); | 21 FakeServerProxy(); |
21 ~FakeServerProxy() override; | 22 ~FakeServerProxy() override; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 61 |
61 MOCK_METHOD2(MockCertificateCallback, void(bool, const std::string&)); | 62 MOCK_METHOD2(MockCertificateCallback, void(bool, const std::string&)); |
62 }; | 63 }; |
63 | 64 |
64 class MockAttestationFlow : public AttestationFlow { | 65 class MockAttestationFlow : public AttestationFlow { |
65 public: | 66 public: |
66 MockAttestationFlow(); | 67 MockAttestationFlow(); |
67 virtual ~MockAttestationFlow(); | 68 virtual ~MockAttestationFlow(); |
68 | 69 |
69 MOCK_METHOD5(GetCertificate, void(AttestationCertificateProfile, | 70 MOCK_METHOD5(GetCertificate, void(AttestationCertificateProfile, |
70 const std::string&, | 71 const user_manager::UserID&, |
71 const std::string&, | 72 const std::string&, |
72 bool, | 73 bool, |
73 const CertificateCallback&)); | 74 const CertificateCallback&)); |
74 }; | 75 }; |
75 | 76 |
76 } // namespace attestation | 77 } // namespace attestation |
77 } // namespace chromeos | 78 } // namespace chromeos |
78 | 79 |
79 #endif // CHROMEOS_ATTESTATION_MOCK_ATTESTATION_FLOW_H_ | 80 #endif // CHROMEOS_ATTESTATION_MOCK_ATTESTATION_FLOW_H_ |
OLD | NEW |