summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authortapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-28 01:48:52 +0000
committertapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-28 01:48:52 +0000
commit73c9fd0c41a31aab0be7a31e173f3a90f7b588f7 (patch)
tree0becd035d0e5424fc115a5e84d3b86cf218fe648 /ash
parenteab395117ab90f0a26b2c0335c3619e459973fe6 (diff)
downloadchromium_src-73c9fd0c41a31aab0be7a31e173f3a90f7b588f7.zip
chromium_src-73c9fd0c41a31aab0be7a31e173f3a90f7b588f7.tar.gz
chromium_src-73c9fd0c41a31aab0be7a31e173f3a90f7b588f7.tar.bz2
Cleanups for aura/test/event_generator.h (resolve TODOs)
Some purely mechanical changes left over from r283694, now that aura::test::EventGenerator has moved to ui::test in src/ui/events. Moves aura/test/event_generator.* to event_generator_delegate_aura.* Removes `using ui::test::EventGenerator;` declaration and redirects includes that don't extend the delegate to include the ui/test event_generator.h directly BUG=378134 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285209 Review URL: https://codereview.chromium.org/406413004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/accelerators/accelerator_controller_unittest.cc8
-rw-r--r--ash/accelerators/accelerator_filter_unittest.cc8
-rw-r--r--ash/accelerators/magnifier_key_scroller_unittest.cc4
-rw-r--r--ash/accelerators/spoken_feedback_toggler_unittest.cc4
-rw-r--r--ash/autoclick/autoclick_unittest.cc6
-rw-r--r--ash/display/display_controller_unittest.cc14
-rw-r--r--ash/display/display_manager_unittest.cc10
-rw-r--r--ash/display/mirror_window_controller_unittest.cc8
-rw-r--r--ash/display/root_window_transformers_unittest.cc12
-rw-r--r--ash/drag_drop/drag_drop_controller_unittest.cc50
-rw-r--r--ash/extended_desktop_unittest.cc22
-rw-r--r--ash/first_run/first_run_helper_unittest.cc2
-rw-r--r--ash/focus_cycler_unittest.cc4
-rw-r--r--ash/frame/caption_buttons/frame_size_button_unittest.cc18
-rw-r--r--ash/ime/candidate_view_unittest.cc10
-rw-r--r--ash/magnifier/magnification_controller_unittest.cc12
-rw-r--r--ash/root_window_controller_unittest.cc12
-rw-r--r--ash/shelf/shelf_layout_manager_unittest.cc42
-rw-r--r--ash/shelf/shelf_view_unittest.cc14
-rw-r--r--ash/shell_unittest.cc4
-rw-r--r--ash/system/tray/system_tray_unittest.cc10
-rw-r--r--ash/system/user/tray_user_unittest.cc22
-rw-r--r--ash/system/web_notification/web_notification_tray_unittest.cc4
-rw-r--r--ash/test/ash_test_base.cc2
-rw-r--r--ash/tooltips/tooltip_controller_unittest.cc8
-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
45 files changed, 318 insertions, 332 deletions
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index c5fc1cf..31ebf9b 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -25,12 +25,12 @@
#include "ash/wm/window_util.h"
#include "base/command_line.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/events/event.h"
#include "ui/events/event_processor.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
@@ -519,7 +519,7 @@ TEST_F(AcceleratorControllerTest, AutoRepeat) {
TestTarget target_b;
GetController()->Register(accelerator_b, &target_b);
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.PressKey(ui::VKEY_A, ui::EF_CONTROL_DOWN);
generator.ReleaseKey(ui::VKEY_A, ui::EF_CONTROL_DOWN);
@@ -554,7 +554,7 @@ TEST_F(AcceleratorControllerTest, AutoRepeat) {
}
TEST_F(AcceleratorControllerTest, Previous) {
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.PressKey(ui::VKEY_VOLUME_MUTE, ui::EF_NONE);
generator.ReleaseKey(ui::VKEY_VOLUME_MUTE, ui::EF_NONE);
@@ -588,7 +588,7 @@ TEST_F(AcceleratorControllerTest, DontRepeatToggleFullscreen) {
widget->Activate();
widget->GetNativeView()->SetProperty(aura::client::kCanMaximizeKey, true);
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
wm::WindowState* window_state = wm::GetWindowState(widget->GetNativeView());
// Toggling not suppressed.
diff --git a/ash/accelerators/accelerator_filter_unittest.cc b/ash/accelerators/accelerator_filter_unittest.cc
index 67ff1d9..d91d084 100644
--- a/ash/accelerators/accelerator_filter_unittest.cc
+++ b/ash/accelerators/accelerator_filter_unittest.cc
@@ -15,10 +15,10 @@
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/events/event.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/rect.h"
namespace ash {
@@ -31,7 +31,7 @@ TEST_F(AcceleratorFilterTest, TestFilterWithoutFocus) {
const TestScreenshotDelegate* delegate = GetScreenshotDelegate();
EXPECT_EQ(0, delegate->handle_take_screenshot_count());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
// AcceleratorController calls ScreenshotDelegate::HandleTakeScreenshot() when
// VKEY_PRINT is pressed. See kAcceleratorData[] in accelerator_controller.cc.
generator.PressKey(ui::VKEY_PRINT, 0);
@@ -54,7 +54,7 @@ TEST_F(AcceleratorFilterTest, TestFilterWithFocus) {
// AcceleratorFilter should ignore the key events since the root window is
// not focused.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.PressKey(ui::VKEY_PRINT, 0);
EXPECT_EQ(0, delegate->handle_take_screenshot_count());
generator.ReleaseKey(ui::VKEY_PRINT, 0);
@@ -69,7 +69,7 @@ TEST_F(AcceleratorFilterTest, TestCapsLockMask) {
const TestScreenshotDelegate* delegate = GetScreenshotDelegate();
EXPECT_EQ(0, delegate->handle_take_screenshot_count());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.PressKey(ui::VKEY_PRINT, 0);
EXPECT_EQ(1, delegate->handle_take_screenshot_count());
generator.ReleaseKey(ui::VKEY_PRINT, 0);
diff --git a/ash/accelerators/magnifier_key_scroller_unittest.cc b/ash/accelerators/magnifier_key_scroller_unittest.cc
index ad91abd..9de8c95 100644
--- a/ash/accelerators/magnifier_key_scroller_unittest.cc
+++ b/ash/accelerators/magnifier_key_scroller_unittest.cc
@@ -8,8 +8,8 @@
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/window_util.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
+#include "ui/events/test/event_generator.h"
namespace ash {
namespace {
@@ -52,7 +52,7 @@ TEST_F(MagnifierKeyScrollerTest, Basic) {
controller->SetEnabled(true);
EXPECT_EQ("200,150", controller->GetWindowPosition().ToString());
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
// Click and Release generates the press event upon release.
generator.PressKey(ui::VKEY_DOWN, ui::EF_SHIFT_DOWN);
diff --git a/ash/accelerators/spoken_feedback_toggler_unittest.cc b/ash/accelerators/spoken_feedback_toggler_unittest.cc
index 9344471..20df051 100644
--- a/ash/accelerators/spoken_feedback_toggler_unittest.cc
+++ b/ash/accelerators/spoken_feedback_toggler_unittest.cc
@@ -7,8 +7,8 @@
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/window_util.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
+#include "ui/events/test/event_generator.h"
namespace ash {
@@ -18,7 +18,7 @@ TEST_F(SpokenFeedbackTogglerTest, Basic) {
SpokenFeedbackToggler::ScopedEnablerForTest scoped;
Shell* shell = Shell::GetInstance();
AccessibilityDelegate* delegate = shell->accessibility_delegate();
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
EXPECT_FALSE(delegate->IsSpokenFeedbackEnabled());
generator.PressKey(ui::VKEY_F6, ui::EF_SHIFT_DOWN);
diff --git a/ash/autoclick/autoclick_unittest.cc b/ash/autoclick/autoclick_unittest.cc
index ff387aa..2af2dde 100644
--- a/ash/autoclick/autoclick_unittest.cc
+++ b/ash/autoclick/autoclick_unittest.cc
@@ -5,7 +5,6 @@
#include "ash/autoclick/autoclick_controller.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.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"
@@ -13,6 +12,7 @@
#include "ui/events/event_constants.h"
#include "ui/events/event_handler.h"
#include "ui/events/keycodes/keyboard_codes.h"
+#include "ui/events/test/event_generator.h"
namespace ash {
@@ -227,7 +227,7 @@ TEST_F(AutoclickTest, ExtendedDisplay) {
std::vector<ui::MouseEvent> events;
// Test first root window.
- aura::test::EventGenerator generator1(root_windows[0]);
+ ui::test::EventGenerator generator1(root_windows[0]);
generator1.MoveMouseTo(100, 200);
events = WaitForMouseEvents();
EXPECT_EQ(2u, events.size());
@@ -235,7 +235,7 @@ TEST_F(AutoclickTest, ExtendedDisplay) {
EXPECT_EQ(200, events[0].root_location().y());
// Test second root window.
- aura::test::EventGenerator generator2(root_windows[1]);
+ ui::test::EventGenerator generator2(root_windows[1]);
generator2.MoveMouseTo(300, 400);
events = WaitForMouseEvents();
EXPECT_EQ(2u, events.size());
diff --git a/ash/display/display_controller_unittest.cc b/ash/display/display_controller_unittest.cc
index 26e01cc..bd8cf49 100644
--- a/ash/display/display_controller_unittest.cc
+++ b/ash/display/display_controller_unittest.cc
@@ -23,10 +23,10 @@
#include "ui/aura/client/focus_change_observer.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/env.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window_tracker.h"
#include "ui/aura/window_tree_host.h"
#include "ui/events/event_handler.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
@@ -1024,7 +1024,7 @@ TEST_F(DisplayControllerTest, OverscanInsets) {
EXPECT_EQ("80,0 150x200",
ScreenUtil::GetSecondaryDisplay().bounds().ToString());
- aura::test::EventGenerator generator(root_windows[0]);
+ ui::test::EventGenerator generator(root_windows[0]);
generator.MoveMouseToInHost(20, 25);
EXPECT_EQ("5,15", event_handler.GetLocationAndReset());
@@ -1066,7 +1066,7 @@ TEST_F(DisplayControllerTest, Rotate) {
gfx::Display display1 = Shell::GetScreen()->GetPrimaryDisplay();
int64 display2_id = ScreenUtil::GetSecondaryDisplay().id();
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::test::EventGenerator generator1(root_windows[0]);
+ ui::test::EventGenerator generator1(root_windows[0]);
TestObserver observer;
EXPECT_EQ("120x200", root_windows[0]->bounds().size().ToString());
@@ -1107,7 +1107,7 @@ TEST_F(DisplayControllerTest, Rotate) {
EXPECT_EQ(1, observer.GetRotationChangedCountAndReset());
#if !defined(OS_WIN)
- aura::test::EventGenerator generator2(root_windows[1]);
+ ui::test::EventGenerator generator2(root_windows[1]);
generator2.MoveMouseToInHost(50, 40);
EXPECT_EQ("179,25", event_handler.GetLocationAndReset());
display_manager->SetDisplayRotation(display1.id(),
@@ -1149,7 +1149,7 @@ TEST_F(DisplayControllerTest, ScaleRootWindow) {
EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
EXPECT_EQ(1.0f, GetStoredUIScale(display2.id()));
- aura::test::EventGenerator generator(root_windows[0]);
+ ui::test::EventGenerator generator(root_windows[0]);
generator.MoveMouseToInHost(599, 200);
EXPECT_EQ("449,150", event_handler.GetLocationAndReset());
@@ -1177,7 +1177,7 @@ TEST_F(DisplayControllerTest, TouchScale) {
gfx::Display display = Shell::GetScreen()->GetPrimaryDisplay();
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
aura::Window* root_window = root_windows[0];
- aura::test::EventGenerator generator(root_window);
+ ui::test::EventGenerator generator(root_window);
generator.PressMoveAndReleaseTouchTo(50, 50);
// Default test touches have radius_x/y = 1.0, with device scale
@@ -1213,7 +1213,7 @@ TEST_F(DisplayControllerTest, ConvertHostToRootCoords) {
EXPECT_EQ("0,0 300x450", root_windows[0]->bounds().ToString());
EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
- aura::test::EventGenerator generator(root_windows[0]);
+ ui::test::EventGenerator generator(root_windows[0]);
generator.MoveMouseToInHost(0, 0);
EXPECT_EQ("0,449", event_handler.GetLocationAndReset());
generator.MoveMouseToInHost(599, 0);
diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc
index 54dd0aa..55ccd03 100644
--- a/ash/display/display_manager_unittest.cc
+++ b/ash/display/display_manager_unittest.cc
@@ -15,11 +15,11 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "ui/aura/env.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window_observer.h"
#include "ui/aura/window_tree_host.h"
-#include "ui/gfx/display_observer.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/display.h"
+#include "ui/gfx/display_observer.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/screen_type_delegate.h"
@@ -613,7 +613,7 @@ TEST_F(DisplayManagerTest, MAYBE_EnsurePointerInDisplays) {
aura::Env* env = aura::Env::GetInstance();
- aura::test::EventGenerator generator(root_windows[0]);
+ ui::test::EventGenerator generator(root_windows[0]);
// Set the initial position.
generator.MoveMouseToInHost(350, 150);
@@ -1019,8 +1019,8 @@ TEST_F(DisplayManagerTest, MAYBE_UpdateMouseCursorAfterRotateZoom) {
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
aura::Env* env = aura::Env::GetInstance();
- aura::test::EventGenerator generator1(root_windows[0]);
- aura::test::EventGenerator generator2(root_windows[1]);
+ ui::test::EventGenerator generator1(root_windows[0]);
+ ui::test::EventGenerator generator2(root_windows[1]);
// Test on 1st display.
generator1.MoveMouseToInHost(150, 50);
diff --git a/ash/display/mirror_window_controller_unittest.cc b/ash/display/mirror_window_controller_unittest.cc
index 15f8c6a..a071279 100644
--- a/ash/display/mirror_window_controller_unittest.cc
+++ b/ash/display/mirror_window_controller_unittest.cc
@@ -12,12 +12,12 @@
#include "ash/test/mirror_window_test_api.h"
#include "base/command_line.h"
#include "base/strings/stringprintf.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/hit_test.h"
+#include "ui/events/test/event_generator.h"
namespace ash {
@@ -87,7 +87,7 @@ TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorBasic) {
EXPECT_TRUE(test_api.GetCursorWindow());
EXPECT_EQ("50,50 100x100", window->bounds().ToString());
- aura::test::EventGenerator generator(root);
+ ui::test::EventGenerator generator(root);
generator.MoveMouseTo(10, 10);
// Test if cursor movement is propertly reflected in mirror window.
@@ -144,7 +144,7 @@ TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorRotate) {
EXPECT_TRUE(test_api.GetCursorWindow());
EXPECT_EQ("50,50 100x100", window->bounds().ToString());
- aura::test::EventGenerator generator(root);
+ ui::test::EventGenerator generator(root);
generator.MoveMouseToInHost(100, 100);
// Test if cursor movement is propertly reflected in mirror window.
@@ -200,7 +200,7 @@ TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorLocations) {
UpdateDisplay("400x600*2,400x600");
aura::Window* root = Shell::GetInstance()->GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root);
+ ui::test::EventGenerator generator(root);
generator.MoveMouseToInHost(10, 20);
gfx::Point hot_point = test_api.GetCursorHotPoint();
diff --git a/ash/display/root_window_transformers_unittest.cc b/ash/display/root_window_transformers_unittest.cc
index 62d7681..7a7581c 100644
--- a/ash/display/root_window_transformers_unittest.cc
+++ b/ash/display/root_window_transformers_unittest.cc
@@ -17,10 +17,10 @@
#include "ash/test/mirror_window_test_api.h"
#include "base/synchronization/waitable_event.h"
#include "ui/aura/env.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_tracker.h"
#include "ui/events/event_handler.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/display.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/screen.h"
@@ -144,8 +144,8 @@ TEST_F(RootWindowTransformersTest, MAYBE_RotateAndMagnify) {
int64 display2_id = ScreenUtil::GetSecondaryDisplay().id();
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::test::EventGenerator generator1(root_windows[0]);
- aura::test::EventGenerator generator2(root_windows[1]);
+ ui::test::EventGenerator generator1(root_windows[0]);
+ ui::test::EventGenerator generator2(root_windows[1]);
magnifier->SetEnabled(true);
EXPECT_EQ(2.0f, magnifier->GetScale());
@@ -247,7 +247,7 @@ TEST_F(RootWindowTransformersTest, ScaleAndMagnify) {
EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
EXPECT_EQ(1.0f, GetStoredUIScale(display2.id()));
- aura::test::EventGenerator generator(root_windows[0]);
+ ui::test::EventGenerator generator(root_windows[0]);
generator.MoveMouseToInHost(500, 200);
EXPECT_EQ("299,150", event_handler.GetLocationAndReset());
magnifier->SetEnabled(false);
@@ -276,7 +276,7 @@ TEST_F(RootWindowTransformersTest, MAYBE_TouchScaleAndMagnify) {
gfx::Display display = Shell::GetScreen()->GetPrimaryDisplay();
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
aura::Window* root_window = root_windows[0];
- aura::test::EventGenerator generator(root_window);
+ ui::test::EventGenerator generator(root_window);
MagnificationController* magnifier =
Shell::GetInstance()->magnification_controller();
@@ -319,7 +319,7 @@ TEST_F(RootWindowTransformersTest, MAYBE_ConvertHostToRootCoords) {
EXPECT_EQ("0,0 300x450", root_windows[0]->bounds().ToString());
EXPECT_EQ(1.5f, GetStoredUIScale(display1.id()));
- aura::test::EventGenerator generator(root_windows[0]);
+ ui::test::EventGenerator generator(root_windows[0]);
generator.MoveMouseToInHost(300, 200);
magnifier->SetEnabled(true);
EXPECT_EQ("150,224", event_handler.GetLocationAndReset());
diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc
index c45ba68..48ff847 100644
--- a/ash/drag_drop/drag_drop_controller_unittest.cc
+++ b/ash/drag_drop/drag_drop_controller_unittest.cc
@@ -12,7 +12,6 @@
#include "base/location.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/capture_client.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/clipboard/clipboard.h"
@@ -24,6 +23,7 @@
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/events/gestures/gesture_types.h"
+#include "ui/events/test/event_generator.h"
#include "ui/events/test/events_test_utils.h"
#include "ui/gfx/animation/linear_animation.h"
#include "ui/gfx/image/image_skia_rep.h"
@@ -359,8 +359,8 @@ TEST_F(DragDropControllerTest, MAYBE_DragDropInSingleViewTest) {
AddViewToWidgetAndResize(widget.get(), drag_view);
ui::OSExchangeData data;
data.SetString(base::UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget->GetNativeView());
generator.PressLeftButton();
int num_drags = 17;
@@ -405,8 +405,8 @@ TEST_F(DragDropControllerTest, DragDropWithZeroDragUpdates) {
AddViewToWidgetAndResize(widget.get(), drag_view);
ui::OSExchangeData data;
data.SetString(base::UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget->GetNativeView());
generator.PressLeftButton();
int num_drags = drag_view->VerticalDragThreshold() + 1;
@@ -453,7 +453,7 @@ TEST_F(DragDropControllerTest, MAYBE_DragDropInMultipleViewsSingleWidgetTest) {
ui::OSExchangeData data;
data.SetString(base::UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseRelativeTo(widget->GetNativeView(),
drag_view1->bounds().CenterPoint());
generator.PressLeftButton();
@@ -519,8 +519,8 @@ TEST_F(DragDropControllerTest, MAYBE_DragDropInMultipleViewsMultipleWidgetsTest)
ui::OSExchangeData data;
data.SetString(base::UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget1->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget1->GetNativeView());
generator.PressLeftButton();
int num_drags = drag_view1->width();
@@ -577,7 +577,7 @@ TEST_F(DragDropControllerTest, MAYBE_ViewRemovedWhileInDragDropTest) {
ui::OSExchangeData data;
data.SetString(base::UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseToCenterOf(widget->GetNativeView());
generator.PressLeftButton();
@@ -638,8 +638,8 @@ TEST_F(DragDropControllerTest, DragLeavesClipboardAloneTest) {
DragTestView* drag_view = new DragTestView;
AddViewToWidgetAndResize(widget.get(), drag_view);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget->GetNativeView());
ui::OSExchangeData data;
std::string data_str("I am being dragged");
data.SetString(base::ASCIIToUTF16(data_str));
@@ -669,8 +669,8 @@ TEST_F(DragDropControllerTest, WindowDestroyedDuringDragDrop) {
ui::OSExchangeData data;
data.SetString(base::UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget->GetNativeView());
generator.PressLeftButton();
int num_drags = 17;
@@ -713,8 +713,8 @@ TEST_F(DragDropControllerTest, SyntheticEventsDuringDragDrop) {
AddViewToWidgetAndResize(widget.get(), drag_view);
ui::OSExchangeData data;
data.SetString(base::UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget->GetNativeView());
generator.PressLeftButton();
int num_drags = 17;
@@ -769,8 +769,8 @@ TEST_F(DragDropControllerTest, MAYBE_PressingEscapeCancelsDragDrop) {
AddViewToWidgetAndResize(widget.get(), drag_view);
ui::OSExchangeData data;
data.SetString(base::UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget->GetNativeView());
generator.PressLeftButton();
int num_drags = 17;
@@ -811,8 +811,8 @@ TEST_F(DragDropControllerTest, MAYBE_CaptureLostCancelsDragDrop) {
AddViewToWidgetAndResize(widget.get(), drag_view);
ui::OSExchangeData data;
data.SetString(base::UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget->GetNativeView());
generator.PressLeftButton();
int num_drags = 17;
@@ -873,8 +873,8 @@ TEST_F(DragDropControllerTest, TouchDragDropInMultipleWindows) {
ui::OSExchangeData data;
data.SetString(base::UTF8ToUTF16("I am being dragged"));
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget1->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget1->GetNativeView());
generator.PressTouch();
gfx::Point point = gfx::Rect(drag_view1->bounds()).CenterPoint();
DispatchGesture(ui::ET_GESTURE_LONG_PRESS, point);
@@ -923,8 +923,8 @@ TEST_F(DragDropControllerTest, TouchDragDropCancelsOnLongTap) {
scoped_ptr<views::Widget> widget(CreateNewWidget());
DragTestView* drag_view = new DragTestView;
AddViewToWidgetAndResize(widget.get(), drag_view);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget->GetNativeView());
generator.PressTouch();
gfx::Point point = gfx::Rect(drag_view->bounds()).CenterPoint();
@@ -949,8 +949,8 @@ TEST_F(DragDropControllerTest, TouchDragDropLongTapGestureIsForwarded) {
scoped_ptr<views::Widget> widget(CreateNewWidget());
DragTestView* drag_view = new DragTestView;
AddViewToWidgetAndResize(widget.get(), drag_view);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ widget->GetNativeView());
generator.PressTouch();
gfx::Point point = gfx::Rect(drag_view->bounds()).CenterPoint();
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index b5f9382..71f68e4 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -17,13 +17,13 @@
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/capture_client.h"
#include "ui/aura/client/focus_client.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/test/window_test_api.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/cursor/cursor.h"
#include "ui/events/event_handler.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
#include "ui/views/controls/textfield/textfield.h"
@@ -214,7 +214,7 @@ TEST_F(ExtendedDesktopTest, Activation) {
aura::client::GetFocusClient(root_windows[0])->GetFocusedWindow());
EXPECT_TRUE(wm::IsActiveWindow(widget_on_2nd->GetNativeView()));
- aura::test::EventGenerator& event_generator(GetEventGenerator());
+ ui::test::EventGenerator& event_generator(GetEventGenerator());
// Clicking a window changes the active window and active root window.
event_generator.MoveMouseToCenterOf(widget_on_1st->GetNativeView());
event_generator.ClickLeftButton();
@@ -253,7 +253,7 @@ TEST_F(ExtendedDesktopTest, SystemModal) {
EXPECT_EQ(root_windows[1], modal_widget->GetNativeView()->GetRootWindow());
EXPECT_EQ(root_windows[1], Shell::GetTargetRootWindow());
- aura::test::EventGenerator& event_generator(GetEventGenerator());
+ ui::test::EventGenerator& event_generator(GetEventGenerator());
// Clicking a widget on widget_on_1st display should not change activation.
event_generator.MoveMouseToCenterOf(widget_on_1st->GetNativeView());
@@ -391,7 +391,7 @@ TEST_F(ExtendedDesktopTest, Capture) {
EXPECT_EQ(r1_w1.get(),
aura::client::GetCaptureWindow(r2_w1->GetRootWindow()));
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseToCenterOf(r2_w1.get());
// |r1_w1| will receive the events because it has capture.
EXPECT_EQ("1 1 0", r1_d1.GetMouseMotionCountsAndReset());
@@ -458,7 +458,7 @@ TEST_F(ExtendedDesktopTest, CaptureEventLocation) {
r1_w1->SetCapture();
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseToCenterOf(r2_w1.get());
EXPECT_EQ(gfx::Point(1060, 60).ToString(),
generator.current_location().ToString());
@@ -493,7 +493,7 @@ TEST_F(ExtendedDesktopTest, CaptureEventLocationHighDPI) {
r1_w1->SetCapture();
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseToCenterOf(r2_w1.get());
EXPECT_EQ(gfx::Point(560, 60).ToString(),
generator.current_location().ToString());
@@ -528,7 +528,7 @@ TEST_F(ExtendedDesktopTest, CaptureEventLocationHighDPI_2) {
r1_w1->SetCapture();
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseToCenterOf(r2_w1.get());
EXPECT_EQ(gfx::Point(1060, 60).ToString(),
generator.current_location().ToString());
@@ -597,7 +597,7 @@ TEST_F(ExtendedDesktopTest, MoveWindowByMouseClick) {
MoveWindowByClickEventHandler event_handler(window.get());
window->AddPreTargetHandler(&event_handler);
- aura::test::EventGenerator& event_generator(GetEventGenerator());
+ ui::test::EventGenerator& event_generator(GetEventGenerator());
event_generator.MoveMouseToCenterOf(window.get());
event_generator.ClickLeftButton();
@@ -764,7 +764,7 @@ TEST_F(ExtendedDesktopTest, OpenSystemTray) {
SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
ASSERT_FALSE(tray->HasSystemBubble());
- aura::test::EventGenerator& event_generator(GetEventGenerator());
+ ui::test::EventGenerator& event_generator(GetEventGenerator());
// Opens the tray by a dummy click event and makes sure that adding/removing
// displays doesn't break anything.
@@ -866,7 +866,7 @@ TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) {
EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
// The lock window should get events on both root windows.
- aura::test::EventGenerator& event_generator(GetEventGenerator());
+ ui::test::EventGenerator& event_generator(GetEventGenerator());
event_generator.set_current_target(root_windows[0]);
event_generator.PressKey(ui::VKEY_A, 0);
@@ -917,7 +917,7 @@ TEST_F(ExtendedDesktopTest, PassiveGrab) {
widget->Show();
ASSERT_EQ("50,50 200x200", widget->GetWindowBoundsInScreen().ToString());
- aura::test::EventGenerator& generator(GetEventGenerator());
+ ui::test::EventGenerator& generator(GetEventGenerator());
generator.MoveMouseTo(150, 150);
EXPECT_EQ("100,100 150,150", event_handler.GetLocationsAndReset());
diff --git a/ash/first_run/first_run_helper_unittest.cc b/ash/first_run/first_run_helper_unittest.cc
index 15e42bf..df272aa 100644
--- a/ash/first_run/first_run_helper_unittest.cc
+++ b/ash/first_run/first_run_helper_unittest.cc
@@ -8,8 +8,8 @@
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/test/ash_test_base.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/events/event_handler.h"
+#include "ui/events/test/event_generator.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_delegate.h"
diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc
index 33c89c2..74569d3 100644
--- a/ash/focus_cycler_unittest.cc
+++ b/ash/focus_cycler_unittest.cc
@@ -15,10 +15,10 @@
#include "ash/system/tray/system_tray.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/window_util.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/events/test/event_generator.h"
#include "ui/views/accessible_pane_view.h"
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/widget/widget.h"
@@ -389,7 +389,7 @@ TEST_F(FocusCyclerTest, CycleFocusThroughWindowWithPanes) {
// Pressing "Escape" while on the status area should
// deactivate it, and activate the browser window.
aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator event_generator(root, root);
+ ui::test::EventGenerator event_generator(root, root);
event_generator.PressKey(ui::VKEY_ESCAPE, 0);
EXPECT_TRUE(wm::IsActiveWindow(browser_window));
EXPECT_EQ(focus_manager->GetFocusedView(), view1);
diff --git a/ash/frame/caption_buttons/frame_size_button_unittest.cc b/ash/frame/caption_buttons/frame_size_button_unittest.cc
index 74c8f14..02c6023 100644
--- a/ash/frame/caption_buttons/frame_size_button_unittest.cc
+++ b/ash/frame/caption_buttons/frame_size_button_unittest.cc
@@ -11,10 +11,10 @@
#include "ash/wm/window_state.h"
#include "base/i18n/rtl.h"
#include "grit/ash_resources.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/events/gestures/gesture_configuration.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
@@ -159,7 +159,7 @@ class FrameSizeButtonTest : public AshTestBase {
// Tests that pressing the left mouse button or tapping down on the size button
// puts the button into the pressed state.
TEST_F(FrameSizeButtonTest, PressedState) {
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseTo(CenterPointInScreen(size_button()));
generator.PressLeftButton();
EXPECT_EQ(views::Button::STATE_PRESSED, size_button()->state());
@@ -180,7 +180,7 @@ TEST_F(FrameSizeButtonTest, PressedState) {
TEST_F(FrameSizeButtonTest, ClickSizeButtonTogglesMaximize) {
EXPECT_FALSE(window_state()->IsMaximized());
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseTo(CenterPointInScreen(size_button()));
generator.ClickLeftButton();
RunAllPendingInMessageLoop();
@@ -207,7 +207,7 @@ TEST_F(FrameSizeButtonTest, ButtonDrag) {
// 1) Test by dragging the mouse.
// Snap right.
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseTo(CenterPointInScreen(size_button()));
generator.PressLeftButton();
generator.MoveMouseTo(CenterPointInScreen(close_button()));
@@ -264,7 +264,7 @@ TEST_F(FrameSizeButtonTest, ButtonDrag) {
TEST_F(FrameSizeButtonTest, SnapLeftOvershootMinimize) {
EXPECT_TRUE(window_state()->IsNormalStateType());
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseTo(CenterPointInScreen(size_button()));
generator.PressLeftButton();
@@ -281,7 +281,7 @@ TEST_F(FrameSizeButtonTest, SnapLeftOvershootMinimize) {
TEST_F(FrameSizeButtonTest, RightMouseButton) {
EXPECT_TRUE(window_state()->IsNormalStateType());
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseTo(CenterPointInScreen(size_button()));
generator.PressRightButton();
generator.ReleaseRightButton();
@@ -300,7 +300,7 @@ TEST_F(FrameSizeButtonTest, ResetButtonsAfterClick) {
// Pressing the size button should result in the size button being pressed and
// the minimize and close button icons changing.
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseTo(CenterPointInScreen(size_button()));
generator.PressLeftButton();
EXPECT_EQ(views::Button::STATE_NORMAL, minimize_button()->state());
@@ -371,7 +371,7 @@ TEST_F(FrameSizeButtonTest, SizeButtonPressedWhenSnapButtonHovered) {
// Pressing the size button should result in the size button being pressed and
// the minimize and close button icons changing.
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseTo(CenterPointInScreen(size_button()));
generator.PressLeftButton();
EXPECT_EQ(views::Button::STATE_NORMAL, minimize_button()->state());
@@ -441,7 +441,7 @@ TEST_F(FrameSizeButtonTestRTL, ButtonDrag) {
// Pressing the size button should swap the icons of the minimize and close
// buttons to icons for snapping right and for snapping left respectively.
- aura::test::EventGenerator& generator = GetEventGenerator();
+ ui::test::EventGenerator& generator = GetEventGenerator();
generator.MoveMouseTo(CenterPointInScreen(size_button()));
generator.PressLeftButton();
EXPECT_EQ(views::Button::STATE_NORMAL, minimize_button()->state());
diff --git a/ash/ime/candidate_view_unittest.cc b/ash/ime/candidate_view_unittest.cc
index 708ec92..92d14d2 100644
--- a/ash/ime/candidate_view_unittest.cc
+++ b/ash/ime/candidate_view_unittest.cc
@@ -6,8 +6,8 @@
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
+#include "ui/events/test/event_generator.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/fill_layout.h"
@@ -57,7 +57,7 @@ class CandidateViewTest : public views::ViewsTestBase,
widget_->Show();
aura::Window* native_window = widget_->GetNativeWindow();
- event_generator_.reset(new aura::test::EventGenerator(
+ event_generator_.reset(new ui::test::EventGenerator(
native_window->GetRootWindow(), native_window));
}
@@ -97,9 +97,7 @@ class CandidateViewTest : public views::ViewsTestBase,
return -1;
}
- aura::test::EventGenerator* event_generator() {
- return event_generator_.get();
- }
+ ui::test::EventGenerator* event_generator() { return event_generator_.get(); }
private:
virtual void ButtonPressed(views::Button* sender,
@@ -109,7 +107,7 @@ class CandidateViewTest : public views::ViewsTestBase,
views::Widget* widget_;
views::View* container_;
- scoped_ptr<aura::test::EventGenerator> event_generator_;
+ scoped_ptr<ui::test::EventGenerator> event_generator_;
views::View* last_pressed_;
DISALLOW_COPY_AND_ASSIGN(CandidateViewTest);
diff --git a/ash/magnifier/magnification_controller_unittest.cc b/ash/magnifier/magnification_controller_unittest.cc
index 54daf88..45ffce6 100644
--- a/ash/magnifier/magnification_controller_unittest.cc
+++ b/ash/magnifier/magnification_controller_unittest.cc
@@ -11,8 +11,8 @@
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/test/aura_test_utils.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window_tree_host.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/screen.h"
@@ -173,7 +173,7 @@ TEST_F(MagnificationControllerTest, MoveWindow) {
}
TEST_F(MagnificationControllerTest, PointOfInterest) {
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseToInHost(gfx::Point(0, 0));
EXPECT_EQ("0,0", CurrentPointOfInterest());
@@ -193,7 +193,7 @@ TEST_F(MagnificationControllerTest, PointOfInterest) {
TEST_F(MagnificationControllerTest, PanWindow2xLeftToRight) {
const aura::Env* env = aura::Env::GetInstance();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseToInHost(gfx::Point(0, 0));
EXPECT_EQ(1.f, GetMagnificationController()->GetScale());
@@ -297,7 +297,7 @@ TEST_F(MagnificationControllerTest, PanWindow2xLeftToRight) {
TEST_F(MagnificationControllerTest, PanWindow2xRightToLeft) {
const aura::Env* env = aura::Env::GetInstance();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseToInHost(gfx::Point(799, 300));
EXPECT_EQ(1.f, GetMagnificationController()->GetScale());
@@ -350,7 +350,7 @@ TEST_F(MagnificationControllerTest, PanWindow2xRightToLeft) {
TEST_F(MagnificationControllerTest, PanWindowToRight) {
const aura::Env* env = aura::Env::GetInstance();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseToInHost(gfx::Point(400, 300));
EXPECT_EQ(1.f, GetMagnificationController()->GetScale());
@@ -396,7 +396,7 @@ TEST_F(MagnificationControllerTest, PanWindowToRight) {
TEST_F(MagnificationControllerTest, PanWindowToLeft) {
const aura::Env* env = aura::Env::GetInstance();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseToInHost(gfx::Point(400, 300));
EXPECT_EQ(1.f, GetMagnificationController()->GetScale());
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
index 9202734..a692722 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -19,7 +19,6 @@
#include "ui/aura/client/focus_client.h"
#include "ui/aura/client/window_tree_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/test/test_windows.h"
#include "ui/aura/window.h"
@@ -30,6 +29,7 @@
#include "ui/base/ime/text_input_client.h"
#include "ui/base/ime/text_input_focus_manager.h"
#include "ui/base/ui_base_switches_util.h"
+#include "ui/events/test/event_generator.h"
#include "ui/events/test/test_event_handler.h"
#include "ui/keyboard/keyboard_controller_proxy.h"
#include "ui/keyboard/keyboard_switches.h"
@@ -281,7 +281,7 @@ TEST_F(RootWindowControllerTest, MoveWindows_Modal) {
modal->GetNativeView()));
EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
- aura::test::EventGenerator generator_1st(root_windows[0]);
+ ui::test::EventGenerator generator_1st(root_windows[0]);
generator_1st.ClickLeftButton();
EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
@@ -688,7 +688,7 @@ TEST_F(VirtualKeyboardRootWindowControllerTest,
ui::test::TestEventHandler handler;
root_window->AddPreTargetHandler(&handler);
- aura::test::EventGenerator event_generator(root_window, keyboard_window);
+ ui::test::EventGenerator event_generator(root_window, keyboard_window);
event_generator.ClickLeftButton();
int expected_mouse_presses = 1;
EXPECT_EQ(expected_mouse_presses, handler.num_mouse_events() / 2);
@@ -773,9 +773,9 @@ TEST_F(VirtualKeyboardRootWindowControllerTest, ClickWithActiveModalDialog) {
ui::test::TestEventHandler handler;
root_window->AddPreTargetHandler(&handler);
- aura::test::EventGenerator root_window_event_generator(root_window);
- aura::test::EventGenerator keyboard_event_generator(root_window,
- keyboard_window);
+ ui::test::EventGenerator root_window_event_generator(root_window);
+ ui::test::EventGenerator keyboard_event_generator(root_window,
+ keyboard_window);
views::Widget* modal_widget =
CreateModalWidget(gfx::Rect(300, 10, 100, 100));
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index 9f48d74..a6182ec 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -27,13 +27,13 @@
#include "base/command_line.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/aura_constants.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/layer_animator.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/events/gestures/gesture_configuration.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
#include "ui/views/controls/label.h"
@@ -408,7 +408,7 @@ void ShelfLayoutManagerTest::RunGestureDragTests(gfx::Vector2d delta) {
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
shelf->LayoutShelf();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
const int kNumScrollSteps = 4;
ShelfDragCallback handler(shelf_hidden, shelf_shown);
@@ -828,7 +828,7 @@ TEST_F(ShelfLayoutManagerTest, ShelfUpdatedWhenStatusAreaChangesSize) {
// Various assertions around auto-hide.
TEST_F(ShelfLayoutManagerTest, MAYBE_AutoHide) {
aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root, root);
+ ui::test::EventGenerator generator(root, root);
generator.MoveMouseTo(0, 0);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -919,7 +919,7 @@ TEST_F(ShelfLayoutManagerTest, AutoHideShelfOnScreenBoundary) {
int y = root_windows[0]->GetBoundsInScreen().y();
// Start off the mouse nowhere near the shelf; the shelf should be hidden.
- aura::test::EventGenerator& generator(GetEventGenerator());
+ ui::test::EventGenerator& generator(GetEventGenerator());
generator.MoveMouseTo(right_edge - 50, y);
UpdateAutoHideStateNow();
EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
@@ -987,8 +987,8 @@ TEST_F(ShelfLayoutManagerTest, AutoHideShelfOnScreenBoundary) {
TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) {
// 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);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -1040,8 +1040,8 @@ TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) {
TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) {
// 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);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -1085,8 +1085,8 @@ TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) {
TEST_F(ShelfLayoutManagerTest, TestDimmingBehavior) {
// 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);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -1159,8 +1159,8 @@ TEST_F(ShelfLayoutManagerTest, TestDimmingBehavior) {
TEST_F(ShelfLayoutManagerTest, TestDimmingBehaviorWithMenus) {
// 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);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -1229,8 +1229,8 @@ TEST_F(ShelfLayoutManagerTest, TestDimmingBehaviorWithMenus) {
TEST_F(ShelfLayoutManagerTest, VisibleWhenStatusOrShelfFocused) {
// 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);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -1532,7 +1532,7 @@ TEST_F(ShelfLayoutManagerTest, GestureEdgeSwipe) {
widget->Show();
widget->Maximize();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
aura::Window* window = widget->GetNativeWindow();
shelf->LayoutShelf();
@@ -1584,7 +1584,7 @@ TEST_F(ShelfLayoutManagerTest, GestureEdgeSwipeInMaximizeMode) {
wm::GetWindowState(window)->set_hide_shelf_when_fullscreen(false);
widget->SetFullscreen(true);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
// The maximize mode gets started.
shelf->OnMaximizeModeStarted();
@@ -1703,7 +1703,7 @@ TEST_F(ShelfLayoutManagerTest, ShelfAnimatesWhenGestureComplete) {
ui::ScopedAnimationDurationScaleMode regular_animations(
ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
gfx::Rect shelf_bounds_in_screen =
GetShelfWidget()->GetWindowBoundsInScreen();
gfx::Point start(shelf_bounds_in_screen.CenterPoint());
@@ -1735,7 +1735,7 @@ TEST_F(ShelfLayoutManagerTest, ShelfAnimatesWhenGestureComplete) {
gfx::Point start =
GetShelfWidget()->GetWindowBoundsInScreen().CenterPoint();
gfx::Point end(start.x(), start.y() - 100);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
// Test that the shelf animates to the visible bounds after a swipe up on
// the auto hidden shelf.
@@ -1769,7 +1769,7 @@ TEST_F(ShelfLayoutManagerTest, GestureRevealsTrayBubble) {
// Create a visible window so auto-hide behavior is enforced.
CreateTestWidget();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
SystemTray* tray = GetSystemTray();
// First, make sure the shelf is visible.
@@ -1910,7 +1910,7 @@ TEST_F(ShelfLayoutManagerTest, BubbleEnlargesShelfMouseHitArea) {
CreateTestWidget();
shelf->LayoutShelf();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
// Make two iterations - first without a message bubble which should make
// the shelf disappear and then with a message bubble which should keep it
@@ -2006,7 +2006,7 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_StatusAreaHitBoxCoversEdge) {
ShelfLayoutManager* shelf = GetShelfLayoutManager();
StatusAreaWidget* status_area_widget =
Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseTo(399,399);
// Test bottom right pixel for bottom alignment.
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index fb5c1db..1d7a8d0 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -37,13 +37,13 @@
#include "base/strings/string_number_conversions.h"
#include "grit/ash_resources.h"
#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/compositor/layer.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
+#include "ui/events/test/event_generator.h"
#include "ui/views/view_model.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
@@ -517,8 +517,8 @@ class ShelfViewTest : public AshTestBase {
gfx::Point center_point_of_drag_item =
drag_button->GetBoundsInScreen().CenterPoint();
- aura::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow(),
- center_point_of_drag_item);
+ ui::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow(),
+ center_point_of_drag_item);
// Rip an item off to OverflowBubble.
generator.PressLeftButton();
gfx::Point rip_off_point(center_point_of_drag_item.x(), 0);
@@ -1326,7 +1326,7 @@ TEST_F(ShelfViewTest, ShouldHideTooltipWithAppListWindowTest) {
TEST_F(ShelfViewTest, ShouldHideTooltipWhenHoveringOnTooltip) {
ShelfTooltipManager* tooltip_manager = shelf_view_->tooltip_manager();
tooltip_manager->CreateZeroDelayTimerForTest();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
// Move the mouse off any item and check that no tooltip is shown.
generator.MoveMouseTo(gfx::Point(0, 0));
@@ -1418,8 +1418,8 @@ TEST_F(ShelfViewTest, OverflowBubbleSize) {
int item_width = test_for_overflow_view.GetButtonSize() +
test_for_overflow_view.GetButtonSpacing();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
ShelfButton* button = test_for_overflow_view.GetButton(ripped_index);
// Rip off the last visible item.
gfx::Point start_point = button->GetBoundsInScreen().CenterPoint();
@@ -1606,7 +1606,7 @@ TEST_F(ShelfViewTest, CheckRipOffFromLeftShelfAlignmentWithMultiMonitor) {
gfx::Point start_point = button->GetBoundsInScreen().CenterPoint();
wm::ConvertPointFromScreen(second_root, &start_point);
- aura::test::EventGenerator generator(second_root, start_point);
+ ui::test::EventGenerator generator(second_root, start_point);
// Rip off the browser item.
generator.PressLeftButton();
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index 5d3faf6..aafb8cd 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -25,10 +25,10 @@
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/models/simple_menu_model.h"
+#include "ui/events/test/event_generator.h"
#include "ui/events/test/events_test_utils.h"
#include "ui/events/test/test_event_handler.h"
#include "ui/gfx/size.h"
@@ -509,7 +509,7 @@ TEST_F(ShellTest, TestPreTargetHandlerOrder) {
TEST_F(ShellTest, EnvPreTargetHandler) {
ui::test::TestEventHandler event_handler;
aura::Env::GetInstance()->AddPreTargetHandler(&event_handler);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseBy(1, 1);
EXPECT_NE(0, event_handler.num_mouse_events());
aura::Env::GetInstance()->RemovePreTargetHandler(&event_handler);
diff --git a/ash/system/tray/system_tray_unittest.cc b/ash/system/tray/system_tray_unittest.cc
index c798e78..74c7c02 100644
--- a/ash/system/tray/system_tray_unittest.cc
+++ b/ash/system/tray/system_tray_unittest.cc
@@ -18,10 +18,10 @@
#include "ash/wm/window_util.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/base/ui_base_types.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/fill_layout.h"
@@ -417,8 +417,8 @@ TEST_F(SystemTrayTest, PersistentBubble) {
tray->ShowDefaultView(BUBBLE_CREATE_NEW);
ASSERT_TRUE(tray->HasSystemBubble());
{
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(5, 5));
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point(5, 5));
generator.ClickLeftButton();
ASSERT_FALSE(tray->HasSystemBubble());
}
@@ -431,8 +431,8 @@ TEST_F(SystemTrayTest, PersistentBubble) {
ASSERT_TRUE(tray->HasSystemBubble());
{
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(5, 5));
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point(5, 5));
generator.ClickLeftButton();
ASSERT_TRUE(tray->HasSystemBubble());
}
diff --git a/ash/system/user/tray_user_unittest.cc b/ash/system/user/tray_user_unittest.cc
index 25eae95..4868861 100644
--- a/ash/system/user/tray_user_unittest.cc
+++ b/ash/system/user/tray_user_unittest.cc
@@ -16,7 +16,7 @@
#include "ash/test/test_session_state_delegate.h"
#include "ash/test/test_shell_delegate.h"
#include "components/user_manager/user_info.h"
-#include "ui/aura/test/event_generator.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/animation/animation_container_element.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
@@ -34,13 +34,13 @@ class TrayUserTest : public ash::test::AshTestBase {
void InitializeParameters(int users_logged_in, bool multiprofile);
// Show the system tray menu using the provided event generator.
- void ShowTrayMenu(aura::test::EventGenerator* generator);
+ void ShowTrayMenu(ui::test::EventGenerator* generator);
// Move the mouse over the user item.
- void MoveOverUserItem(aura::test::EventGenerator* generator, int index);
+ void MoveOverUserItem(ui::test::EventGenerator* generator, int index);
// Click on the user item. Note that the tray menu needs to be shown.
- void ClickUserItem(aura::test::EventGenerator* generator, int index);
+ void ClickUserItem(ui::test::EventGenerator* generator, int index);
// Accessors to various system components.
ShelfLayoutManager* shelf() { return shelf_; }
@@ -104,7 +104,7 @@ void TrayUserTest::InitializeParameters(int users_logged_in,
tray_->AddTrayItem(tray_user_separator_);
}
-void TrayUserTest::ShowTrayMenu(aura::test::EventGenerator* generator) {
+void TrayUserTest::ShowTrayMenu(ui::test::EventGenerator* generator) {
gfx::Point center = tray()->GetBoundsInScreen().CenterPoint();
generator->MoveMouseTo(center.x(), center.y());
@@ -112,15 +112,15 @@ void TrayUserTest::ShowTrayMenu(aura::test::EventGenerator* generator) {
generator->ClickLeftButton();
}
-void TrayUserTest::MoveOverUserItem(aura::test::EventGenerator* generator,
- int index) {
+void TrayUserTest::MoveOverUserItem(ui::test::EventGenerator* generator,
+ int index) {
gfx::Point center =
tray_user(index)->GetUserPanelBoundsInScreenForTest().CenterPoint();
generator->MoveMouseTo(center.x(), center.y());
}
-void TrayUserTest::ClickUserItem(aura::test::EventGenerator* generator,
+void TrayUserTest::ClickUserItem(ui::test::EventGenerator* generator,
int index) {
MoveOverUserItem(generator, index);
generator->ClickLeftButton();
@@ -143,7 +143,7 @@ TEST_F(TrayUserTest, SingleUserModeDoesNotAllowAddingUser) {
InitializeParameters(1, false);
// Move the mouse over the status area and click to open the status menu.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
EXPECT_FALSE(tray()->IsAnyBubbleVisible());
@@ -172,7 +172,7 @@ TEST_F(TrayUserTest, MutiUserModeDoesNotAllowToAddUser) {
InitializeParameters(1, true);
// Move the mouse over the status area and click to open the status menu.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.set_async(false);
int max_users = delegate()->GetMaximumNumberOfLoggedInUsers();
@@ -232,7 +232,7 @@ TEST_F(TrayUserTest, MutiUserModeDoesNotAllowToAddUser) {
TEST_F(TrayUserTest, MutiUserModeButtonClicks) {
// Have two users.
InitializeParameters(2, true);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
ShowTrayMenu(&generator);
// Switch to a new user - which has a capitalized name.
diff --git a/ash/system/web_notification/web_notification_tray_unittest.cc b/ash/system/web_notification/web_notification_tray_unittest.cc
index 886e829..7f17c3b 100644
--- a/ash/system/web_notification/web_notification_tray_unittest.cc
+++ b/ash/system/web_notification/web_notification_tray_unittest.cc
@@ -22,8 +22,8 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
#include "ui/message_center/message_center_style.h"
@@ -437,7 +437,7 @@ TEST_F(WebNotificationTrayTest, MAYBE_PopupAndFullscreen) {
EXPECT_EQ(bottom_auto_hidden, bottom_fullscreen_hidden);
// Move the mouse cursor at the bottom, which shows the shelf.
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
gfx::Point bottom_right =
Shell::GetScreen()->GetPrimaryDisplay().bounds().bottom_right();
bottom_right.Offset(-1, -1);
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index 3bf53dd..70db370c 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -22,7 +22,7 @@
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/client/window_tree_client.h"
-#include "ui/aura/test/event_generator.h"
+#include "ui/aura/test/event_generator_delegate_aura.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
diff --git a/ash/tooltips/tooltip_controller_unittest.cc b/ash/tooltips/tooltip_controller_unittest.cc
index c7834f9..bb01730 100644
--- a/ash/tooltips/tooltip_controller_unittest.cc
+++ b/ash/tooltips/tooltip_controller_unittest.cc
@@ -6,10 +6,10 @@
#include "ash/test/ash_test_base.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/env.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/font.h"
#include "ui/gfx/point.h"
#include "ui/views/corewm/tooltip_controller.h"
@@ -105,7 +105,7 @@ TEST_F(TooltipControllerTest, HideTooltipWhenCursorHidden) {
EXPECT_EQ(base::string16(), helper_->GetTooltipText());
EXPECT_EQ(NULL, helper_->GetTooltipWindow());
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseRelativeTo(widget->GetNativeView(),
view->bounds().CenterPoint());
base::string16 expected_tooltip = base::ASCIIToUTF16("Tooltip Text");
@@ -148,7 +148,7 @@ TEST_F(TooltipControllerTest, TooltipsOnMultiDisplayShouldNotCrash) {
EXPECT_EQ(widget2->GetNativeView()->GetRootWindow(), root_windows[1]);
// Show tooltip on second display.
- aura::test::EventGenerator generator(root_windows[1]);
+ ui::test::EventGenerator generator(root_windows[1]);
generator.MoveMouseRelativeTo(widget2->GetNativeView(),
view2->bounds().CenterPoint());
helper_->FireTooltipTimer();
@@ -167,7 +167,7 @@ TEST_F(TooltipControllerTest, TooltipsOnMultiDisplayShouldNotCrash) {
// The tooltip should create a new aura window for itself, so we should still
// be able to show tooltips on the primary display.
- aura::test::EventGenerator generator1(root_windows[0]);
+ ui::test::EventGenerator generator1(root_windows[0]);
generator1.MoveMouseRelativeTo(widget1->GetNativeView(),
view1->bounds().CenterPoint());
helper_->FireTooltipTimer();
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);