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

Unified Diff: content/browser/media/capture/web_contents_video_capture_device_unittest.cc

Issue 2603533002: Tab (and AuraWindow) Capture: Capture refresh frame after Resume() (Closed)
Patch Set: Account for behavior change in unit tests. Created 4 years 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/media/capture/web_contents_video_capture_device.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « content/browser/media/capture/web_contents_video_capture_device.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698