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

Unified Diff: ash/wm/toplevel_window_event_filter_unittest.cc

Issue 9421016: Change EventGenerator to take a RootWindow at construction instead of just assuming one via RootWin… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 months 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_filter_unittest.cc
===================================================================
--- ash/wm/toplevel_window_event_filter_unittest.cc (revision 122697)
+++ ash/wm/toplevel_window_event_filter_unittest.cc (working copy)
@@ -97,12 +97,12 @@
}
void DragFromCenterBy(aura::Window* window, int dx, int dy) {
- aura::test::EventGenerator generator(window);
+ aura::test::EventGenerator generator(Shell::GetRootWindow(), window);
generator.DragMouseBy(dx, dy);
}
void TouchDragFromCenterBy(aura::Window* window, int dx, int dy) {
- aura::test::EventGenerator generator(window);
+ aura::test::EventGenerator generator(Shell::GetRootWindow(), window);
generator.PressMoveAndReleaseTouchBy(dx, dy);
}
@@ -150,7 +150,7 @@
window_delegate->set_min_size(gfx::Size(40, 40));
gfx::Point position = w1->bounds().origin();
- aura::test::EventGenerator generator;
+ aura::test::EventGenerator generator(Shell::GetRootWindow());
generator.MoveMouseToCenterOf(w1.get());
generator.DragMouseBy(100, 100);
// Position should not have changed.
@@ -330,7 +330,7 @@
scoped_ptr<aura::Window> w1(CreateWindow(HTCAPTION));
EXPECT_FALSE(window_util::IsWindowMaximized(w1.get()));
- aura::test::EventGenerator generator(w1.get());
+ aura::test::EventGenerator generator(Shell::GetRootWindow(), w1.get());
generator.DoubleClickLeftButton();
EXPECT_TRUE(window_util::IsWindowMaximized(w1.get()));
@@ -385,7 +385,7 @@
// Verifies we don't let windows drag to a -y location.
TEST_F(ToplevelWindowEventFilterTest, DontDragToNegativeY) {
scoped_ptr<aura::Window> target(CreateWindow(HTTOP));
- aura::test::EventGenerator generator(target.get());
+ aura::test::EventGenerator generator(Shell::GetRootWindow(), target.get());
generator.MoveMouseTo(0, 5);
generator.DragMouseBy(0, -5);
// The y location and height should not have changed.
@@ -425,7 +425,7 @@
TEST_F(ToplevelWindowEventFilterTest, DragSnaps) {
filter_->set_grid_size(8);
scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
- aura::test::EventGenerator generator(target.get());
+ aura::test::EventGenerator generator(Shell::GetRootWindow(), target.get());
generator.PressLeftButton();
generator.MoveMouseTo(generator.current_location().Add(gfx::Point(11, 21)));
EXPECT_EQ(11, target->bounds().x());
« no previous file with comments | « ash/wm/system_modal_container_layout_manager_unittest.cc ('k') | ash/wm/window_modality_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698