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

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

Issue 862063002: Reland Queue commands to the Os to start a video device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed valgrind suppression. crbug/450226 Created 5 years, 11 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 | content/browser/renderer_host/media/video_capture_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_host_unittest.cc
diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc
index 6787a385e6ea46b6e1b361559ab4a26e61db4afc..e9d846ae53681c475428ec9d36c9fda4ba27b2a0 100644
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
@@ -431,6 +431,7 @@ class VideoCaptureHostTest : public testing::Test {
host_->OnStartCapture(kDeviceId, opened_session_id_, params);
host_->OnStopCapture(kDeviceId);
run_loop.RunUntilIdle();
+ WaitForVideoDeviceThread();
}
#ifdef DUMP_VIDEO
@@ -493,6 +494,16 @@ class VideoCaptureHostTest : public testing::Test {
base::RunLoop().RunUntilIdle();
}
+ void WaitForVideoDeviceThread() {
+ base::RunLoop run_loop;
+ media_stream_manager_->video_capture_manager()->device_task_runner()
+ ->PostTaskAndReply(
+ FROM_HERE,
+ base::Bind(&base::DoNothing),
+ run_loop.QuitClosure());
+ run_loop.Run();
+ }
+
scoped_refptr<MockVideoCaptureHost> host_;
private:
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698