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

Issue 2986004: [Mac]Port browser_keyevents_browsertest.cc and browser_focus_uitest.cc to Mac. (Closed)

Created:
10 years, 5 months ago by James Su
Modified:
9 years, 7 months ago
CC:
chromium-reviews, John Grabowski, ben+cc_chromium.org, pam+watch_chromium.org, brettw-cc_chromium.org, Paweł Hajdan Jr., Joe
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

[Mac]Port browser_keyevents_browsertest.cc and browser_focus_uitest.cc to Mac. This CL includes: 1. Implementation of ui_test_utils_mac.mm 2. Fix for ui_controls_mac.mm 3. Port browser_keyevents_browsertest.cc to Mac and add some new tests for Mac. 4. Partially port browser_focus_uitest.cc to Mac, now can be compiled and run on Mac but some tests fail. 5. Add two functions into ui_test_utils.h: HideNativeWindow() and ShowAndFocusNativeWindow(). The latter one shows a window and grabs the input focus, which is useful for tests depending on fake keyboard/mouse events. Because browser_keyevents_browsertests.cc and browser_focus_uitest.cc belong to interactive_ui_tests, which is not available on Mac (see http://crbug.com/21276), in order to test them on Mac, you may want to move them into browser_tests locally. But it won't work on build and try bots, because these tests must be run with screen unlocked. This CL depends on CL: http://codereview.chromium.org/2973004 and http://codereview.chromium.org/2805075 BUG=22515 Keyboard handling needs unit tests BUG=48671 interactive_ui_test: BrowserKeyEventsTest.NormalKeyEvents is flaky BUG=48936 Browser window is opened inactivated when running an InProcessBrowserTest. TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=53840

Patch Set 1 #

Total comments: 7

Patch Set 2 : Fix compilation issue on Linux. #

Total comments: 22

Patch Set 3 : Update according to review feedback. #

Total comments: 3

Patch Set 4 : Update comment. #

Patch Set 5 : Enable BrowserFocusTest and BrowserKeyEventsTests on Mac. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1121 lines, -294 lines) Patch
M base/base.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M base/keyboard_code_conversion_gtk.cc View 2 chunks +1 line, -6 lines 0 comments Download
A base/keyboard_code_conversion_mac.h View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
A base/keyboard_code_conversion_mac.mm View 1 2 1 chunk +293 lines, -0 lines 0 comments Download
M chrome/browser/automation/ui_controls.h View 2 chunks +2 lines, -2 lines 0 comments Download
A chrome/browser/automation/ui_controls_internal.h View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
M chrome/browser/automation/ui_controls_linux.cc View 2 chunks +1 line, -21 lines 0 comments Download
M chrome/browser/automation/ui_controls_mac.mm View 1 2 3 11 chunks +205 lines, -65 lines 0 comments Download
M chrome/browser/browser_focus_uitest.cc View 1 2 3 4 22 chunks +71 lines, -31 lines 0 comments Download
M chrome/browser/browser_keyevents_browsertest.cc View 1 2 18 chunks +359 lines, -126 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/data/keyevents_test.html View 5 chunks +17 lines, -8 lines 0 comments Download
M chrome/test/interactive_ui/interactive_ui_tests.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/test/ui_test_utils.h View 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/test/ui_test_utils_linux.cc View 1 chunk +8 lines, -0 lines 0 comments Download
D chrome/test/ui_test_utils_mac.cc View 1 chunk +0 lines, -31 lines 0 comments Download
A chrome/test/ui_test_utils_mac.mm View 1 2 1 chunk +66 lines, -0 lines 0 comments Download
M chrome/test/ui_test_utils_win.cc View 1 2 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
James Su
I finally uploaded this CL, with some unresolved issues :) Please help review it. Regards ...
10 years, 5 months ago (2010-07-14 18:41:07 UTC) #1
Paweł Hajdan Jr.
Drive-by with some minor test comments. http://codereview.chromium.org/2986004/diff/1/10 File chrome/browser/browser_focus_uitest.cc (right): http://codereview.chromium.org/2986004/diff/1/10#newcode318 chrome/browser/browser_focus_uitest.cc:318: HTTPTestServer* server = ...
10 years, 5 months ago (2010-07-14 18:51:00 UTC) #2
John Grabowski
+cc jmikhail since this has implications for Mac WebDriver support From CL description, "But it ...
10 years, 5 months ago (2010-07-14 21:51:49 UTC) #3
James Su
http://codereview.chromium.org/2986004/diff/1/10 File chrome/browser/browser_focus_uitest.cc (right): http://codereview.chromium.org/2986004/diff/1/10#newcode318 chrome/browser/browser_focus_uitest.cc:318: HTTPTestServer* server = StartHTTPServer(); On 2010/07/14 18:51:02, Paweł Hajdan ...
10 years, 5 months ago (2010-07-16 06:47:45 UTC) #4
John Grabowski
Still LGTM http://codereview.chromium.org/2986004/diff/6001/7009 File chrome/browser/browser_focus_uitest.cc (right): http://codereview.chromium.org/2986004/diff/6001/7009#newcode158 chrome/browser/browser_focus_uitest.cc:158: BringBrowserWindowToFront(); On 2010/07/16 06:47:45, James Su wrote: ...
10 years, 5 months ago (2010-07-16 18:17:40 UTC) #5
Nico
Only glossed over, but looked good. http://codereview.chromium.org/2986004/diff/16001/17008 File chrome/browser/automation/ui_controls_mac.mm (right): http://codereview.chromium.org/2986004/diff/16001/17008#newcode76 chrome/browser/automation/ui_controls_mac.mm:76: // Creates and ...
10 years, 5 months ago (2010-07-16 18:24:36 UTC) #6
Paweł Hajdan Jr.
Code I commented in the drive-by LGTM. Thanks for adding the checks in all places, ...
10 years, 5 months ago (2010-07-16 18:34:45 UTC) #7
James Su
On 2010/07/16 18:17:40, John Grabowski wrote: > Still LGTM > > http://codereview.chromium.org/2986004/diff/6001/7009 > File chrome/browser/browser_focus_uitest.cc ...
10 years, 5 months ago (2010-07-16 20:05:39 UTC) #8
Nico
http://codereview.chromium.org/2986004/diff/16001/17009 File chrome/browser/browser_focus_uitest.cc (right): http://codereview.chromium.org/2986004/diff/16001/17009#newcode740 chrome/browser/browser_focus_uitest.cc:740: BringBrowserWindowToFront(); Since you do this in every test, could ...
10 years, 5 months ago (2010-07-19 16:55:55 UTC) #9
James Su
http://codereview.chromium.org/2986004/diff/16001/17009 File chrome/browser/browser_focus_uitest.cc (right): http://codereview.chromium.org/2986004/diff/16001/17009#newcode740 chrome/browser/browser_focus_uitest.cc:740: BringBrowserWindowToFront(); On 2010/07/19 16:55:55, Nico wrote: > Since you ...
10 years, 5 months ago (2010-07-19 17:06:42 UTC) #10
James Su
The CL has been updated to enable these two tests on Mac. Two issues were ...
10 years, 5 months ago (2010-07-21 03:42:30 UTC) #11
John Grabowski
Perhaps you can sync/merge and try again? There are a number of errors which indicate ...
10 years, 5 months ago (2010-07-21 17:02:46 UTC) #12
James Su
I tried but no help. Regards James Su 在 2010年7月21日 上午10:02,John Grabowski <jrg@chromium.org>写道: > Perhaps ...
10 years, 5 months ago (2010-07-21 17:04:22 UTC) #13
Nico
On 2010/07/21 03:42:30, James Su wrote: > The CL has been updated to enable these ...
10 years, 5 months ago (2010-07-21 21:18:33 UTC) #14
James Su
These tests work without any problem on my local machine. Is it ok to commit ...
10 years, 5 months ago (2010-07-21 22:59:09 UTC) #15
Nico
On Wed, Jul 21, 2010 at 3:59 PM, <suzhe@chromium.org> wrote: > These tests work without ...
10 years, 5 months ago (2010-07-21 23:07:02 UTC) #16
James Su
10 years, 5 months ago (2010-07-21 23:12:17 UTC) #17
Sounds good to me.

On 2010/07/21 23:07:02, Nico wrote:
> On Wed, Jul 21, 2010 at 3:59 PM,  <mailto:suzhe@chromium.org> wrote:
> > These tests work without any problem on my local machine. Is it ok to commit
> > this CL now?
> 
> If you're not in a hurry, maybe you could wait until maruel did a
> master restart (scheduled for this weekend). Until then
> interactive_ui_tests isn't running on the bots anyway.
> 
> >
> > http://codereview.chromium.org/2986004/show
> >
>

Powered by Google App Engine
This is Rietveld 408576698