Chromium Code Reviews| Index: ash/wm/toplevel_window_event_handler_unittest.cc |
| diff --git a/ash/wm/toplevel_window_event_handler_unittest.cc b/ash/wm/toplevel_window_event_handler_unittest.cc |
| index b7c26120d6ecc16f5d91f17c475087f30f1ee2a9..a53086e460b01fe9754315dec5e1450158257e2b 100644 |
| --- a/ash/wm/toplevel_window_event_handler_unittest.cc |
| +++ b/ash/wm/toplevel_window_event_handler_unittest.cc |
| @@ -78,8 +78,22 @@ class ToplevelWindowEventHandlerTest : public AshTestBase { |
| } |
| void DragFromCenterBy(aura::Window* window, int dx, int dy) { |
| + wm::WindowState* window_state = ash::wm::GetWindowState(window); |
| + const bool initial_window_position_managed = |
| + window_state->window_position_managed(); |
|
Mr4D (OOO till 08-26)
2016/11/28 19:32:56
I might be mistaken, but is there any case where t
afakhry
2016/11/28 22:54:25
Thanks for this note. Actually this test is not ve
|
| + |
| ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window); |
| - generator.DragMouseBy(dx, dy); |
| + generator.PressLeftButton(); |
| + generator.MoveMouseBy(dx, dy); |
| + |
| + // Window position auto management should be disabled during the drag. |
| + EXPECT_FALSE(window_state->window_position_managed()); |
| + |
| + generator.ReleaseLeftButton(); |
| + |
| + // And restored to its original value after the drag is complete. |
| + EXPECT_EQ(initial_window_position_managed, |
| + window_state->window_position_managed()); |
| } |
| void TouchDragFromCenterBy(aura::Window* window, int dx, int dy) { |