summaryrefslogtreecommitdiffstats
path: root/ash/wm
diff options
context:
space:
mode:
Diffstat (limited to 'ash/wm')
-rw-r--r--ash/wm/app_list_controller_unittest.cc7
-rw-r--r--ash/wm/dock/docked_window_resizer_unittest.cc4
-rw-r--r--ash/wm/gestures/overview_gesture_handler_unittest.cc12
-rw-r--r--ash/wm/immersive_fullscreen_controller_unittest.cc10
-rw-r--r--ash/wm/lock_state_controller_unittest.cc5
-rw-r--r--ash/wm/maximize_mode/maximize_mode_controller_unittest.cc4
-rw-r--r--ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc16
-rw-r--r--ash/wm/overview/window_selector_unittest.cc16
-rw-r--r--ash/wm/panels/panel_layout_manager_unittest.cc4
-rw-r--r--ash/wm/partial_screenshot_view_unittest.cc6
-rw-r--r--ash/wm/resize_shadow_and_cursor_unittest.cc10
-rw-r--r--ash/wm/system_gesture_event_filter_unittest.cc23
-rw-r--r--ash/wm/system_modal_container_layout_manager_unittest.cc20
-rw-r--r--ash/wm/toplevel_window_event_handler_unittest.cc57
-rw-r--r--ash/wm/window_manager_unittest.cc28
-rw-r--r--ash/wm/window_modality_controller_unittest.cc26
-rw-r--r--ash/wm/workspace/multi_window_resize_controller_unittest.cc12
-rw-r--r--ash/wm/workspace/workspace_event_handler_unittest.cc38
-rw-r--r--ash/wm/workspace/workspace_window_resizer_unittest.cc20
-rw-r--r--ash/wm/workspace_controller_unittest.cc22
20 files changed, 164 insertions, 176 deletions
diff --git a/ash/wm/app_list_controller_unittest.cc b/ash/wm/app_list_controller_unittest.cc
index da663d6..05ceae3 100644
--- a/ash/wm/app_list_controller_unittest.cc
+++ b/ash/wm/app_list_controller_unittest.cc
@@ -11,9 +11,9 @@
#include "base/memory/scoped_ptr.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/views/app_list_view.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
+#include "ui/events/test/event_generator.h"
namespace ash {
@@ -86,8 +86,7 @@ TEST_P(AppListControllerTest, ClickOutsideBubbleClosesBubble) {
aura::Window* app_window = shell->GetAppListWindow();
ASSERT_TRUE(app_window);
- aura::test::EventGenerator generator(shell->GetPrimaryRootWindow(),
- app_window);
+ ui::test::EventGenerator generator(shell->GetPrimaryRootWindow(), app_window);
// Click on the bubble itself. The bubble should remain visible.
generator.ClickLeftButton();
EXPECT_TRUE(shell->GetAppListTargetVisibility());
@@ -112,7 +111,7 @@ TEST_P(AppListControllerTest, TapOutsideBubbleClosesBubble) {
ASSERT_TRUE(app_window);
gfx::Rect app_window_bounds = app_window->GetBoundsInRootWindow();
- aura::test::EventGenerator generator(shell->GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(shell->GetPrimaryRootWindow());
// Click on the bubble itself. The bubble should remain visible.
generator.GestureTapAt(app_window_bounds.CenterPoint());
EXPECT_TRUE(shell->GetAppListTargetVisibility());
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc
index 82489dc..98c70b0 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -28,11 +28,11 @@
#include "base/command_line.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/window_tree_client.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/hit_test.h"
#include "ui/base/ui_base_types.h"
+#include "ui/events/test/event_generator.h"
#include "ui/views/widget/widget.h"
#include "ui/wm/core/window_util.h"
@@ -1588,7 +1588,7 @@ TEST_P(DockedWindowResizerTest, MaximizedDuringDrag) {
// ToplevelWindowEventHandler::ScopedWindowResizer::OnWindowStateTypeChanged()
// must be called in order for the maximized window's size to be correct.
delegate()->set_window_component(HTCAPTION);
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseTo(window->GetBoundsInScreen().origin());
generator.PressLeftButton();
generator.MoveMouseBy(10, 10);
diff --git a/ash/wm/gestures/overview_gesture_handler_unittest.cc b/ash/wm/gestures/overview_gesture_handler_unittest.cc
index 0c0ee28..6c1412b 100644
--- a/ash/wm/gestures/overview_gesture_handler_unittest.cc
+++ b/ash/wm/gestures/overview_gesture_handler_unittest.cc
@@ -6,11 +6,11 @@
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/overview/window_selector_controller.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
+#include "ui/events/test/event_generator.h"
#include "ui/views/widget/widget.h"
namespace ash {
@@ -42,7 +42,7 @@ TEST_F(OverviewGestureHandlerTest, VerticalSwipes) {
aura::Window* root_window = Shell::GetPrimaryRootWindow();
scoped_ptr<aura::Window> window1(CreateWindow(bounds));
scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- aura::test::EventGenerator generator(root_window, root_window);
+ ui::test::EventGenerator generator(root_window, root_window);
generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5),
0, -500, 100, 3);
EXPECT_TRUE(IsSelecting());
@@ -69,7 +69,7 @@ TEST_F(OverviewGestureHandlerTest, HorizontalSwipes) {
aura::Window* root_window = Shell::GetPrimaryRootWindow();
scoped_ptr<aura::Window> window1(CreateWindow(bounds));
scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- aura::test::EventGenerator generator(root_window, root_window);
+ ui::test::EventGenerator generator(root_window, root_window);
generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5),
600, -500, 100, 3);
EXPECT_FALSE(IsSelecting());
@@ -86,7 +86,7 @@ TEST_F(OverviewGestureHandlerTest, SwipeUpDownWithoutReleasing) {
aura::Window* root_window = Shell::GetPrimaryRootWindow();
scoped_ptr<aura::Window> window1(CreateWindow(bounds));
scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- aura::test::EventGenerator generator(root_window, root_window);
+ ui::test::EventGenerator generator(root_window, root_window);
base::TimeDelta timestamp = base::TimeDelta::FromInternalValue(
base::TimeTicks::Now().ToInternalValue());
gfx::Point start;
@@ -146,7 +146,7 @@ TEST_F(OverviewGestureHandlerTest, GestureSwipe) {
aura::Window* root_window = Shell::GetPrimaryRootWindow();
scoped_ptr<aura::Window> window1(CreateWindow(bounds));
scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- aura::test::EventGenerator generator(root_window, root_window);
+ ui::test::EventGenerator generator(root_window, root_window);
gfx::Point start_points[3];
start_points[0] = start_points[1] = start_points[2] = gfx::Point();
generator.GestureMultiFingerScroll(3, start_points, 5, 10, 0, 100);
@@ -163,7 +163,7 @@ TEST_F(OverviewGestureHandlerTest, GestureSwipeTopOfWindow) {
aura::Window* root_window = Shell::GetPrimaryRootWindow();
scoped_ptr<aura::Window> window1(CreateWindow(bounds));
scoped_ptr<aura::Window> window2(CreateWindow(bounds));
- aura::test::EventGenerator generator(root_window, window2.get());
+ ui::test::EventGenerator generator(root_window, window2.get());
gfx::Point start_points[3];
start_points[0] = start_points[1] = start_points[2] = gfx::Point(105, 105);
generator.GestureMultiFingerScroll(3, start_points, 5, 10, 0, 100);
diff --git a/ash/wm/immersive_fullscreen_controller_unittest.cc b/ash/wm/immersive_fullscreen_controller_unittest.cc
index 0ba623f..dbab153 100644
--- a/ash/wm/immersive_fullscreen_controller_unittest.cc
+++ b/ash/wm/immersive_fullscreen_controller_unittest.cc
@@ -15,11 +15,11 @@
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/env.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/events/event_utils.h"
+#include "ui/events/test/event_generator.h"
#include "ui/events/test/test_event_handler.h"
#include "ui/gfx/animation/slide_animation.h"
#include "ui/views/bubble/bubble_delegate.h"
@@ -231,7 +231,7 @@ class ImmersiveFullscreenControllerTest : public ash::test::AshTestBase {
case MODALITY_GESTURE_TAP: {
gfx::Point screen_position = event_position;
views::View::ConvertPointToScreen(top_container_, &screen_position);
- aura::test::EventGenerator& event_generator(GetEventGenerator());
+ ui::test::EventGenerator& event_generator(GetEventGenerator());
event_generator.MoveTouch(event_position);
event_generator.PressTouch();
event_generator.ReleaseTouch();
@@ -243,7 +243,7 @@ class ImmersiveFullscreenControllerTest : public ash::test::AshTestBase {
gfx::Point end = revealed ? start + scroll_delta : start - scroll_delta;
views::View::ConvertPointToScreen(top_container_, &start);
views::View::ConvertPointToScreen(top_container_, &end);
- aura::test::EventGenerator& event_generator(GetEventGenerator());
+ ui::test::EventGenerator& event_generator(GetEventGenerator());
event_generator.GestureScrollSequence(
start, end,
base::TimeDelta::FromMilliseconds(30), 1);
@@ -349,7 +349,7 @@ TEST_F(ImmersiveFullscreenControllerTest, OnMouseEvent) {
ASSERT_TRUE(controller()->IsEnabled());
ASSERT_FALSE(controller()->IsRevealed());
- aura::test::EventGenerator& event_generator(GetEventGenerator());
+ ui::test::EventGenerator& event_generator(GetEventGenerator());
gfx::Rect top_container_bounds_in_screen =
top_container()->GetBoundsInScreen();
@@ -528,7 +528,7 @@ TEST_F(ImmersiveFullscreenControllerTest, MouseEventsVerticalDisplayLayout) {
// The y position of the top edge of the primary display.
int y_top_edge = primary_root_window_bounds_in_screen.y();
- aura::test::EventGenerator& event_generator(GetEventGenerator());
+ ui::test::EventGenerator& event_generator(GetEventGenerator());
// Moving right below the top edge starts the hover timer running. We
// cannot use MoveMouse() because MoveMouse() stops the timer if it started
diff --git a/ash/wm/lock_state_controller_unittest.cc b/ash/wm/lock_state_controller_unittest.cc
index 7c3f0e2..eea43c8 100644
--- a/ash/wm/lock_state_controller_unittest.cc
+++ b/ash/wm/lock_state_controller_unittest.cc
@@ -17,12 +17,12 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "ui/aura/env.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/layer_animator.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -113,8 +113,7 @@ class LockStateControllerTest : public AshTestBase {
protected:
void GenerateMouseMoveEvent() {
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseTo(10, 10);
}
diff --git a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
index 089a232..39f77c7 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
+++ b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
@@ -14,8 +14,8 @@
#include "ash/test/test_screenshot_delegate.h"
#include "ash/test/test_system_tray_delegate.h"
#include "ash/test/test_volume_control_delegate.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/events/event_handler.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/vector3d_f.h"
#include "ui/message_center/message_center.h"
@@ -270,7 +270,7 @@ TEST_F(MaximizeModeControllerTest, Screenshot) {
Shell::GetInstance()->lock_state_controller()->SetDelegate(
new test::TestLockStateControllerDelegate);
aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator event_generator(root, root);
+ ui::test::EventGenerator event_generator(root, root);
test::TestScreenshotDelegate* delegate = GetScreenshotDelegate();
delegate->set_can_take_screenshot(true);
diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc b/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
index 8dc5575..445dd28 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
+++ b/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
@@ -24,11 +24,11 @@
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/base/hit_test.h"
+#include "ui/events/test/event_generator.h"
namespace ash {
@@ -945,7 +945,7 @@ TEST_F(MaximizeModeWindowManagerTest, TryToDesktopSizeDragUnmaximizable) {
// 1. Move the mouse over the caption and check that dragging the window does
// change the location.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseTo(gfx::Point(rect.x() + 2, rect.y() + 2));
generator.PressLeftButton();
generator.MoveMouseBy(10, 5);
@@ -1033,7 +1033,7 @@ TEST_F(MaximizeModeWindowManagerTest, ExitFullScreenWithEdgeSwipeFromTop) {
EXPECT_EQ(foreground_window.get(), wm::GetActiveWindow());
// Do an edge swipe top into screen.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.GestureScrollSequence(gfx::Point(50, 0),
gfx::Point(50, 100),
base::TimeDelta::FromMilliseconds(20),
@@ -1077,7 +1077,7 @@ TEST_F(MaximizeModeWindowManagerTest, ExitFullScreenWithEdgeSwipeFromBottom) {
EXPECT_EQ(foreground_window.get(), wm::GetActiveWindow());
// Do an edge swipe bottom into screen.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
int y = Shell::GetPrimaryRootWindow()->bounds().bottom();
generator.GestureScrollSequence(gfx::Point(50, y),
gfx::Point(50, y - 100),
@@ -1113,7 +1113,7 @@ TEST_F(MaximizeModeWindowManagerTest, ExitFullScreenWithEdgeTouchAtTop) {
EXPECT_EQ(foreground_window.get(), wm::GetActiveWindow());
// Touch tap on the top edge.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.GestureTapAt(gfx::Point(100, 0));
EXPECT_FALSE(foreground_window_state->IsFullscreen());
EXPECT_TRUE(background_window_state->IsFullscreen());
@@ -1149,7 +1149,7 @@ TEST_F(MaximizeModeWindowManagerTest, ExitFullScreenWithEdgeTouchAtBottom) {
EXPECT_EQ(foreground_window.get(), wm::GetActiveWindow());
// Touch tap on the bottom edge.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.GestureTapAt(
gfx::Point(100, Shell::GetPrimaryRootWindow()->bounds().bottom() - 1));
EXPECT_FALSE(foreground_window_state->IsFullscreen());
@@ -1183,7 +1183,7 @@ TEST_F(MaximizeModeWindowManagerTest, NoExitImmersiveModeWithEdgeSwipeFromTop) {
window_state->set_in_immersive_fullscreen(true);
// Do an edge swipe top into screen.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.GestureScrollSequence(gfx::Point(50, 0),
gfx::Point(50, 100),
base::TimeDelta::FromMilliseconds(20),
@@ -1215,7 +1215,7 @@ TEST_F(MaximizeModeWindowManagerTest,
EXPECT_TRUE(window_state->in_immersive_fullscreen());
// Do an edge swipe bottom into screen.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
int y = Shell::GetPrimaryRootWindow()->bounds().bottom();
generator.GestureScrollSequence(gfx::Point(50, y),
gfx::Point(50, y - 100),
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index dddfeb1..c53664c 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -35,12 +35,12 @@
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/focus_client.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/transform.h"
#include "ui/views/controls/label.h"
@@ -170,13 +170,13 @@ class WindowSelectorTest : public test::AshTestBase {
}
void ClickWindow(aura::Window* window) {
- aura::test::EventGenerator event_generator(window->GetRootWindow(), window);
+ ui::test::EventGenerator event_generator(window->GetRootWindow(), window);
gfx::RectF target = GetTransformedBounds(window);
event_generator.ClickLeftButton();
}
void SendKey(ui::KeyboardCode key) {
- aura::test::EventGenerator event_generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator event_generator(Shell::GetPrimaryRootWindow());
event_generator.PressKey(key, 0);
event_generator.ReleaseKey(key, 0);
}
@@ -321,8 +321,8 @@ TEST_F(WindowSelectorTest, BasicGesture) {
EXPECT_EQ(window1.get(), GetFocusedWindow());
ToggleOverview();
EXPECT_EQ(text_filter_widget()->GetNativeWindow(), GetFocusedWindow());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window2.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ window2.get());
generator.GestureTapAt(gfx::ToEnclosingRect(
GetTransformedTargetBounds(window2.get())).CenterPoint());
EXPECT_EQ(window2.get(), GetFocusedWindow());
@@ -377,7 +377,7 @@ TEST_F(WindowSelectorTest, CloseButton) {
aura::Window* window2 = widget->GetNativeWindow();
gfx::RectF bounds = GetTransformedBoundsInRootWindow(window2);
gfx::Point point(bounds.top_right().x() - 1, bounds.top_right().y() - 1);
- aura::test::EventGenerator event_generator(window2->GetRootWindow(), point);
+ ui::test::EventGenerator event_generator(window2->GetRootWindow(), point);
EXPECT_FALSE(widget->IsClosed());
event_generator.ClickLeftButton();
@@ -1013,7 +1013,7 @@ TEST_F(WindowSelectorTest, CloseButtonOnPanels) {
gfx::RectF bounds1 = GetTransformedBoundsInRootWindow(window1);
gfx::Point point1(bounds1.top_right().x() - 1, bounds1.top_right().y() - 1);
- aura::test::EventGenerator event_generator1(window1->GetRootWindow(), point1);
+ ui::test::EventGenerator event_generator1(window1->GetRootWindow(), point1);
EXPECT_FALSE(widget1->IsClosed());
event_generator1.ClickLeftButton();
@@ -1031,7 +1031,7 @@ TEST_F(WindowSelectorTest, CloseButtonOnPanels) {
gfx::RectF bounds2 = GetTransformedBoundsInRootWindow(window2);
gfx::Point point2(bounds2.top_right().x() - 1, bounds2.top_right().y() - 1);
- aura::test::EventGenerator event_generator2(window2->GetRootWindow(), point2);
+ ui::test::EventGenerator event_generator2(window2->GetRootWindow(), point2);
EXPECT_FALSE(widget2->IsClosed());
event_generator2.ClickLeftButton();
diff --git a/ash/wm/panels/panel_layout_manager_unittest.cc b/ash/wm/panels/panel_layout_manager_unittest.cc
index 4faeacb..1489972 100644
--- a/ash/wm/panels/panel_layout_manager_unittest.cc
+++ b/ash/wm/panels/panel_layout_manager_unittest.cc
@@ -31,12 +31,12 @@
#include "base/i18n/rtl.h"
#include "base/run_loop.h"
#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/events/event_utils.h"
+#include "ui/events/test/event_generator.h"
#include "ui/views/widget/widget.h"
namespace ash {
@@ -220,7 +220,7 @@ class PanelLayoutManagerTest : public test::AshTestBase {
int index = model->ItemIndexByID(GetShelfIDForWindow(window));
gfx::Rect bounds = test_api.GetButton(index)->GetBoundsInScreen();
- aura::test::EventGenerator& event_generator = GetEventGenerator();
+ ui::test::EventGenerator& event_generator = GetEventGenerator();
event_generator.MoveMouseTo(bounds.CenterPoint());
event_generator.ClickLeftButton();
diff --git a/ash/wm/partial_screenshot_view_unittest.cc b/ash/wm/partial_screenshot_view_unittest.cc
index d908331..3b763b4 100644
--- a/ash/wm/partial_screenshot_view_unittest.cc
+++ b/ash/wm/partial_screenshot_view_unittest.cc
@@ -9,8 +9,8 @@
#include "ash/shell_window_ids.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/test_screenshot_delegate.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window_event_dispatcher.h"
+#include "ui/events/test/event_generator.h"
namespace ash {
@@ -35,7 +35,7 @@ class PartialScreenshotViewTest : public test::AshTestBase {
};
TEST_F(PartialScreenshotViewTest, BasicMouse) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseTo(100, 100);
generator.PressLeftButton();
@@ -53,7 +53,7 @@ TEST_F(PartialScreenshotViewTest, BasicMouse) {
}
TEST_F(PartialScreenshotViewTest, BasicTouch) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.set_current_location(gfx::Point(100,100));
generator.GestureTapDownAndUp(gfx::Point(100,100));
diff --git a/ash/wm/resize_shadow_and_cursor_unittest.cc b/ash/wm/resize_shadow_and_cursor_unittest.cc
index 0503a82..066c350 100644
--- a/ash/wm/resize_shadow_and_cursor_unittest.cc
+++ b/ash/wm/resize_shadow_and_cursor_unittest.cc
@@ -11,10 +11,10 @@
#include "ash/wm/resize_shadow_controller.h"
#include "ash/wm/window_state.h"
#include "base/bind.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/hit_test.h"
+#include "ui/events/test/event_generator.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
@@ -116,7 +116,7 @@ class ResizeShadowAndCursorTest : public AshTestBase {
// Test whether the resize shadows are visible and the cursor type based on the
// mouse's position.
TEST_F(ResizeShadowAndCursorTest, MouseHover) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
ASSERT_TRUE(ash::wm::GetWindowState(window())->IsNormalStateType());
generator.MoveMouseTo(50, 50);
@@ -159,7 +159,7 @@ TEST_F(ResizeShadowAndCursorTest, MouseHover) {
// Test that the resize shadows stay visible and that the cursor stays the same
// as long as a user is resizing a window.
TEST_F(ResizeShadowAndCursorTest, MouseDrag) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
ASSERT_TRUE(ash::wm::GetWindowState(window())->IsNormalStateType());
gfx::Size initial_size(window()->bounds().size());
@@ -183,7 +183,7 @@ TEST_F(ResizeShadowAndCursorTest, MouseDrag) {
// Test that the resize shadows stay visible while resizing a window via touch.
TEST_F(ResizeShadowAndCursorTest, Touch) {
ASSERT_TRUE(ash::wm::GetWindowState(window())->IsNormalStateType());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
int start_x = 200 + ash::kResizeOutsideBoundsSize - 1;
int start_y = 100 + ash::kResizeOutsideBoundsSize - 1;
@@ -199,7 +199,7 @@ TEST_F(ResizeShadowAndCursorTest, Touch) {
// Test that the resize shadows are not visible and that the default cursor is
// used when the window is maximized.
TEST_F(ResizeShadowAndCursorTest, MaximizeRestore) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
ASSERT_TRUE(ash::wm::GetWindowState(window())->IsNormalStateType());
generator.MoveMouseTo(200, 50);
diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc
index 06b6fce..705e364 100644
--- a/ash/wm/system_gesture_event_filter_unittest.cc
+++ b/ash/wm/system_gesture_event_filter_unittest.cc
@@ -22,7 +22,6 @@
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "ui/aura/env.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window_event_dispatcher.h"
@@ -31,6 +30,7 @@
#include "ui/events/event_handler.h"
#include "ui/events/event_utils.h"
#include "ui/events/gestures/gesture_configuration.h"
+#include "ui/events/test/event_generator.h"
#include "ui/events/test/test_event_handler.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/size.h"
@@ -249,8 +249,7 @@ TEST_F(SystemGestureEventFilterTest, TwoFingerDrag) {
gfx::Point(350, 350),
};
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
+ ui::test::EventGenerator generator(root_window, toplevel->GetNativeWindow());
wm::WindowState* toplevel_state =
wm::GetWindowState(toplevel->GetNativeWindow());
@@ -316,7 +315,7 @@ TEST_F(SystemGestureEventFilterTest, TwoFingerDragTwoWindows) {
second_bounds.origin() + gfx::Vector2d(40, 20)
};
- aura::test::EventGenerator generator(root_window);
+ ui::test::EventGenerator generator(root_window);
// Do not drag too fast to avoid fling.
generator.GestureMultiFingerScroll(kTouchPoints, points,
50, kSteps, 0, 150);
@@ -341,8 +340,7 @@ TEST_F(SystemGestureEventFilterTest, WindowsWithMaxSizeDontSnap) {
gfx::Point(bounds.x() + 30, bounds.y() + 20),
};
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
+ ui::test::EventGenerator generator(root_window, toplevel->GetNativeWindow());
// Swipe down to minimize.
generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, 150);
@@ -405,8 +403,7 @@ TEST_F(SystemGestureEventFilterTest, DISABLED_TwoFingerDragEdge) {
EXPECT_EQ(HTLEFT, toplevel->GetNativeWindow()->delegate()->
GetNonClientComponent(points[1]));
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
+ ui::test::EventGenerator generator(root_window, toplevel->GetNativeWindow());
bounds = toplevel->GetNativeWindow()->bounds();
// Swipe down. Nothing should happen.
@@ -466,8 +463,7 @@ TEST_F(SystemGestureEventFilterTest, TwoFingerDragDelayed) {
EXPECT_EQ(HTCAPTION, toplevel->GetNativeWindow()->delegate()->
GetNonClientComponent(points[1]));
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
+ ui::test::EventGenerator generator(root_window, toplevel->GetNativeWindow());
bounds = toplevel->GetNativeWindow()->bounds();
// Swipe right and down starting with one finger.
@@ -502,8 +498,7 @@ TEST_F(SystemGestureEventFilterTest, ThreeFingerGestureStopsDrag) {
EXPECT_EQ(HTCAPTION, toplevel->GetNativeWindow()->delegate()->
GetNonClientComponent(points[1]));
- aura::test::EventGenerator generator(root_window,
- toplevel->GetNativeWindow());
+ ui::test::EventGenerator generator(root_window, toplevel->GetNativeWindow());
bounds = toplevel->GetNativeWindow()->bounds();
// Swipe right and down starting with two fingers.
@@ -532,7 +527,7 @@ TEST_F(SystemGestureEventFilterTest, DragLeftNearEdgeSnaps) {
gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
};
aura::Window* toplevel_window = toplevel->GetNativeWindow();
- aura::test::EventGenerator generator(root_window, toplevel_window);
+ ui::test::EventGenerator generator(root_window, toplevel_window);
// Check that dragging left snaps before reaching the screen edge.
gfx::Rect work_area =
@@ -560,7 +555,7 @@ TEST_F(SystemGestureEventFilterTest, DragRightNearEdgeSnaps) {
gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
};
aura::Window* toplevel_window = toplevel->GetNativeWindow();
- aura::test::EventGenerator generator(root_window, toplevel_window);
+ ui::test::EventGenerator generator(root_window, toplevel_window);
// Check that dragging right snaps before reaching the screen edge.
gfx::Rect work_area =
diff --git a/ash/wm/system_modal_container_layout_manager_unittest.cc b/ash/wm/system_modal_container_layout_manager_unittest.cc
index ac03c10..6bc665b 100644
--- a/ash/wm/system_modal_container_layout_manager_unittest.cc
+++ b/ash/wm/system_modal_container_layout_manager_unittest.cc
@@ -13,12 +13,12 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/run_loop.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/test/layer_animator_test_controller.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/screen.h"
#include "ui/keyboard/keyboard_controller.h"
#include "ui/keyboard/keyboard_controller_proxy.h"
@@ -230,7 +230,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, ModalTransient) {
EXPECT_TRUE(wm::IsActiveWindow(t1));
// Attempting to click the parent should result in no activation change.
- aura::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), parent.get());
+ ui::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), parent.get());
e1.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(t1));
@@ -245,7 +245,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, ModalTransient) {
EXPECT_EQ(GetModalContainer(), t2->parent());
// t2 should still be active, even after clicking on t1.
- aura::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1);
+ ui::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1);
e2.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(t2));
@@ -269,8 +269,8 @@ TEST_F(SystemModalContainerLayoutManagerTest, ModalNonTransient) {
EXPECT_TRUE(wm::IsActiveWindow(t1.get()));
// Attempting to click the parent should result in no activation change.
- aura::test::EventGenerator e1(Shell::GetPrimaryRootWindow(),
- Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator e1(Shell::GetPrimaryRootWindow(),
+ Shell::GetPrimaryRootWindow());
e1.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(t1.get()));
@@ -285,7 +285,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, ModalNonTransient) {
EXPECT_EQ(GetModalContainer(), t2->parent());
// t2 should still be active, even after clicking on t1.
- aura::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1.get());
+ ui::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1.get());
e2.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(t2));
@@ -310,7 +310,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, CanActivateAfterEndModalSession) {
EXPECT_TRUE(wm::IsActiveWindow(transient.get()));
// Attempting to click the parent should result in no activation change.
- aura::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), parent.get());
+ ui::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), parent.get());
e1.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(transient.get()));
@@ -324,7 +324,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, CanActivateAfterEndModalSession) {
EXPECT_TRUE(wm::IsActiveWindow(parent.get()));
// Attempting to click unrelated should activate it.
- aura::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), unrelated.get());
+ ui::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), unrelated.get());
e2.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(unrelated.get()));
}
@@ -335,7 +335,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, EventFocusContainers) {
scoped_ptr<aura::Window> main(
main_delegate->OpenTestWindowWithContext(CurrentContext()));
EXPECT_TRUE(wm::IsActiveWindow(main.get()));
- aura::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), main.get());
+ ui::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), main.get());
e1.ClickLeftButton();
EXPECT_EQ(1, main_delegate->mouse_presses());
@@ -407,7 +407,7 @@ TEST_F(SystemModalContainerLayoutManagerTest, ChangeCapture) {
gfx::Point center(view->width() / 2, view->height() / 2);
views::View::ConvertPointToScreen(view, &center);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), center);
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), center);
generator.PressLeftButton();
EXPECT_TRUE(view->got_press());
scoped_ptr<aura::Window> modal_window(
diff --git a/ash/wm/toplevel_window_event_handler_unittest.cc b/ash/wm/toplevel_window_event_handler_unittest.cc
index 74497f7..7c4f4d6 100644
--- a/ash/wm/toplevel_window_event_handler_unittest.cc
+++ b/ash/wm/toplevel_window_event_handler_unittest.cc
@@ -20,11 +20,11 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/hit_test.h"
#include "ui/events/event.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/screen.h"
#include "ui/wm/core/window_util.h"
#include "ui/wm/public/window_move_client.h"
@@ -80,12 +80,12 @@ class ToplevelWindowEventHandlerTest : public AshTestBase {
}
void DragFromCenterBy(aura::Window* window, int dx, int dy) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
generator.DragMouseBy(dx, dy);
}
void TouchDragFromCenterBy(aura::Window* window, int dx, int dy) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
generator.PressMoveAndReleaseTouchBy(dx, dy);
}
@@ -130,7 +130,7 @@ TEST_F(ToplevelWindowEventHandlerTest, GrowBox) {
window_delegate->set_minimum_size(gfx::Size(40, 40));
gfx::Point position = w1->bounds().origin();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseToCenterOf(w1.get());
generator.DragMouseBy(100, 100);
// Position should not have changed.
@@ -374,8 +374,8 @@ TEST_F(ToplevelWindowEventHandlerTest, DontDragIfModalChild) {
// Verifies we don't let windows drag to a -y location.
TEST_F(ToplevelWindowEventHandlerTest, DontDragToNegativeY) {
scoped_ptr<aura::Window> target(CreateWindow(HTTOP));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
generator.MoveMouseTo(0, 5);
generator.DragMouseBy(0, -5);
// The y location and height should not have changed.
@@ -401,8 +401,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDrag) {
0,
gfx::Rect(0, 0, 100, 100)));
wm::WindowState* window_state = wm::GetWindowState(target.get());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
gfx::Rect old_bounds = target->bounds();
gfx::Point location(5, 5);
target->SetProperty(aura::client::kCanMaximizeKey, true);
@@ -481,8 +481,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragMinimizeLoginScreen) {
RootWindowController::ForWindow(target.get())
->GetContainer(kShellWindowId_LockSystemModalContainer);
lock->AddChild(target.get());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
gfx::Rect old_bounds = target->bounds();
gfx::Point location(5, 5);
target->SetProperty(aura::client::kCanMaximizeKey, true);
@@ -506,8 +506,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragToRestore) {
wm::WindowState* window_state = wm::GetWindowState(window.get());
window_state->Activate();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ window.get());
gfx::Rect old_bounds = window->bounds();
gfx::Point location, end;
end = location = window->GetBoundsInRootWindow().CenterPoint();
@@ -528,8 +528,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragForUnresizableWindow) {
scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
wm::WindowState* window_state = wm::GetWindowState(target.get());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
gfx::Rect old_bounds = target->bounds();
gfx::Point location(5, 5);
@@ -583,8 +583,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragMultipleWindows) {
new TestWindowDelegate(HTCAPTION),
1, gfx::Rect(100, 0, 100, 100)));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
gfx::Rect old_bounds = target->bounds();
gfx::Point location(5, 5);
target->SetProperty(aura::client::kCanMaximizeKey, true);
@@ -598,8 +598,7 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragMultipleWindows) {
// Try to drag |notmoved| window. This should not move the window.
{
gfx::Rect bounds = notmoved->bounds();
- aura::test::EventGenerator gen(Shell::GetPrimaryRootWindow(),
- notmoved.get());
+ ui::test::EventGenerator gen(Shell::GetPrimaryRootWindow(), notmoved.get());
gfx::Point start = notmoved->bounds().origin() + gfx::Vector2d(10, 10);
gfx::Point end = start + gfx::Vector2d(100, 10);
gen.GestureScrollSequence(start, end,
@@ -618,8 +617,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragMultipleWindows) {
#endif
TEST_F(ToplevelWindowEventHandlerTest, MAYBE_EscapeReverts) {
scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMRIGHT));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
generator.PressLeftButton();
generator.MoveMouseBy(10, 11);
@@ -644,8 +643,8 @@ TEST_F(ToplevelWindowEventHandlerTest, MAYBE_MinimizeMaximizeCompletes) {
{
scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
target->Focus();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
generator.PressLeftButton();
generator.MoveMouseBy(10, 11);
RunAllPendingInMessageLoop();
@@ -664,8 +663,8 @@ TEST_F(ToplevelWindowEventHandlerTest, MAYBE_MinimizeMaximizeCompletes) {
{
scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
target->Focus();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
generator.PressLeftButton();
generator.MoveMouseBy(10, 11);
RunAllPendingInMessageLoop();
@@ -689,8 +688,8 @@ TEST_F(ToplevelWindowEventHandlerTest, RunMoveLoopFailsDuringInProgressDrag) {
EXPECT_EQ("0,0 100x100", window1->bounds().ToString());
scoped_ptr<aura::Window> window2(CreateWindow(HTCAPTION));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window1.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ window1.get());
window1->Focus();
generator.PressLeftButton();
generator.MoveMouseBy(10, 11);
@@ -708,7 +707,7 @@ TEST_F(ToplevelWindowEventHandlerTest, RunMoveLoopFailsDuringInProgressDrag) {
namespace {
-void SendMouseReleaseAndReleaseCapture(aura::test::EventGenerator* generator,
+void SendMouseReleaseAndReleaseCapture(ui::test::EventGenerator* generator,
aura::Window* window) {
generator->ReleaseLeftButton();
window->ReleaseCapture();
@@ -720,8 +719,8 @@ void SendMouseReleaseAndReleaseCapture(aura::test::EventGenerator* generator,
// immediately after the mouse release. views::Widget has this behavior.
TEST_F(ToplevelWindowEventHandlerTest, CaptureLossAfterMouseRelease) {
scoped_ptr<aura::Window> window(CreateWindow(HTNOWHERE));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ window.get());
generator.PressLeftButton();
window->SetCapture();
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
index 75b7e4e..c47c8e2 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -12,7 +12,6 @@
#include "ui/aura/client/focus_client.h"
#include "ui/aura/env.h"
#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/base/cursor/cursor.h"
@@ -20,6 +19,7 @@
#include "ui/events/event.h"
#include "ui/events/event_processor.h"
#include "ui/events/event_utils.h"
+#include "ui/events/test/event_generator.h"
#include "ui/events/test/test_event_handler.h"
#include "ui/gfx/screen.h"
#include "ui/wm/core/compound_event_filter.h"
@@ -174,8 +174,7 @@ TEST_F(WindowManagerTest, Focus) {
SK_ColorGRAY, -13, gfx::Rect(5, 470, 50, 50), w1.get()));
// Click on a sub-window (w121) to focus it.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w121.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w121.get());
generator.ClickLeftButton();
aura::client::FocusClient* focus_client =
@@ -287,8 +286,7 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
{
// Click on window2.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w2.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w2.get());
generator.ClickLeftButton();
// Window2 should have become active.
@@ -304,8 +302,7 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
{
// Click back on window1, but set it up so w1 doesn't activate on click.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w1.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w1.get());
d1.set_activate(false);
generator.ClickLeftButton();
@@ -335,8 +332,8 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
{
scoped_ptr<aura::Window> w11(CreateTestWindowWithDelegate(
&wd, -11, gfx::Rect(10, 10, 10, 10), w1.get()));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w11.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ w11.get());
// First set the focus to the child |w11|.
generator.ClickLeftButton();
EXPECT_EQ(w11.get(), focus_client->GetFocusedWindow());
@@ -361,8 +358,7 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
// Move focus to |w2| first.
scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(
&wd, -1, gfx::Rect(70, 70, 50, 50)));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w2.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w2.get());
generator.ClickLeftButton();
EXPECT_EQ(w2.get(), focus_client->GetFocusedWindow());
EXPECT_FALSE(w11->CanFocus());
@@ -403,8 +399,8 @@ TEST_F(WindowManagerTest, PanelActivation) {
NonFocusableDelegate nfd;
scoped_ptr<aura::Window> w3(CreateTestWindowInShellWithDelegate(
&nfd, -1, gfx::Rect(70, 70, 50, 50)));
- aura::test::EventGenerator generator3(Shell::GetPrimaryRootWindow(),
- w3.get());
+ ui::test::EventGenerator generator3(Shell::GetPrimaryRootWindow(),
+ w3.get());
wm::ActivateWindow(p1.get());
EXPECT_TRUE(wm::IsActiveWindow(p1.get()));
generator3.ClickLeftButton();
@@ -731,7 +727,7 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
#if defined(OS_CHROMEOS) || defined(OS_WIN)
// Touch visually hides the cursor on ChromeOS and Windows
TEST_F(WindowManagerTest, UpdateCursorVisibility) {
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
::wm::CursorManager* cursor_manager =
ash::Shell::GetInstance()->cursor_manager();
@@ -754,7 +750,7 @@ TEST_F(WindowManagerTest, UpdateCursorVisibility) {
// ChromeOS is the only platform for which the cursor is hidden on keypress
// (crbug.com/304296).
TEST_F(WindowManagerTest, UpdateCursorVisibilityOnKeyEvent) {
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
::wm::CursorManager* cursor_manager =
ash::Shell::GetInstance()->cursor_manager();
@@ -777,7 +773,7 @@ TEST_F(WindowManagerTest, UpdateCursorVisibilityOnKeyEvent) {
}
TEST_F(WindowManagerTest, TestCursorClientObserver) {
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
::wm::CursorManager* cursor_manager =
ash::Shell::GetInstance()->cursor_manager();
diff --git a/ash/wm/window_modality_controller_unittest.cc b/ash/wm/window_modality_controller_unittest.cc
index 1519d27..8fbb64f 100644
--- a/ash/wm/window_modality_controller_unittest.cc
+++ b/ash/wm/window_modality_controller_unittest.cc
@@ -9,12 +9,12 @@
#include "ash/test/child_modal_window.h"
#include "ash/wm/window_util.h"
#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/ui_base_types.h"
+#include "ui/events/test/event_generator.h"
#include "ui/views/test/capture_tracking_view.h"
#include "ui/views/widget/widget.h"
#include "ui/wm/core/window_util.h"
@@ -189,8 +189,8 @@ TEST_F(WindowModalityControllerTest, Events) {
{
// Clicking a point within w1 should activate that window.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(10, 10));
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point(10, 10));
generator.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
}
@@ -199,8 +199,8 @@ TEST_F(WindowModalityControllerTest, Events) {
{
// Clicking a point within w1 should activate w11.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(10, 10));
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point(10, 10));
generator.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(w11.get()));
}
@@ -223,8 +223,8 @@ TEST_F(WindowModalityControllerTest, EventsForEclipsedWindows) {
wm::ActivateWindow(w2.get());
{
// Clicking a point on w1 that is not eclipsed by w2.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(90, 90));
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point(90, 90));
generator.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(w11.get()));
}
@@ -276,7 +276,7 @@ TEST_F(WindowModalityControllerTest, ChangeCapture) {
gfx::Point center(view->width() / 2, view->height() / 2);
views::View::ConvertPointToScreen(view, &center);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), center);
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), center);
generator.PressLeftButton();
EXPECT_TRUE(view->got_press());
@@ -347,8 +347,8 @@ TEST_F(WindowModalityControllerTest, TouchEvent) {
TouchTrackerWindowDelegate d11;
scoped_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate(&d11,
-11, gfx::Rect(20, 20, 50, 50)));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(10, 10));
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point(10, 10));
::wm::AddTransientChild(w1.get(), w11.get());
d1.reset();
@@ -479,7 +479,7 @@ TEST_F(WindowModalityControllerTest, ChildModalEventGenerator) {
EXPECT_FALSE(parent->HasFocus());
{
- aura::test::EventGenerator generator(
+ ui::test::EventGenerator generator(
Shell::GetPrimaryRootWindow(),
parent->bounds().origin() +
gfx::Vector2d(10, parent->bounds().height() - 10));
@@ -496,7 +496,7 @@ TEST_F(WindowModalityControllerTest, ChildModalEventGenerator) {
}
{
- aura::test::EventGenerator generator(
+ ui::test::EventGenerator generator(
Shell::GetPrimaryRootWindow(),
parent->bounds().origin() + gfx::Vector2d(10, 10));
generator.ClickLeftButton();
@@ -511,7 +511,7 @@ TEST_F(WindowModalityControllerTest, ChildModalEventGenerator) {
}
{
- aura::test::EventGenerator generator(
+ ui::test::EventGenerator generator(
Shell::GetPrimaryRootWindow(),
child->bounds().origin() + gfx::Vector2d(10, 10));
generator.ClickLeftButton();
diff --git a/ash/wm/workspace/multi_window_resize_controller_unittest.cc b/ash/wm/workspace/multi_window_resize_controller_unittest.cc
index 9ff1d7c..7a7da34 100644
--- a/ash/wm/workspace/multi_window_resize_controller_unittest.cc
+++ b/ash/wm/workspace/multi_window_resize_controller_unittest.cc
@@ -8,13 +8,13 @@
#include "ash/test/ash_test_base.h"
#include "ash/test/shell_test_api.h"
#include "ash/wm/window_util.h"
+#include "ash/wm/workspace/workspace_event_handler_test_helper.h"
#include "ash/wm/workspace_controller.h"
#include "ash/wm/workspace_controller_test_helper.h"
-#include "ash/wm/workspace/workspace_event_handler_test_helper.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
#include "ui/base/hit_test.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
@@ -105,7 +105,7 @@ TEST_F(MultiWindowResizeControllerTest, BasicTests) {
scoped_ptr<aura::Window> w2(
CreateTestWindow(&delegate2, gfx::Rect(100, 0, 100, 100)));
delegate2.set_window_component(HTRIGHT);
- aura::test::EventGenerator generator(w1->GetRootWindow());
+ ui::test::EventGenerator generator(w1->GetRootWindow());
generator.MoveMouseTo(w1->bounds().CenterPoint());
EXPECT_TRUE(HasPendingShow());
EXPECT_TRUE(IsShowing());
@@ -136,7 +136,7 @@ TEST_F(MultiWindowResizeControllerTest, DeleteWindow) {
scoped_ptr<aura::Window> w2(
CreateTestWindow(&delegate2, gfx::Rect(100, 0, 100, 100)));
delegate2.set_window_component(HTRIGHT);
- aura::test::EventGenerator generator(w1->GetRootWindow());
+ ui::test::EventGenerator generator(w1->GetRootWindow());
generator.MoveMouseTo(w1->bounds().CenterPoint());
EXPECT_TRUE(HasPendingShow());
EXPECT_TRUE(IsShowing());
@@ -179,7 +179,7 @@ TEST_F(MultiWindowResizeControllerTest, Drag) {
scoped_ptr<aura::Window> w2(
CreateTestWindow(&delegate2, gfx::Rect(100, 0, 100, 100)));
delegate2.set_window_component(HTRIGHT);
- aura::test::EventGenerator generator(w1->GetRootWindow());
+ ui::test::EventGenerator generator(w1->GetRootWindow());
generator.MoveMouseTo(w1->bounds().CenterPoint());
EXPECT_TRUE(HasPendingShow());
EXPECT_TRUE(IsShowing());
@@ -227,7 +227,7 @@ TEST_F(MultiWindowResizeControllerTest, Three) {
CreateTestWindow(&delegate3, gfx::Rect(200, 0, 100, 100)));
delegate3.set_window_component(HTRIGHT);
- aura::test::EventGenerator generator(w1->GetRootWindow());
+ ui::test::EventGenerator generator(w1->GetRootWindow());
generator.MoveMouseTo(w1->bounds().CenterPoint());
EXPECT_TRUE(HasPendingShow());
EXPECT_TRUE(IsShowing());
diff --git a/ash/wm/workspace/workspace_event_handler_unittest.cc b/ash/wm/workspace/workspace_event_handler_unittest.cc
index f9a1e1a3..e9c9f15 100644
--- a/ash/wm/workspace/workspace_event_handler_unittest.cc
+++ b/ash/wm/workspace/workspace_event_handler_unittest.cc
@@ -13,12 +13,12 @@
#include "ash/wm/workspace_controller.h"
#include "ash/wm/workspace_controller_test_helper.h"
#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/hit_test.h"
#include "ui/events/event_processor.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/screen.h"
#include "ui/wm/core/window_util.h"
#include "ui/wm/public/window_move_client.h"
@@ -93,8 +93,8 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) {
gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
window.get()).work_area();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ window.get());
// Double-click the top resize edge.
delegate.set_window_component(HTTOP);
@@ -153,7 +153,7 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) {
window->SetBoundsInScreen(restored_bounds, ScreenUtil::GetSecondaryDisplay());
aura::Window* second_root = Shell::GetAllRootWindows()[1];
EXPECT_EQ(second_root, window->GetRootWindow());
- aura::test::EventGenerator generator2(second_root, window.get());
+ ui::test::EventGenerator generator2(second_root, window.get());
// Y-axis maximization.
delegate.set_window_component(HTTOP);
@@ -212,8 +212,8 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisWhenSideSnapped) {
// Double clicking the top border should not do anything for side snapped
// windows. (They already take up the entire workspace height and reverting
// to the restored bounds would be weird).
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ window.get());
delegate.set_window_component(HTTOP);
generator.DoubleClickLeftButton();
EXPECT_EQ(wm::WINDOW_STATE_TYPE_LEFT_SNAPPED, window_state->GetStateType());
@@ -242,8 +242,8 @@ TEST_F(WorkspaceEventHandlerTest,
delegate.set_maximum_size(gfx::Size(0, 100));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ window.get());
// Double-click the top resize edge.
delegate.set_window_component(HTTOP);
generator.DoubleClickLeftButton();
@@ -266,8 +266,8 @@ TEST_F(WorkspaceEventHandlerTest,
delegate.set_maximum_size(gfx::Size(100, 0));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ window.get());
// Double-click the top resize edge.
delegate.set_window_component(HTRIGHT);
generator.DoubleClickLeftButton();
@@ -294,7 +294,7 @@ TEST_F(WorkspaceEventHandlerTest,
wm::WindowState* window_state = wm::GetWindowState(window.get());
EXPECT_FALSE(window_state->IsMaximized());
aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root, window.get());
+ ui::test::EventGenerator generator(root, window.get());
generator.DoubleClickLeftButton();
EXPECT_EQ("10,20 30x40", window->bounds().ToString());
EXPECT_FALSE(window_state->IsMaximized());
@@ -323,7 +323,7 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickCaptionTogglesMaximize) {
// 1) Double clicking a normal window should maximize.
delegate.set_window_component(HTCAPTION);
aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root, window.get());
+ ui::test::EventGenerator generator(root, window.get());
generator.ClickLeftButton();
generator.DoubleClickLeftButton();
EXPECT_NE(restore_bounds.ToString(), window->bounds().ToString());
@@ -379,7 +379,7 @@ TEST_F(WorkspaceEventHandlerTest,
window->SetProperty(aura::client::kCanMaximizeKey, true);
delegate.set_window_component(HTCAPTION);
aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root, window.get());
+ ui::test::EventGenerator generator(root, window.get());
WindowPropertyObserver observer(window.get());
ui::MouseEvent press(ui::ET_MOUSE_PRESSED, generator.current_location(),
@@ -410,8 +410,8 @@ TEST_F(WorkspaceEventHandlerTest, DoubleTapCaptionTogglesMaximize) {
wm::WindowState* window_state = wm::GetWindowState(window.get());
EXPECT_FALSE(window_state->IsMaximized());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ window.get());
generator.GestureTapAt(gfx::Point(25, 25));
generator.GestureTapAt(gfx::Point(25, 25));
RunAllPendingInMessageLoop();
@@ -437,7 +437,7 @@ TEST_F(WorkspaceEventHandlerTest, DeleteWhenDragging) {
const gfx::Rect bounds(10, 20, 30, 40);
scoped_ptr<aura::Window> window(CreateTestWindow(&delegate, bounds));
delegate.set_window_component(HTCAPTION);
- aura::test::EventGenerator generator(window->GetRootWindow());
+ ui::test::EventGenerator generator(window->GetRootWindow());
generator.MoveMouseToCenterOf(window.get());
generator.PressLeftButton();
generator.MoveMouseTo(generator.current_location() + gfx::Vector2d(50, 50));
@@ -480,7 +480,7 @@ TEST_F(WorkspaceEventHandlerTest,
// First click will go to a client
delegate.set_window_component(HTCLIENT);
aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root, window.get());
+ ui::test::EventGenerator generator(root, window.get());
generator.ClickLeftButton();
EXPECT_FALSE(window_state->IsMaximized());
@@ -508,7 +508,7 @@ TEST_F(WorkspaceEventHandlerTest, DoubleTapTwoDifferentTargetsDoesntMaximize) {
// First tap will go to a client
delegate.set_window_component(HTCLIENT);
aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root, window.get());
+ ui::test::EventGenerator generator(root, window.get());
generator.GestureTapAt(gfx::Point(25, 25));
EXPECT_FALSE(window_state->IsMaximized());
@@ -535,7 +535,7 @@ TEST_F(WorkspaceEventHandlerTest,
// First click will go to a client
delegate.set_window_component(HTCLIENT);
aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root, window.get());
+ ui::test::EventGenerator generator(root, window.get());
generator.ClickLeftButton();
EXPECT_FALSE(window_state->IsMaximized());
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index 9fae0c9..49af2b7 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -20,11 +20,11 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/hit_test.h"
#include "ui/events/gestures/gesture_configuration.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
@@ -514,7 +514,7 @@ TEST_F(WorkspaceWindowResizerTest, MouseMoveWithTouchDrag) {
window2_->SetBounds(gfx::Rect(400, 200, 100, 200));
Shell* shell = Shell::GetInstance();
- aura::test::EventGenerator generator(window_->GetRootWindow());
+ ui::test::EventGenerator generator(window_->GetRootWindow());
// The cursor should not be locked initially.
EXPECT_FALSE(shell->cursor_manager()->IsCursorLocked());
@@ -1739,8 +1739,8 @@ TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_RIGHT) {
EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(),
touch_resize_window_->bounds().ToString());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ touch_resize_window_.get());
// Drag out of the right border a bit and check if the border is aligned with
// the touch point.
@@ -1773,8 +1773,8 @@ TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_LEFT) {
EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(),
touch_resize_window_->bounds().ToString());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ touch_resize_window_.get());
// Drag out of the left border a bit and check if the border is aligned with
// the touch point.
@@ -1807,8 +1807,8 @@ TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_TOP) {
EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(),
touch_resize_window_->bounds().ToString());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ touch_resize_window_.get());
// Drag out of the top border a bit and check if the border is aligned with
// the touch point.
@@ -1841,8 +1841,8 @@ TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_BOTTOM) {
EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(),
touch_resize_window_->bounds().ToString());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ touch_resize_window_.get());
// Drag out of the bottom border a bit and check if the border is aligned with
// the touch point.
diff --git a/ash/wm/workspace_controller_unittest.cc b/ash/wm/workspace_controller_unittest.cc
index fcfa414..e00390e 100644
--- a/ash/wm/workspace_controller_unittest.cc
+++ b/ash/wm/workspace_controller_unittest.cc
@@ -22,7 +22,6 @@
#include "ash/wm/workspace/workspace_window_resizer.h"
#include "base/strings/string_number_conversions.h"
#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
@@ -32,6 +31,7 @@
#include "ui/compositor/layer.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/events/event_utils.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
#include "ui/wm/core/window_animations.h"
@@ -367,8 +367,8 @@ TEST_F(WorkspaceControllerTest, MinimizeFullscreenWindow) {
TEST_F(WorkspaceControllerTest, ShelfStateUpdated) {
// Since ShelfLayoutManager queries for mouse location, move the mouse so
// it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
generator.MoveMouseTo(0, 0);
scoped_ptr<Window> w1(CreateTestWindow());
@@ -575,8 +575,8 @@ TEST_F(WorkspaceControllerTest, VisibilityTests) {
// Verifies windows that are offscreen don't move when switching workspaces.
TEST_F(WorkspaceControllerTest, DontMoveOnSwitch) {
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
generator.MoveMouseTo(0, 0);
scoped_ptr<Window> w1(CreateTestWindow());
@@ -603,8 +603,8 @@ TEST_F(WorkspaceControllerTest, DontMoveOnSwitch) {
// Verifies that windows that are completely offscreen move when switching
// workspaces.
TEST_F(WorkspaceControllerTest, MoveOnSwitch) {
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
generator.MoveMouseTo(0, 0);
scoped_ptr<Window> w1(CreateTestWindow());
@@ -1397,8 +1397,8 @@ TEST_F(WorkspaceControllerTestDragging, DragWindowOverlapShelf) {
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
// Drag near the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
generator.MoveMouseTo(10, 10);
generator.PressLeftButton();
generator.MoveMouseTo(100, shelf->GetIdealBounds().y() - 70);
@@ -1428,8 +1428,8 @@ TEST_F(WorkspaceControllerTestDragging, DragWindowKeepsShelfAutohidden) {
EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
// Drag very little.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
generator.MoveMouseTo(10, 10);
generator.PressLeftButton();
generator.MoveMouseTo(12, 12);