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

Issue 2922773002: Add BrowserCommandController Interactive Test (Closed)

Created:
3 years, 6 months ago by Hzj_jie
Modified:
3 years, 5 months ago
Reviewers:
msw, sky, tapted
CC:
chromium-reviews, Paweł Hajdan Jr., jam
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add BrowserCommandController Interactive Test BrowserCommandController interactive test ensures the recent changes of browser shortcuts in fullscreen won't be broken by unexpected changes. It starts a full screen browser window, sends several key events normally consumed by browser, and checks whether these events are caught by the web page. BUG=680809 Review-Url: https://codereview.chromium.org/2922773002 Cr-Commit-Position: refs/heads/master@{#486949} Committed: https://chromium.googlesource.com/chromium/src/+/bb317b9cc0055f7abebcd014dfb6c193548b4d88

Patch Set 1 #

Total comments: 28

Patch Set 2 : Resolve review comments #

Patch Set 3 : msvc does not support recursive #if #

Total comments: 68

Patch Set 4 : Resolve review comments #

Patch Set 5 : Resolve review comments #

Patch Set 6 : Update bug id #

Patch Set 7 : Remove debug log #

Patch Set 8 : Build break on platforms other than MacOSX #

Total comments: 12

Patch Set 9 : Resolve review comments #

Patch Set 10 : Do not exiting fullscreen on OS10.9 or earlier #

Total comments: 6

Patch Set 11 : git cl format #

Total comments: 7

Patch Set 12 : Resolve review comments #

Patch Set 13 : Update getKeyEventReport() logic #

Total comments: 22

Patch Set 14 : Try to remove "output = nullptr;" #

Patch Set 15 : Resolve review comments #

Patch Set 16 : Resolve review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+439 lines, -0 lines) Patch
A chrome/browser/ui/browser_command_controller_interactive_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +336 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/fullscreen_keyboardlock.html View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +102 lines, -0 lines 0 comments Download

Messages

Total messages: 260 (228 generated)
Hzj_jie
3 years, 6 months ago (2017-06-06 03:34:06 UTC) #30
msw
Sorry I don't have any great ideas for making these tests more reliable and consistent, ...
3 years, 6 months ago (2017-06-06 20:32:07 UTC) #31
msw
Oh and thank you for adding tests!!!
3 years, 6 months ago (2017-06-06 20:32:23 UTC) #32
Hzj_jie
Though there are some inconsistent behavior on MacOSX and ChromeOS, they are covered by bugs ...
3 years, 5 months ago (2017-06-28 00:34:44 UTC) #162
msw
Thanks for working on these tests, it will be good to have this coverage. tapted: ...
3 years, 5 months ago (2017-06-30 20:17:29 UTC) #172
Hzj_jie
https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode30 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:30: "/fullscreen_keyboardlock/fullscreen_keyboardlock.html"; On 2017/06/30 20:17:29, msw wrote: > It seems ...
3 years, 5 months ago (2017-07-01 01:56:48 UTC) #177
tapted
https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode146 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:146: ASSERT_TRUE(chrome::ExecuteCommand(browser(), IDC_FULLSCREEN)); On 2017/07/01 01:56:47, Hzj_jie wrote: > On ...
3 years, 5 months ago (2017-07-03 00:57:47 UTC) #178
Hzj_jie
Thank you for the comments. I will investigate the IN_PROC_BROWSER_TEST_P(PermissionBubbleInteractiveUITest, CmdWClosesWindow) test tomorrow. https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File ...
3 years, 5 months ago (2017-07-03 05:08:15 UTC) #179
tapted
https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode236 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:236: // TODO(zijiehe): Investigate why inconsistent key event sequence has ...
3 years, 5 months ago (2017-07-03 05:52:41 UTC) #180
Hzj_jie
https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode236 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:236: // TODO(zijiehe): Investigate why inconsistent key event sequence has ...
3 years, 5 months ago (2017-07-03 20:08:15 UTC) #181
tapted
https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode236 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:236: // TODO(zijiehe): Investigate why inconsistent key event sequence has ...
3 years, 5 months ago (2017-07-03 23:22:17 UTC) #182
Hzj_jie
On 2017/07/03 23:22:17, tapted wrote: > https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc > File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc > (right): > > https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode236 ...
3 years, 5 months ago (2017-07-04 01:25:59 UTC) #191
msw
Thank you for continuing to refine these tests! https://codereview.chromium.org/2922773002/diff/630001/chrome/test/data/fullscreen_keyboardlock/fullscreen_keyboardlock.html File chrome/test/data/fullscreen_keyboardlock/fullscreen_keyboardlock.html (right): https://codereview.chromium.org/2922773002/diff/630001/chrome/test/data/fullscreen_keyboardlock/fullscreen_keyboardlock.html#newcode64 chrome/test/data/fullscreen_keyboardlock/fullscreen_keyboardlock.html:64: } ...
3 years, 5 months ago (2017-07-05 19:11:45 UTC) #196
Hzj_jie
https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode146 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:146: ASSERT_TRUE(chrome::ExecuteCommand(browser(), IDC_FULLSCREEN)); On 2017/07/03 00:57:47, tapted wrote: > On ...
3 years, 5 months ago (2017-07-07 23:18:10 UTC) #213
msw
lgtm with minor comments, thanks! https://codereview.chromium.org/2922773002/diff/730001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/730001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode122 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:122: // 1. ui_controls_mac.mm puts ...
3 years, 5 months ago (2017-07-10 18:48:17 UTC) #214
Hzj_jie
Add Pawel for chrome/test/ changes. https://codereview.chromium.org/2922773002/diff/730001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/730001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode122 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:122: // 1. ui_controls_mac.mm puts ...
3 years, 5 months ago (2017-07-11 02:46:07 UTC) #218
Paweł Hajdan Jr.
+jam to advise on making the tests robust Some initial review comments seem to suggest ...
3 years, 5 months ago (2017-07-11 11:59:57 UTC) #222
Hzj_jie
https://codereview.chromium.org/2922773002/diff/790001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/790001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode108 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:108: AddTabAtIndex(1, GURL("about:blank"), ui::PAGE_TRANSITION_LINK); On 2017/07/11 11:59:57, Paweł Hajdan Jr. ...
3 years, 5 months ago (2017-07-11 17:47:26 UTC) #225
Hzj_jie
https://codereview.chromium.org/2922773002/diff/790001/chrome/test/data/fullscreen_keyboardlock.html File chrome/test/data/fullscreen_keyboardlock.html (right): https://codereview.chromium.org/2922773002/diff/790001/chrome/test/data/fullscreen_keyboardlock.html#newcode16 chrome/test/data/fullscreen_keyboardlock.html:16: window.setTimeout(() => { On 2017/07/11 17:47:26, Hzj_jie wrote: > ...
3 years, 5 months ago (2017-07-12 02:41:06 UTC) #230
Hzj_jie
Ping
3 years, 5 months ago (2017-07-12 19:32:09 UTC) #233
Hzj_jie
Pawel and John may not have time these days to review this change. Scott, would ...
3 years, 5 months ago (2017-07-13 17:39:11 UTC) #235
sky
https://codereview.chromium.org/2922773002/diff/830001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/830001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode47 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:47: output = nullptr; Are you sure this is really ...
3 years, 5 months ago (2017-07-13 20:33:26 UTC) #236
Hzj_jie
https://codereview.chromium.org/2922773002/diff/830001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc File chrome/browser/ui/browser_command_controller_interactive_browsertest.cc (right): https://codereview.chromium.org/2922773002/diff/830001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc#newcode47 chrome/browser/ui/browser_command_controller_interactive_browsertest.cc:47: output = nullptr; On 2017/07/13 20:33:25, sky wrote: > ...
3 years, 5 months ago (2017-07-13 23:05:12 UTC) #243
sky
I prefer the TabCountObserver. It's clearer what you are waiting for and results in running ...
3 years, 5 months ago (2017-07-14 00:03:37 UTC) #244
sky
Also, TabCountObserver is similar to other patterns in the code (and in the test you ...
3 years, 5 months ago (2017-07-14 00:09:28 UTC) #245
Hzj_jie
There was a TabCountObserver (https://codereview.chromium.org/2922773002/diff/630001/chrome/browser/ui/browser_command_controller_interactive_browsertest.cc). But since adding tab is synchronous, do you still prefer ...
3 years, 5 months ago (2017-07-14 00:24:51 UTC) #248
sky
My mistake. As adding tabs is sync no need for the extra complexity. -Scott On ...
3 years, 5 months ago (2017-07-14 04:44:50 UTC) #251
Hzj_jie
Scott, is this change LGTU now?
3 years, 5 months ago (2017-07-14 21:41:24 UTC) #252
sky
Yes, LGTM
3 years, 5 months ago (2017-07-14 23:47:37 UTC) #253
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2922773002/890001
3 years, 5 months ago (2017-07-14 23:56:19 UTC) #256
commit-bot: I haz the power
Committed patchset #16 (id:890001) as https://chromium.googlesource.com/chromium/src/+/bb317b9cc0055f7abebcd014dfb6c193548b4d88
3 years, 5 months ago (2017-07-15 00:02:50 UTC) #259
Hzj_jie
3 years, 5 months ago (2017-07-15 00:08:46 UTC) #260
Message was sent while issue was closed.
On 2017/07/14 23:47:37, sky wrote:
> Yes, LGTM

Thank you all. Go ahead to submit.

Powered by Google App Engine
This is Rietveld 408576698