| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 MOCK_METHOD6(AddKey, void(const std::string& key_system, | 205 MOCK_METHOD6(AddKey, void(const std::string& key_system, |
| 206 const uint8* key, | 206 const uint8* key, |
| 207 int key_length, | 207 int key_length, |
| 208 const uint8* init_data, | 208 const uint8* init_data, |
| 209 int init_data_length, | 209 int init_data_length, |
| 210 const std::string& session_id)); | 210 const std::string& session_id)); |
| 211 MOCK_METHOD2(CancelKeyRequest, void(const std::string& key_system, | 211 MOCK_METHOD2(CancelKeyRequest, void(const std::string& key_system, |
| 212 const std::string& session_id)); | 212 const std::string& session_id)); |
| 213 MOCK_METHOD2(Decrypt, void(const scoped_refptr<DecoderBuffer>& encrypted, | 213 MOCK_METHOD2(Decrypt, void(const scoped_refptr<DecoderBuffer>& encrypted, |
| 214 const DecryptCB& decrypt_cb)); | 214 const DecryptCB& decrypt_cb)); |
| 215 MOCK_METHOD0(Stop, void()); |
| 215 | 216 |
| 216 private: | 217 private: |
| 217 DISALLOW_COPY_AND_ASSIGN(MockDecryptor); | 218 DISALLOW_COPY_AND_ASSIGN(MockDecryptor); |
| 218 }; | 219 }; |
| 219 | 220 |
| 220 class MockDecryptorClient : public DecryptorClient { | 221 class MockDecryptorClient : public DecryptorClient { |
| 221 public: | 222 public: |
| 222 MockDecryptorClient(); | 223 MockDecryptorClient(); |
| 223 virtual ~MockDecryptorClient(); | 224 virtual ~MockDecryptorClient(); |
| 224 | 225 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 public: | 300 public: |
| 300 MockStatisticsCB(); | 301 MockStatisticsCB(); |
| 301 ~MockStatisticsCB(); | 302 ~MockStatisticsCB(); |
| 302 | 303 |
| 303 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 304 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
| 304 }; | 305 }; |
| 305 | 306 |
| 306 } // namespace media | 307 } // namespace media |
| 307 | 308 |
| 308 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 309 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
| OLD | NEW |