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

Issue 747163002: Port more focus controller unit tests and fix our focus rules. (Closed)

Created:
6 years, 1 month ago by Elliot Glaysher
Modified:
6 years ago
Reviewers:
sky
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Project:
mojo
Visibility:
Public.

Description

Port more focus controller unit tests and fix our focus rules. Now that we're seriously testing the focus controller stuff, the tests are pointing out major problems in our focus rules implementation. This brings our BasicFocusRules up to the aura version, which is needed for the tests ported over. BUG=431047 R=sky@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/d0d96fc2569a45bc290830627331f7757798f318

Patch Set 1 #

Total comments: 4

Patch Set 2 : sky comments. #

Patch Set 3 : Add the window_manager_unittests suite to the list of unittest binaries to run. #

Total comments: 4

Patch Set 4 : Add a TestViewManager and actually extract the ViewManager interface, removing all the static_cast<… #

Patch Set 5 : One more cleanup. #

Patch Set 6 : Do this the unit test way instead. #

Patch Set 7 : Remove O(n) solution with O(1). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+391 lines, -21 lines) Patch
M mojo/tools/data/unittests View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M services/window_manager/basic_focus_rules.h View 1 2 3 4 5 3 chunks +6 lines, -4 lines 0 comments Download
M services/window_manager/basic_focus_rules.cc View 1 2 3 4 5 6 1 chunk +125 lines, -17 lines 0 comments Download
M services/window_manager/focus_controller_unittest.cc View 1 2 3 4 5 5 chunks +256 lines, -0 lines 0 comments Download
M services/window_manager/focus_rules.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
Elliot Glaysher
6 years, 1 month ago (2014-11-21 22:03:21 UTC) #2
sky
https://codereview.chromium.org/747163002/diff/1/mojo/services/window_manager/basic_focus_rules.cc File mojo/services/window_manager/basic_focus_rules.cc (right): https://codereview.chromium.org/747163002/diff/1/mojo/services/window_manager/basic_focus_rules.cc#newcode18 mojo/services/window_manager/basic_focus_rules.cc:18: if (view->GetRoot() == view) I don't get this logic. ...
6 years, 1 month ago (2014-11-21 22:42:19 UTC) #3
sky
I take back my comments on IsDrawn(), it should be correct.
6 years, 1 month ago (2014-11-21 22:48:28 UTC) #4
Elliot Glaysher
https://codereview.chromium.org/747163002/diff/1/mojo/services/window_manager/basic_focus_rules.cc File mojo/services/window_manager/basic_focus_rules.cc (right): https://codereview.chromium.org/747163002/diff/1/mojo/services/window_manager/basic_focus_rules.cc#newcode18 mojo/services/window_manager/basic_focus_rules.cc:18: if (view->GetRoot() == view) On 2014/11/21 22:42:19, sky wrote: ...
6 years ago (2014-11-24 20:29:54 UTC) #5
sky
https://codereview.chromium.org/747163002/diff/40001/mojo/services/window_manager/basic_focus_rules.cc File mojo/services/window_manager/basic_focus_rules.cc (right): https://codereview.chromium.org/747163002/diff/40001/mojo/services/window_manager/basic_focus_rules.cc#newcode17 mojo/services/window_manager/basic_focus_rules.cc:17: bool ViewCanFocus(View* view) { This name is awful. CanFocusView ...
6 years ago (2014-11-24 21:49:27 UTC) #6
Elliot Glaysher
https://codereview.chromium.org/747163002/diff/40001/mojo/services/window_manager/basic_focus_rules.cc File mojo/services/window_manager/basic_focus_rules.cc (right): https://codereview.chromium.org/747163002/diff/40001/mojo/services/window_manager/basic_focus_rules.cc#newcode20 mojo/services/window_manager/basic_focus_rules.cc:20: if (view->GetRoot() == view) On 2014/11/24 21:49:27, sky wrote: ...
6 years ago (2014-11-25 00:15:26 UTC) #7
Elliot Glaysher
OK, this redoes how we test for roots. While working on the app test version, ...
6 years ago (2014-12-02 23:38:24 UTC) #8
sky
LGTM
6 years ago (2014-12-02 23:59:30 UTC) #9
Elliot Glaysher
6 years ago (2014-12-03 00:03:00 UTC) #10
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as
d0d96fc2569a45bc290830627331f7757798f318 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698