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

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

Issue 10830335: Fix the flakiness of StopGeneratedStreamsOnChannelClosing on Android bot (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
index e5b31ee83f2c4271d3929382fc27758311face5d..eb56bd9802f317e91d37b0df0fc657be1bdae144 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
@@ -372,13 +372,13 @@ TEST_F(MediaStreamDispatcherHostTest, StopGeneratedStreamsOnChannelClosing) {
size_t generated_streams = 3;
for (size_t i = 0; i < generated_streams; ++i) {
EXPECT_CALL(*host_, OnStreamGenerated(kRenderId, kPageRequestId + i, 0, 1));
+ EXPECT_CALL(*media_observer_.get(), OnCaptureDevicesOpened(_, _, _));
host_->OnGenerateStream(kPageRequestId + i, options);
+
+ // Wait until the stream is generated.
+ WaitForResult();
}
EXPECT_EQ(host_->NumberOfStreams(), generated_streams);
- EXPECT_CALL(*media_observer_.get(), OnCaptureDevicesOpened(_, _, _))
- .Times(3);
- // Wait until the streams are all generated.
- WaitForResult();
// Calling OnChannelClosing() to cancel all the pending/generated streams.
EXPECT_CALL(*media_observer_.get(), OnCaptureDevicesClosed(_, _, _))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698