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

Issue 2337073007: Deflaky ScreenCapturerTest (Closed)

Created:
4 years, 3 months ago by Hzj_jie
Modified:
4 years, 2 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Deflaky ScreenCapturerTest ScreenCapturer tests may fail on trybot, so this change is to fix the issue. Changes include, 1. Sometimes, a capturer may capture part of the change, i.e. usually the draw actions are not atomic. So the updated_region may be inaccurate. So I have added a MayDrawIncompleteShapes() function in ScreenDrawer. If it returns false, the updated_region check will be ignored. 2. Several test cases may run concurrently, which makes one ScreenDrawer won't really work. Its window may be covered by another ScreenDrawer. So I have added a system wide lock to ensure only one ScreenDrawer is working at a certain time. 3. On unity (Linux), the top several pixels of a window may be covered by a shadow effect if the window is not focused. So I have added a BringToFront() function, and call it in WaitForPendingDraws(). 4. On Windows, the drawn shapes are 'temporary drawing', which will be erased once the window is covered by another one. So I repeat DrawRectangle() function call in the test case. TODO(zijiehe): The DISABLED_ prefixes will be added back after the code review. And I will move these test cases into modules_test in a coming change. BUG=647067 Committed: https://crrev.com/6a4607e1006560ce598f1e1d79fd120308b9e67f Cr-Commit-Position: refs/heads/master@{#14674}

Patch Set 1 : The DISABLED_ prefixes will be added back #

Total comments: 2

Patch Set 2 : Resolve review comments #

Total comments: 6

Patch Set 3 : Use TOPMOST for both Linux and Windows #

Patch Set 4 : Still disable real screen capturer tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -20 lines) Patch
M webrtc/modules/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/screen_capturer_unittest.cc View 1 2 3 4 chunks +29 lines, -13 lines 0 comments Download
M webrtc/modules/desktop_capture/screen_drawer.h View 1 2 2 chunks +23 lines, -2 lines 0 comments Download
A + webrtc/modules/desktop_capture/screen_drawer.cc View 1 2 1 chunk +13 lines, -5 lines 0 comments Download
M webrtc/modules/desktop_capture/screen_drawer_linux.cc View 1 2 5 chunks +66 lines, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/screen_drawer_mac.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/modules/desktop_capture/screen_drawer_win.cc View 1 2 5 chunks +60 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (36 generated)
Hzj_jie
4 years, 2 months ago (2016-10-12 19:12:08 UTC) #29
Hzj_jie
Adding Jamie in the review.
4 years, 2 months ago (2016-10-12 23:08:25 UTC) #31
Jamie
I haven't looked at the code yet, but based on your CL description I have ...
4 years, 2 months ago (2016-10-12 23:43:56 UTC) #32
Hzj_jie
On 2016/10/12 23:43:56, Jamie wrote: > I haven't looked at the code yet, but based ...
4 years, 2 months ago (2016-10-13 00:11:19 UTC) #33
Hzj_jie
On 2016/10/13 00:11:19, Hzj_jie wrote: > On 2016/10/12 23:43:56, Jamie wrote: > > I haven't ...
4 years, 2 months ago (2016-10-13 04:39:55 UTC) #35
Sergey Ulanov
It looks to me that this change solves the problem in the case when two ...
4 years, 2 months ago (2016-10-14 17:38:25 UTC) #36
kjellander_webrtc
On 2016/10/14 17:38:25, Sergey Ulanov wrote: > It looks to me that this change solves ...
4 years, 2 months ago (2016-10-17 11:47:15 UTC) #37
Hzj_jie
On 2016/10/17 11:47:15, kjellander_webrtc wrote: > On 2016/10/14 17:38:25, Sergey Ulanov wrote: > > It ...
4 years, 2 months ago (2016-10-17 22:05:32 UTC) #38
Sergey Ulanov
LGTM, but please see my suggestion about making the test windows always on top https://codereview.chromium.org/2337073007/diff/500001/webrtc/modules/desktop_capture/screen_drawer.cc ...
4 years, 2 months ago (2016-10-18 03:26:56 UTC) #41
kjellander_webrtc
On 2016/10/17 22:05:32, Hzj_jie wrote: > On 2016/10/17 11:47:15, kjellander_webrtc wrote: > > On 2016/10/14 ...
4 years, 2 months ago (2016-10-18 05:02:08 UTC) #42
Hzj_jie
On 2016/10/18 05:02:08, kjellander_webrtc wrote: > On 2016/10/17 22:05:32, Hzj_jie wrote: > > On 2016/10/17 ...
4 years, 2 months ago (2016-10-18 18:51:20 UTC) #43
Hzj_jie
On 2016/10/18 18:51:20, Hzj_jie wrote: > On 2016/10/18 05:02:08, kjellander_webrtc wrote: > > On 2016/10/17 ...
4 years, 2 months ago (2016-10-19 00:46:38 UTC) #44
Hzj_jie
https://codereview.chromium.org/2337073007/diff/440001/webrtc/modules/desktop_capture/screen_drawer_win.cc File webrtc/modules/desktop_capture/screen_drawer_win.cc (right): https://codereview.chromium.org/2337073007/diff/440001/webrtc/modules/desktop_capture/screen_drawer_win.cc#newcode37 webrtc/modules/desktop_capture/screen_drawer_win.cc:37: ScreenDrawerLock::ScreenDrawerLock() { On 2016/10/14 17:38:25, Sergey Ulanov wrote: > ...
4 years, 2 months ago (2016-10-19 00:46:47 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2337073007/540001
4 years, 2 months ago (2016-10-19 00:49:42 UTC) #48
commit-bot: I haz the power
Committed patchset #4 (id:540001)
4 years, 2 months ago (2016-10-19 01:22:22 UTC) #50
commit-bot: I haz the power
4 years, 2 months ago (2016-10-19 01:22:33 UTC) #52
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/6a4607e1006560ce598f1e1d79fd120308b9e67f
Cr-Commit-Position: refs/heads/master@{#14674}

Powered by Google App Engine
This is Rietveld 408576698