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

Unified Diff: trunk/src/media/audio/audio_output_proxy_unittest.cc

Issue 101473002: Revert 238325 "Attempt to fix audio wedges by restarting all str..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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
Index: trunk/src/media/audio/audio_output_proxy_unittest.cc
===================================================================
--- trunk/src/media/audio/audio_output_proxy_unittest.cc (revision 238326)
+++ trunk/src/media/audio/audio_output_proxy_unittest.cc (working copy)
@@ -748,64 +748,4 @@
EXPECT_FALSE(stream3.start_called());
}
-// Ensures the methods used to fix audio output wedges are working correctly.
-TEST_F(AudioOutputResamplerTest, WedgeFix) {
- MockAudioOutputStream stream1(&manager_, params_);
- MockAudioOutputStream stream2(&manager_, params_);
- MockAudioOutputStream stream3(&manager_, params_);
-
- // Setup the mock such that all three streams are successfully created.
- EXPECT_CALL(manager(), MakeAudioOutputStream(_, _, _))
- .WillOnce(Return(&stream1))
- .WillOnce(Return(&stream2))
- .WillOnce(Return(&stream3));
-
- // Stream1 should be able to successfully open and start.
- EXPECT_CALL(stream1, Open())
- .WillOnce(Return(true));
- EXPECT_CALL(stream1, Close());
- EXPECT_CALL(stream1, SetVolume(_));
- EXPECT_CALL(stream2, Open())
- .WillOnce(Return(true));
- EXPECT_CALL(stream2, Close());
-
- // Open and start the first proxy and stream.
- AudioOutputProxy* proxy1 = new AudioOutputProxy(resampler_.get());
- EXPECT_TRUE(proxy1->Open());
- proxy1->Start(&callback_);
- OnStart();
-
- // Open, but do not start the second proxy.
- AudioOutputProxy* proxy2 = new AudioOutputProxy(resampler_.get());
- EXPECT_TRUE(proxy2->Open());
-
- // Wait for stream to timeout and shutdown.
- WaitForCloseTimer(kTestCloseDelayMs);
-
- resampler_->CloseStreamsForWedgeFix();
-
- // Stream3 should take Stream1's place after RestartStreamsForWedgeFix().
- EXPECT_CALL(stream3, Open())
- .WillOnce(Return(true));
- EXPECT_CALL(stream3, Close());
- EXPECT_CALL(stream3, SetVolume(_));
-
- resampler_->RestartStreamsForWedgeFix();
- OnStart();
-
- // Perform the required Stop()/Close() shutdown dance for each proxy.
- proxy2->Close();
- proxy1->Stop();
- proxy1->Close();
-
- // Wait for all of the messages to fly and then verify stream behavior.
- WaitForCloseTimer(kTestCloseDelayMs);
- EXPECT_TRUE(stream1.stop_called());
- EXPECT_TRUE(stream1.start_called());
- EXPECT_FALSE(stream2.stop_called());
- EXPECT_FALSE(stream2.start_called());
- EXPECT_TRUE(stream3.stop_called());
- EXPECT_TRUE(stream3.start_called());
-}
-
} // namespace media
« no previous file with comments | « trunk/src/media/audio/audio_output_dispatcher_impl.cc ('k') | trunk/src/media/audio/audio_output_resampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698