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

Issue 23542008: Add a CodeToNativeKeycode helper that converts UIEvent code to native code. (Closed)

Created:
7 years, 3 months ago by weitao
Modified:
7 years, 3 months ago
CC:
chromium-reviews, jamiewalch+watch_chromium.org, garykac+watch_chromium.org, sanjeevr, yusukes+watch_chromium.org, dcaiafa+watch_chromium.org, wez+watch_chromium.org, amit, hclam+watch_chromium.org, jam, penghuang+watch_chromium.org, joi+watch-content_chromium.org, nona+watch_chromium.org, lambroslambrou+watch_chromium.org, darin-cc_chromium.org, weitaosu+watch_chromium.org, rmsousa+watch_chromium.org, alexeypa+watch_chromium.org, James Su, sergeyu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add a CodeToNativeKeycode helper that converts UIEvent code to native code. Also add a SimulateKeyPress helper for browser_tests that takes both a UIEvent |code| and a ui::KeyboardCode. BUG=284754 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=222168 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=222435

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressing CR feedback #

Total comments: 30

Patch Set 3 : Addressing CR feedback. #

Total comments: 2

Patch Set 4 : Addressing CR feedback. #

Total comments: 2

Patch Set 5 : Addressing CR feedback. #

Total comments: 8

Patch Set 6 : Addressing CR feedback. #

Total comments: 4

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : Fixing unittests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -112 lines) Patch
M content/public/test/browser_test_utils.h View 1 2 3 4 5 6 1 chunk +26 lines, -1 line 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 6 7 4 chunks +54 lines, -9 lines 0 comments Download
M remoting/test/remote_desktop_browsertest.h View 1 2 3 4 1 chunk +8 lines, -8 lines 0 comments Download
M remoting/test/remote_desktop_browsertest.cc View 1 2 3 4 2 chunks +10 lines, -94 lines 0 comments Download
M ui/base/keycodes/usb_keycode_map.h View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M ui/base/keycodes/usb_keycode_map_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
weitao
7 years, 3 months ago (2013-09-04 22:29:58 UTC) #1
garykac
https://codereview.chromium.org/23542008/diff/1/ui/base/keycodes/usb_keycode_map.h File ui/base/keycodes/usb_keycode_map.h (right): https://codereview.chromium.org/23542008/diff/1/ui/base/keycodes/usb_keycode_map.h#newcode442 ui/base/keycodes/usb_keycode_map.h:442: inline uint16_t CodeToNativeKeycode(const char* code) { Please move this ...
7 years, 3 months ago (2013-09-04 23:04:03 UTC) #2
garykac
LGTM after comments are addressed.
7 years, 3 months ago (2013-09-04 23:04:25 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/weitaosu@chromium.org/23542008/7001
7 years, 3 months ago (2013-09-04 23:16:43 UTC) #4
weitao
Tommi, could you please review the change in browser_test_utils? The chromoting client uses the native ...
7 years, 3 months ago (2013-09-04 23:41:27 UTC) #5
Wez
issue= line needs replacing with a BUG= line with the relevant bug numbers (e.g. 283609, ...
7 years, 3 months ago (2013-09-04 23:59:12 UTC) #6
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=23825
7 years, 3 months ago (2013-09-05 00:02:20 UTC) #7
Wez
not LGTM https://codereview.chromium.org/23542008/diff/7001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/23542008/diff/7001/content/public/test/browser_test_utils.cc#newcode177 content/public/test/browser_test_utils.cc:177: bool command) { Why do you need ...
7 years, 3 months ago (2013-09-05 00:16:33 UTC) #8
weitao
PTAL. https://codereview.chromium.org/23542008/diff/7001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/23542008/diff/7001/content/public/test/browser_test_utils.cc#newcode177 content/public/test/browser_test_utils.cc:177: bool command) { On 2013/09/05 00:16:33, Wez wrote: ...
7 years, 3 months ago (2013-09-05 07:49:16 UTC) #9
Sergey Ulanov
drive-by nit https://codereview.chromium.org/23542008/diff/21001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/23542008/diff/21001/content/public/test/browser_test_utils.cc#newcode287 content/public/test/browser_test_utils.cc:287: SimulateKeyPressWithCode(web_contents, nit: there is no need to ...
7 years, 3 months ago (2013-09-05 16:18:16 UTC) #10
weitao
https://codereview.chromium.org/23542008/diff/21001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/23542008/diff/21001/content/public/test/browser_test_utils.cc#newcode287 content/public/test/browser_test_utils.cc:287: SimulateKeyPressWithCode(web_contents, On 2013/09/05 16:18:16, Sergey Ulanov wrote: > nit: ...
7 years, 3 months ago (2013-09-05 16:46:33 UTC) #11
Wez
LGTM w/ nits https://codereview.chromium.org/23542008/diff/7001/remoting/test/remote_desktop_browsertest.h File remoting/test/remote_desktop_browsertest.h (right): https://codereview.chromium.org/23542008/diff/7001/remoting/test/remote_desktop_browsertest.h#newcode92 remoting/test/remote_desktop_browsertest.h:92: bool command); On 2013/09/05 07:49:17, weitaosu ...
7 years, 3 months ago (2013-09-05 19:07:00 UTC) #12
weitao
Thanks Gary and Wez for your CRs. Tommi, could you please review the changes in ...
7 years, 3 months ago (2013-09-05 22:02:08 UTC) #13
tommi (sloooow) - chröme
Actually I'm not owner for browser_test_utils.cc, so I can't stamp this. Check the owners file ...
7 years, 3 months ago (2013-09-06 06:36:38 UTC) #14
weitao
Sky, could you please review the changes in browser_tests? Thanks Tommi! For some reason "git ...
7 years, 3 months ago (2013-09-06 17:59:34 UTC) #15
sky
I'm not an owner for any of the browser tests.
7 years, 3 months ago (2013-09-06 20:55:38 UTC) #16
Wez
On 2013/09/06 20:55:38, sky wrote: > I'm not an owner for any of the browser ...
7 years, 3 months ago (2013-09-06 20:58:12 UTC) #17
sky
https://codereview.chromium.org/23542008/diff/12001/content/public/test/browser_test_utils.h File content/public/test/browser_test_utils.h (right): https://codereview.chromium.org/23542008/diff/12001/content/public/test/browser_test_utils.h#newcode94 content/public/test/browser_test_utils.h:94: void SimulateKeyPressWithCode(WebContents* web_contents, Style guide says in general we ...
7 years, 3 months ago (2013-09-06 22:00:28 UTC) #18
weitao
https://codereview.chromium.org/23542008/diff/12001/content/public/test/browser_test_utils.h File content/public/test/browser_test_utils.h (right): https://codereview.chromium.org/23542008/diff/12001/content/public/test/browser_test_utils.h#newcode94 content/public/test/browser_test_utils.h:94: void SimulateKeyPressWithCode(WebContents* web_contents, The two methods have different names: ...
7 years, 3 months ago (2013-09-06 23:03:50 UTC) #19
sky
https://codereview.chromium.org/23542008/diff/12001/content/public/test/browser_test_utils.h File content/public/test/browser_test_utils.h (right): https://codereview.chromium.org/23542008/diff/12001/content/public/test/browser_test_utils.h#newcode94 content/public/test/browser_test_utils.h:94: void SimulateKeyPressWithCode(WebContents* web_contents, Good point. Both take codes though. ...
7 years, 3 months ago (2013-09-08 02:29:02 UTC) #20
weitao
Scott, I added some comments around the two APIs. I don't think I can explain ...
7 years, 3 months ago (2013-09-09 19:05:58 UTC) #21
sky
LGTM
7 years, 3 months ago (2013-09-09 19:32:04 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/weitaosu@chromium.org/23542008/54001
7 years, 3 months ago (2013-09-09 20:06:29 UTC) #23
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-09-09 20:33:28 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/weitaosu@chromium.org/23542008/31001
7 years, 3 months ago (2013-09-09 22:09:26 UTC) #25
commit-bot: I haz the power
Change committed as 222168
7 years, 3 months ago (2013-09-10 01:18:00 UTC) #26
please use gerrit instead
On 2013/09/10 01:18:00, I haz the power (commit-bot) wrote: > Change committed as 222168 This ...
7 years, 3 months ago (2013-09-10 02:58:32 UTC) #27
please use gerrit instead
UsbKeycodeMap.Basic: base\keycodes\usb_keycode_map_unittest.cc(36): error: Value of: "Unidentified" Actual: 00B40D98 Expected: InvalidKeyboardEventCode() Which is: 00AA90D4
7 years, 3 months ago (2013-09-10 02:59:27 UTC) #28
please use gerrit instead
On 2013/09/10 02:59:27, Rouslan Solomakhin wrote: > UsbKeycodeMap.Basic: > base\keycodes\usb_keycode_map_unittest.cc(36): error: Value of: "Unidentified" > ...
7 years, 3 months ago (2013-09-10 03:10:02 UTC) #29
xhwang
drive-by nits: we use BUG= instead of issue= in the CL description.
7 years, 3 months ago (2013-09-10 15:39:25 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/weitaosu@chromium.org/23542008/86001
7 years, 3 months ago (2013-09-10 17:03:55 UTC) #31
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=75845
7 years, 3 months ago (2013-09-10 20:27:05 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/weitaosu@chromium.org/23542008/86001
7 years, 3 months ago (2013-09-10 23:39:31 UTC) #33
commit-bot: I haz the power
7 years, 3 months ago (2013-09-11 01:02:12 UTC) #34
Message was sent while issue was closed.
Change committed as 222435

Powered by Google App Engine
This is Rietveld 408576698