summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/base/mock_filters.cc11
-rw-r--r--media/base/yuv_convert_unittest.cc2
-rw-r--r--media/filters/video_renderer_base_unittest.cc3
3 files changed, 13 insertions, 3 deletions
diff --git a/media/base/mock_filters.cc b/media/base/mock_filters.cc
index 298892a..ad3bc38 100644
--- a/media/base/mock_filters.cc
+++ b/media/base/mock_filters.cc
@@ -11,6 +11,7 @@
using ::testing::_;
using ::testing::Invoke;
using ::testing::NotNull;
+using ::testing::Return;
namespace media {
@@ -67,7 +68,11 @@ void MockDemuxerFactory::RunBuildCallback(const std::string& url,
}
MockDemuxer::MockDemuxer()
- : total_bytes_(-1), buffered_bytes_(-1), duration_() {}
+ : total_bytes_(-1), buffered_bytes_(-1), duration_() {
+ EXPECT_CALL(*this, GetBitrate()).WillRepeatedly(Return(0));
+ EXPECT_CALL(*this, IsLocalSource()).WillRepeatedly(Return(false));
+ EXPECT_CALL(*this, IsSeekable()).WillRepeatedly(Return(false));
+}
MockDemuxer::~MockDemuxer() {}
@@ -95,7 +100,9 @@ MockDemuxerStream::MockDemuxerStream() {}
MockDemuxerStream::~MockDemuxerStream() {}
-MockVideoDecoder::MockVideoDecoder() {}
+MockVideoDecoder::MockVideoDecoder() {
+ EXPECT_CALL(*this, HasAlpha()).WillRepeatedly(Return(false));
+}
MockVideoDecoder::~MockVideoDecoder() {}
diff --git a/media/base/yuv_convert_unittest.cc b/media/base/yuv_convert_unittest.cc
index 3a74bb2..7d059c7 100644
--- a/media/base/yuv_convert_unittest.cc
+++ b/media/base/yuv_convert_unittest.cc
@@ -358,7 +358,7 @@ TEST(YUVConvertTest, RGB32ToYUV) {
}
// Make sure error is within bound.
- LOG(INFO) << "Average error per channel: " << error / kRGBSize;
+ DVLOG(1) << "Average error per channel: " << error / kRGBSize;
EXPECT_GT(5, error / kRGBSize);
}
diff --git a/media/filters/video_renderer_base_unittest.cc b/media/filters/video_renderer_base_unittest.cc
index 5f395c7..88a1b1a 100644
--- a/media/filters/video_renderer_base_unittest.cc
+++ b/media/filters/video_renderer_base_unittest.cc
@@ -61,6 +61,9 @@ class VideoRendererBaseTest : public ::testing::Test {
EXPECT_CALL(stats_callback_object_, OnStatistics(_))
.Times(AnyNumber());
+
+ EXPECT_CALL(*this, SetOpaqueCBWasCalled(_))
+ .WillRepeatedly(::testing::Return());
}
virtual ~VideoRendererBaseTest() {