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

Unified Diff: ash/wm/toplevel_window_event_handler_unittest.cc

Issue 2494713003: Reenable Tabdragging tests failing because of IsWindowPositionManaged() (Closed)
Patch Set: Test window position auto managed setting in ash Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698