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

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

Issue 2608603002: Reland "Tab (and AuraWindow) Capture: Capture refresh frame after Resume()" (Closed)
Patch Set: REBASE Created 3 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 | « 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 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));
« 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