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

Issue 11519040: More unittests passing with new focus controller. (Closed)

Created:
8 years ago by Ben Goodger (Google)
Modified:
8 years ago
Reviewers:
sky
CC:
chromium-reviews, tfarina, alicet1, sadrul, msw+watch_chromium.org, ben+watch_chromium.org
Visibility:
Public.

Description

Get the rest of the ash_unittests to pass with the new FocusController (!) Ash changes: . Active RootWindow as tracked by the shell must only be updated when activation isn't being cleared. . AshFocusRules' method that locates the next window to activate now searches forward and backward from the destroyed window's container. It used to only search forward. . Some tests test for conditions that are no longer valid with the new focus controller, so we put some conditionals into the tests (PanelLayoutManagerTest and WindowManagerTest). . ToplevelWindowEventFilterTest had an incomplete ash environment that wasn't getting all the right logic, so changed it to use full-ash. . BubbleDelegateView needs to remove its observer to avoid a crash. Core logic changes: . A window must be focusable for it to be activatable. For some reason this test had eluded earlier incarnations. . GetActivatableWindow() needs to be able to jump to a modal transient if one is present. . GetFocusableWindow() needs to be able to hop to the next activatable window if the specified window isn't activatable. . Prevent recursion in processing focus/activation changes. . Prevent changing focus to the parent window when a child is focused. R=sky@chromium.org http://crbug.com/162100 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173011

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -58 lines) Patch
M ash/shell.h View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M ash/shell.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M ash/wm/ash_focus_rules.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ash/wm/ash_focus_rules.cc View 1 2 3 4 5 2 chunks +25 lines, -12 lines 0 comments Download
M ash/wm/panel_layout_manager_unittest.cc View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M ash/wm/toplevel_window_event_handler_unittest.cc View 1 2 5 chunks +6 lines, -29 lines 0 comments Download
M ash/wm/window_manager_unittest.cc View 1 2 5 chunks +7 lines, -4 lines 0 comments Download
M ui/views/bubble/bubble_delegate.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/corewm/base_focus_rules.cc View 1 2 3 chunks +23 lines, -2 lines 0 comments Download
M ui/views/corewm/focus_controller.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/corewm/focus_controller.cc View 1 2 5 chunks +27 lines, -5 lines 0 comments Download
M ui/views/corewm/focus_controller_unittest.cc View 1 2 5 chunks +86 lines, -0 lines 0 comments Download
M ui/views/corewm/window_modality_controller.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/corewm/window_modality_controller.cc View 1 2 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Ben Goodger (Google)
8 years ago (2012-12-13 21:23:26 UTC) #1
sky
https://codereview.chromium.org/11519040/diff/21006/ash/shell.cc File ash/shell.cc (right): https://codereview.chromium.org/11519040/diff/21006/ash/shell.cc#newcode901 ash/shell.cc:901: if (gained_active) Does this need to set active_root_window_ to ...
8 years ago (2012-12-13 21:38:05 UTC) #2
Ben Goodger (Google)
We never want to set active_root_window_ to NULL. https://codereview.chromium.org/11519040/diff/21006/ash/wm/ash_focus_rules.cc File ash/wm/ash_focus_rules.cc (right): https://codereview.chromium.org/11519040/diff/21006/ash/wm/ash_focus_rules.cc#newcode131 ash/wm/ash_focus_rules.cc:131: for ...
8 years ago (2012-12-13 21:47:23 UTC) #3
sky
8 years ago (2012-12-13 22:00:25 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld 408576698