Chromium Code Reviews| Index: ash/accelerators/accelerator_controller_unittest.cc |
| diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc |
| index de0f057ba96363599111cc64d945a1a8ab5e6bdd..1d731b3c4f3fc92831b0c20174e0ff120fcb8d2a 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()); |
|
oshima
2015/04/03 23:38:35
This was a bug. This doesn't do what it's intended
|
| + 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. |