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

Unified Diff: media/filters/video_renderer_impl_unittest.cc

Issue 414583002: VideoRenderer: Fires all pending callbacks in dtor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/filters/video_renderer_impl.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 5bb5f30809756fda6bd77c5c297f5883d9f7b8b2..27a2bfe9552e9746719021de04fc563ee99877c4 100644
--- a/media/filters/video_renderer_impl_unittest.cc
+++ b/media/filters/video_renderer_impl_unittest.cc
@@ -26,10 +26,8 @@
using ::testing::_;
using ::testing::AnyNumber;
-using ::testing::AtLeast;
using ::testing::Invoke;
using ::testing::NiceMock;
-using ::testing::NotNull;
using ::testing::Return;
using ::testing::SaveArg;
using ::testing::StrictMock;
@@ -357,13 +355,8 @@ TEST_F(VideoRendererImplTest, InitializeAndStartPlaying) {
Destroy();
}
-static void ExpectNotCalled(PipelineStatus) {
- base::debug::StackTrace stack;
- ADD_FAILURE() << "Expected callback not to be called\n" << stack.ToString();
-}
-
TEST_F(VideoRendererImplTest, DestroyWhileInitializing) {
- CallInitialize(base::Bind(&ExpectNotCalled), false, PIPELINE_OK);
+ CallInitialize(NewExpectedStatusCB(PIPELINE_ERROR_ABORT), false, PIPELINE_OK);
Destroy();
}
@@ -374,7 +367,7 @@ TEST_F(VideoRendererImplTest, DestroyWhileFlushing) {
EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_ENOUGH));
StartPlaying();
EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_NOTHING));
- renderer_->Flush(base::Bind(&ExpectNotCalled, PIPELINE_OK));
+ renderer_->Flush(NewExpectedClosure());
Destroy();
}
« no previous file with comments | « media/filters/video_renderer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698