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

Unified Diff: content/browser/renderer_host/media/audio_renderer_host_unittest.cc

Issue 12383016: Merge AssociateStreamWithProducer message into CreateStream message for both audio output and input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 | « content/browser/renderer_host/media/audio_renderer_host.cc ('k') | content/common/media/audio_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/audio_renderer_host_unittest.cc
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
index 3031b216463a103954d5f75f6032a64b44864d90..9f1b0af761780e34f4094ee0975626c584a54d84 100644
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
@@ -198,18 +198,16 @@ class AudioRendererHostTest : public testing::Test {
void Create() {
EXPECT_CALL(*observer_,
OnSetAudioStreamStatus(_, kStreamId, "created"));
- // All created streams should ultimately be closed.
- EXPECT_CALL(*observer_,
- OnSetAudioStreamStatus(_, kStreamId, "closed"));
-
- InSequence s;
- // We will first receive an OnStreamCreated() signal.
EXPECT_CALL(*host_, OnStreamCreated(kStreamId, _))
.WillOnce(QuitMessageLoop(message_loop_.get()));
+ EXPECT_CALL(mirroring_manager_,
+ AddDiverter(kRenderProcessId, kRenderViewId, NotNull()))
+ .RetiresOnSaturation();
// Send a create stream message to the audio output stream and wait until
// we receive the created message.
host_->OnCreateStream(kStreamId,
+ kRenderViewId,
media::AudioParameters(
media::AudioParameters::AUDIO_FAKE,
media::CHANNEL_LAYOUT_STEREO,
@@ -217,21 +215,16 @@ class AudioRendererHostTest : public testing::Test {
media::AudioParameters::kAudioCDSampleRate / 10));
message_loop_->Run();
- // Simulate the renderer process associating a stream with a render view.
- EXPECT_CALL(mirroring_manager_,
- RemoveDiverter(kRenderProcessId, MSG_ROUTING_NONE, _))
- .RetiresOnSaturation();
- EXPECT_CALL(mirroring_manager_,
- AddDiverter(kRenderProcessId, kRenderViewId, NotNull()))
- .RetiresOnSaturation();
- host_->OnAssociateStreamWithProducer(kStreamId, kRenderViewId);
- message_loop_->RunUntilIdle();
// At some point in the future, a corresponding RemoveDiverter() call must
// be made.
EXPECT_CALL(mirroring_manager_,
RemoveDiverter(kRenderProcessId, kRenderViewId, NotNull()))
.RetiresOnSaturation();
+ // All created streams should ultimately be closed.
+ EXPECT_CALL(*observer_,
+ OnSetAudioStreamStatus(_, kStreamId, "closed"));
+
// Expect the audio stream will be deleted at some later point.
EXPECT_CALL(*observer_, OnDeleteAudioStream(_, kStreamId));
}
« no previous file with comments | « content/browser/renderer_host/media/audio_renderer_host.cc ('k') | content/common/media/audio_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698