| Index: media/base/mock_filters.h
|
| diff --git a/media/base/mock_filters.h b/media/base/mock_filters.h
|
| index 626392c2facddbf94051747e2f0e654b6c35eb9b..cf8fa2859cc89e69cdaa0e980e65bfa770585747 100644
|
| --- a/media/base/mock_filters.h
|
| +++ b/media/base/mock_filters.h
|
| @@ -26,6 +26,7 @@
|
| #include "media/base/video_decoder_config.h"
|
| #include "media/base/video_frame.h"
|
| #include "media/base/video_renderer.h"
|
| +#include "media/crypto/decryptor_client.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
|
|
| namespace media {
|
| @@ -209,6 +210,41 @@ class MockAudioRenderer : public AudioRenderer {
|
| DISALLOW_COPY_AND_ASSIGN(MockAudioRenderer);
|
| };
|
|
|
| +class MockDecryptorClient : public DecryptorClient {
|
| + public:
|
| + MockDecryptorClient();
|
| + virtual ~MockDecryptorClient();
|
| +
|
| + MOCK_METHOD2(KeyAdded, void(const std::string&, const std::string&));
|
| + MOCK_METHOD4(KeyError, void(const std::string&, const std::string&,
|
| + AesDecryptor::KeyError, int));
|
| + // TODO(xhwang): This is a workaround of the issue that move-only parameters
|
| + // are not supported in mocked methods. Remove this when the issue is fixed
|
| + // (http://code.google.com/p/googletest/issues/detail?id=395) or when we use
|
| + // std::string instead of scoped_array<uint8> (http://crbug.com/130689).
|
| + MOCK_METHOD5(KeyMessageMock, void(const std::string& key_system,
|
| + const std::string& session_id,
|
| + const uint8* message,
|
| + int message_length,
|
| + const std::string& default_url));
|
| + MOCK_METHOD4(NeedKeyMock, void(const std::string& key_system,
|
| + const std::string& session_id,
|
| + const uint8* init_data,
|
| + int init_data_length));
|
| + virtual void KeyMessage(const std::string& key_system,
|
| + const std::string& session_id,
|
| + scoped_array<uint8> message,
|
| + int message_length,
|
| + const std::string& default_url) OVERRIDE;
|
| + virtual void NeedKey(const std::string& key_system,
|
| + const std::string& session_id,
|
| + scoped_array<uint8> init_data,
|
| + int init_data_length) OVERRIDE;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(MockDecryptorClient);
|
| +};
|
| +
|
| // FilterFactory that returns canned instances of mock filters. You can set
|
| // expectations on the filters and then pass the collection into a pipeline.
|
| class MockFilterCollection {
|
|
|