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

Unified Diff: media/filters/audio_renderer_impl_unittest.cc

Issue 275673002: Remove completion callbacks from AudioRenderer::Play/Pause(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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/audio_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/audio_renderer_impl_unittest.cc
diff --git a/media/filters/audio_renderer_impl_unittest.cc b/media/filters/audio_renderer_impl_unittest.cc
index 7556fc717189e83001cef2c7531dcad53abafb00..59378704f2f0c638587e9ee7eba0752da6a36b09 100644
--- a/media/filters/audio_renderer_impl_unittest.cc
+++ b/media/filters/audio_renderer_impl_unittest.cc
@@ -229,17 +229,12 @@ class AudioRendererImplTest : public ::testing::Test {
}
void Play() {
- SCOPED_TRACE("Play()");
- WaitableMessageLoopEvent event;
- renderer_->Play(event.GetClosure());
+ renderer_->Play();
renderer_->SetPlaybackRate(1.0f);
- event.RunAndWait();
}
void Pause() {
- WaitableMessageLoopEvent pause_event;
- renderer_->Pause(pause_event.GetClosure());
- pause_event.RunAndWait();
+ renderer_->Pause();
}
void Seek() {
@@ -766,31 +761,6 @@ TEST_F(AudioRendererImplTest, AbortPendingRead_Preroll) {
Preroll(1000, PIPELINE_OK);
}
-TEST_F(AudioRendererImplTest, AbortPendingRead_Pause) {
- Initialize();
-
- Preroll();
- Play();
-
- // Partially drain internal buffer so we get a pending read.
- EXPECT_TRUE(ConsumeBufferedData(frames_buffered() / 2, NULL));
- WaitForPendingRead();
-
- // Start pausing.
- WaitableMessageLoopEvent event;
- renderer_->Pause(event.GetClosure());
-
- // Simulate the decoder aborting the pending read.
- AbortPendingRead();
- event.RunAndWait();
-
- Flush();
-
- // Preroll again to a different timestamp and verify it completed normally.
- Preroll(1000, PIPELINE_OK);
-}
-
-
TEST_F(AudioRendererImplTest, AbortPendingRead_Flush) {
Initialize();
@@ -819,30 +789,6 @@ TEST_F(AudioRendererImplTest, AbortPendingRead_Flush) {
Preroll(1000, PIPELINE_OK);
}
-TEST_F(AudioRendererImplTest, PendingRead_Pause) {
- Initialize();
-
- Preroll();
- Play();
-
- // Partially drain internal buffer so we get a pending read.
- EXPECT_TRUE(ConsumeBufferedData(frames_buffered() / 2, NULL));
- WaitForPendingRead();
-
- // Start pausing.
- WaitableMessageLoopEvent event;
- renderer_->Pause(event.GetClosure());
-
- SatisfyPendingRead(kDataSize);
-
- event.RunAndWait();
-
- Flush();
-
- // Preroll again to a different timestamp and verify it completed normally.
- Preroll(1000, PIPELINE_OK);
-}
-
TEST_F(AudioRendererImplTest, PendingRead_Flush) {
Initialize();
« no previous file with comments | « media/filters/audio_renderer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698