Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: media/filters/video_renderer_impl_unittest.cc

Issue 566853006: Replace the only use of media::MockStatisticsCB with a bound method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/mock_filters.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_impl_unittest.cc
diff --git a/media/filters/video_renderer_impl_unittest.cc b/media/filters/video_renderer_impl_unittest.cc
index 1df10624094b70c87c7b5e73156b8f0066ccfc8e..92a96f2199f16e1e46a55cdc2f3c43c7a9562fc8 100644
--- a/media/filters/video_renderer_impl_unittest.cc
+++ b/media/filters/video_renderer_impl_unittest.cc
@@ -65,8 +65,6 @@ class VideoRendererImplTest : public ::testing::Test {
EXPECT_CALL(demuxer_stream_, Read(_)).WillRepeatedly(
RunCallback<0>(DemuxerStream::kOk,
scoped_refptr<DecoderBuffer>(new DecoderBuffer(0))));
- EXPECT_CALL(statistics_cb_object_, OnStatistics(_))
- .Times(AnyNumber());
}
virtual ~VideoRendererImplTest() {}
@@ -103,8 +101,8 @@ class VideoRendererImplTest : public ::testing::Test {
&demuxer_stream_,
low_delay,
status_cb,
- base::Bind(&MockStatisticsCB::OnStatistics,
- base::Unretained(&statistics_cb_object_)),
+ base::Bind(&VideoRendererImplTest::OnStatisticsUpdate,
+ base::Unretained(this)),
base::Bind(&StrictMock<MockCB>::BufferingStateChange,
base::Unretained(&mock_cb_)),
ended_event_.GetClosure(),
@@ -251,7 +249,6 @@ class VideoRendererImplTest : public ::testing::Test {
scoped_ptr<VideoRendererImpl> renderer_;
MockVideoDecoder* decoder_; // Owned by |renderer_|.
NiceMock<MockDemuxerStream> demuxer_stream_;
- MockStatisticsCB statistics_cb_object_;
// Use StrictMock<T> to catch missing/extra callbacks.
class MockCB {
@@ -294,6 +291,8 @@ class VideoRendererImplTest : public ::testing::Test {
message_loop_.PostTask(FROM_HERE, callback);
}
+ void OnStatisticsUpdate(const PipelineStatistics& stats) {}
+
base::MessageLoop message_loop_;
// Used to protect |time_|.
« no previous file with comments | « media/base/mock_filters.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698