Index: content/browser/media/capture/web_contents_video_capture_device_unittest.cc |
diff --git a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc |
index 38430287a0044d3cf6c21d3964d4b3a2fb51c092..c08abe49f86106012e729c9c33671c948c28e22f 100644 |
--- a/content/browser/media/capture/web_contents_video_capture_device_unittest.cc |
+++ b/content/browser/media/capture/web_contents_video_capture_device_unittest.cc |
@@ -1234,10 +1234,12 @@ TEST_F(MAYBE_WebContentsVideoCaptureDeviceTest, SuspendsAndResumes) { |
SimulateDrawEvent(); |
base::RunLoop().RunUntilIdle(); |
- // Resume capture and then draw a BLUE frame and wait for it to be captured. |
- device()->Resume(); |
- base::RunLoop().RunUntilIdle(); |
+ // Resume capture and expect a GREEN update frame to be captured. |
client_observer()->SetIsExpectingFrames(true); |
+ device()->Resume(); |
+ ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); |
+ |
+ // Draw a BLUE frame and wait for it to be captured. |
source()->SetSolidColor(SK_ColorBLUE); |
SimulateDrawEvent(); |
ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorBLUE)); |