X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcontent%2Frenderer%2Fmedia%2Fmock_media_stream_video_source.h;h=449adbd4a57c0a7fb20eb7e07df3a95edc94707d;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=ad7463b6d4c74e516ecd8684ca002da2d9af2836;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/renderer/media/mock_media_stream_video_source.h b/src/content/renderer/media/mock_media_stream_video_source.h index ad7463b..449adbd 100644 --- a/src/content/renderer/media/mock_media_stream_video_source.h +++ b/src/content/renderer/media/mock_media_stream_video_source.h @@ -7,6 +7,8 @@ #include "content/renderer/media/media_stream_video_source.h" +#include "testing/gmock/include/gmock/gmock.h" + namespace content { class MockMediaStreamVideoSource : public MediaStreamVideoSource { @@ -14,6 +16,8 @@ class MockMediaStreamVideoSource : public MediaStreamVideoSource { explicit MockMediaStreamVideoSource(bool manual_get_supported_formats); virtual ~MockMediaStreamVideoSource(); + MOCK_METHOD1(DoSetMutedState, void(bool muted_state)); + // Simulate that the underlying source start successfully. void StartMockedSource(); @@ -38,6 +42,12 @@ class MockMediaStreamVideoSource : public MediaStreamVideoSource { const media::VideoCaptureParams& start_params() const { return params_; } int max_requested_height() const { return max_requested_height_; } int max_requested_width() const { return max_requested_width_; } + double max_requested_frame_rate() const { return max_requested_frame_rate_; } + + void SetMutedState(bool muted_state) { + MediaStreamVideoSource::SetMutedState(muted_state); + DoSetMutedState(muted_state); + } protected: void DeliverVideoFrameOnIO(const scoped_refptr& frame, @@ -49,6 +59,7 @@ class MockMediaStreamVideoSource : public MediaStreamVideoSource { virtual void GetCurrentSupportedFormats( int max_requested_height, int max_requested_width, + double max_requested_frame_rate, const VideoCaptureDeviceFormatsCB& callback) OVERRIDE; virtual void StartSourceImpl( const media::VideoCaptureParams& params, @@ -61,6 +72,7 @@ class MockMediaStreamVideoSource : public MediaStreamVideoSource { bool manual_get_supported_formats_; int max_requested_height_; int max_requested_width_; + double max_requested_frame_rate_; bool attempted_to_start_; VideoCaptureDeviceFormatsCB formats_callback_; VideoCaptureDeliverFrameCB frame_callback_;