summaryrefslogtreecommitdiffstats
path: root/ash/accelerators
diff options
context:
space:
mode:
authoroshima <oshima@chromium.org>2015-04-07 16:22:48 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-07 23:23:27 +0000
commitbc374788beea179e18ecdbb190f2099b7494668d (patch)
tree3d83f8723c94d5b35b9d35812dbcb1bd49166de9 /ash/accelerators
parent1b5266d8d43ea002c8b21cec8afbcedeace6b1e0 (diff)
downloadchromium_src-bc374788beea179e18ecdbb190f2099b7494668d.zip
chromium_src-bc374788beea179e18ecdbb190f2099b7494668d.tar.gz
chromium_src-bc374788beea179e18ecdbb190f2099b7494668d.tar.bz2
Allow Alt-Tab to move the focus to docked windows.
BUG=343237 TEST=WindowSelectorTest.BasicWithDocked, plus manual Review URL: https://codereview.chromium.org/1059903002 Cr-Commit-Position: refs/heads/master@{#324155}
Diffstat (limited to 'ash/accelerators')
-rw-r--r--ash/accelerators/accelerator_controller_unittest.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index de0f057..1d731b3 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -653,9 +653,10 @@ TEST_F(AcceleratorControllerTest, CenterWindowAccelerator) {
// Add the window to docked container and try to center it.
window->SetBounds(gfx::Rect(0, 0, 20, 20));
- aura::Window* docked_container = Shell::GetContainer(
- window->GetRootWindow(), kShellWindowId_DockedContainer);
- docked_container->AddChild(window.get());
+ const wm::WMEvent event(wm::WM_EVENT_DOCK);
+ wm::GetWindowState(window.get())->OnWMEvent(&event);
+ EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id());
+
gfx::Rect docked_bounds = window->GetBoundsInScreen();
GetController()->PerformActionIfEnabled(WINDOW_POSITION_CENTER);
// It should not get centered and should remain docked.