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_ |
| 6 #define CHROMEOS_ATTESTATION_MOCK_ATTESTATION_FLOW_H_ |
| 7 |
5 #include "chromeos/attestation/attestation_flow.h" | 8 #include "chromeos/attestation/attestation_flow.h" |
6 | 9 |
7 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
8 #include "base/callback.h" | 11 #include "base/callback.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
10 | 13 |
11 namespace chromeos { | 14 namespace chromeos { |
12 namespace attestation { | 15 namespace attestation { |
13 | 16 |
14 // A fake server proxy which just appends "_response" to every request. | 17 // A fake server proxy which just appends "_response" to every request. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 53 |
51 // This class can be used to mock AttestationFlow callbacks. | 54 // This class can be used to mock AttestationFlow callbacks. |
52 class MockObserver { | 55 class MockObserver { |
53 public: | 56 public: |
54 MockObserver(); | 57 MockObserver(); |
55 virtual ~MockObserver(); | 58 virtual ~MockObserver(); |
56 | 59 |
57 MOCK_METHOD2(MockCertificateCallback, void(bool, const std::string&)); | 60 MOCK_METHOD2(MockCertificateCallback, void(bool, const std::string&)); |
58 }; | 61 }; |
59 | 62 |
| 63 class MockAttestationFlow : public AttestationFlow { |
| 64 public: |
| 65 MockAttestationFlow(); |
| 66 virtual ~MockAttestationFlow(); |
| 67 |
| 68 MOCK_METHOD2(GetCertificate, void(const std::string&, |
| 69 const CertificateCallback&)); |
| 70 }; |
| 71 |
60 } // namespace attestation | 72 } // namespace attestation |
61 } // namespace chromeos | 73 } // namespace chromeos |
| 74 |
| 75 #endif // CHROMEOS_ATTESTATION_MOCK_ATTESTATION_FLOW_H_ |
OLD | NEW |