| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 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(CancelDecrypt, void()); | 210   MOCK_METHOD0(CancelDecrypt, void()); | 
|  | 211   MOCK_METHOD2(InitializeVideoDecoder, void(const VideoDecoderConfig& config, | 
|  | 212                                             const DecoderInitCB& init_cb)); | 
|  | 213   MOCK_METHOD2(DecryptAndDecodeVideo, | 
|  | 214                void(const scoped_refptr<media::DecoderBuffer>& encrypted, | 
|  | 215                     const VideoDecodeCB& video_decode_cb)); | 
|  | 216   MOCK_METHOD0(CancelDecryptAndDecodeVideo, void()); | 
|  | 217   MOCK_METHOD0(StopVideoDecoder, void()); | 
| 211 | 218 | 
| 212  private: | 219  private: | 
| 213   DISALLOW_COPY_AND_ASSIGN(MockDecryptor); | 220   DISALLOW_COPY_AND_ASSIGN(MockDecryptor); | 
| 214 }; | 221 }; | 
| 215 | 222 | 
| 216 class MockDecryptorClient : public DecryptorClient { | 223 class MockDecryptorClient : public DecryptorClient { | 
| 217  public: | 224  public: | 
| 218   MockDecryptorClient(); | 225   MockDecryptorClient(); | 
| 219   virtual ~MockDecryptorClient(); | 226   virtual ~MockDecryptorClient(); | 
| 220 | 227 | 
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 284  public: | 291  public: | 
| 285   MockStatisticsCB(); | 292   MockStatisticsCB(); | 
| 286   ~MockStatisticsCB(); | 293   ~MockStatisticsCB(); | 
| 287 | 294 | 
| 288   MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 295   MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 
| 289 }; | 296 }; | 
| 290 | 297 | 
| 291 }  // namespace media | 298 }  // namespace media | 
| 292 | 299 | 
| 293 #endif  // MEDIA_BASE_MOCK_FILTERS_H_ | 300 #endif  // MEDIA_BASE_MOCK_FILTERS_H_ | 
| OLD | NEW | 
|---|