| 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 // A new breed of mock media filters, this time using gmock! Feel free to add | 5 // A new breed of mock media filters, this time using gmock! Feel free to add |
| 6 // actions if you need interesting side-effects. | 6 // actions if you need interesting side-effects. |
| 7 // | 7 // |
| 8 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock | 8 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock |
| 9 // filters to fail the test or do nothing when an unexpected method is called. | 9 // filters to fail the test or do nothing when an unexpected method is called. |
| 10 // http://code.google.com/p/googlemock/wiki/CookBook#Nice_Mocks_and_Strict_Mocks | 10 // http://code.google.com/p/googlemock/wiki/CookBook#Nice_Mocks_and_Strict_Mocks |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 MOCK_METHOD6(AddKey, void(const std::string& key_system, | 200 MOCK_METHOD6(AddKey, void(const std::string& key_system, |
| 201 const uint8* key, | 201 const uint8* key, |
| 202 int key_length, | 202 int key_length, |
| 203 const uint8* init_data, | 203 const uint8* init_data, |
| 204 int init_data_length, | 204 int init_data_length, |
| 205 const std::string& session_id)); | 205 const std::string& session_id)); |
| 206 MOCK_METHOD2(CancelKeyRequest, void(const std::string& key_system, | 206 MOCK_METHOD2(CancelKeyRequest, void(const std::string& key_system, |
| 207 const std::string& session_id)); | 207 const std::string& session_id)); |
| 208 MOCK_METHOD2(Decrypt, void(const scoped_refptr<DecoderBuffer>& encrypted, | 208 MOCK_METHOD2(Decrypt, void(const scoped_refptr<DecoderBuffer>& encrypted, |
| 209 const DecryptCB& decrypt_cb)); | 209 const DecryptCB& decrypt_cb)); |
| 210 MOCK_METHOD0(Stop, void()); | 210 MOCK_METHOD0(CancelDecrypt, void()); |
| 211 | 211 |
| 212 private: | 212 private: |
| 213 DISALLOW_COPY_AND_ASSIGN(MockDecryptor); | 213 DISALLOW_COPY_AND_ASSIGN(MockDecryptor); |
| 214 }; | 214 }; |
| 215 | 215 |
| 216 class MockDecryptorClient : public DecryptorClient { | 216 class MockDecryptorClient : public DecryptorClient { |
| 217 public: | 217 public: |
| 218 MockDecryptorClient(); | 218 MockDecryptorClient(); |
| 219 virtual ~MockDecryptorClient(); | 219 virtual ~MockDecryptorClient(); |
| 220 | 220 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 public: | 284 public: |
| 285 MockStatisticsCB(); | 285 MockStatisticsCB(); |
| 286 ~MockStatisticsCB(); | 286 ~MockStatisticsCB(); |
| 287 | 287 |
| 288 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 288 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
| 289 }; | 289 }; |
| 290 | 290 |
| 291 } // namespace media | 291 } // namespace media |
| 292 | 292 |
| 293 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 293 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
| OLD | NEW |