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 a601b05b39d1993a8ec09fd131f99dd6c074e8c2..f6abb656337ded79fe1eb5974d057169be203547 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 |
@@ -1012,10 +1012,12 @@ TEST_F(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. |
test_view()->SetSolidColor(SK_ColorBLUE); |
SimulateDrawEvent(); |
ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorBLUE)); |