summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 13:18:41 +0000
committermarkusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 13:18:41 +0000
commitdd131d3723dee3050b746319e437514d8fdb6bb1 (patch)
treec44435187d6d4df51dcf5e02b31be151de270390
parent2c6e3b04ca361d052f1e8fdc70983bcc7c379dba (diff)
downloadchromium_src-dd131d3723dee3050b746319e437514d8fdb6bb1.zip
chromium_src-dd131d3723dee3050b746319e437514d8fdb6bb1.tar.gz
chromium_src-dd131d3723dee3050b746319e437514d8fdb6bb1.tar.bz2
Revert 285209 "Cleanups for aura/test/event_generator.h (resolve..."
> 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 > > Review URL: https://codereview.chromium.org/406413004 TBR=tapted@chromium.org Review URL: https://codereview.chromium.org/413983006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285222 0039d316-1c4b-4281-b951-d872f2087c98
-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
-rw-r--r--athena/input/accelerator_manager_unittest.cc4
-rw-r--r--chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc6
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc18
-rw-r--r--chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc8
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc6
-rw-r--r--chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc11
-rw-r--r--chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc4
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura_unittest.cc6
-rw-r--r--content/browser/web_contents/aura/window_slider_unittest.cc18
-rw-r--r--content/browser/web_contents/touch_editable_impl_aura_browsertest.cc6
-rw-r--r--content/browser/web_contents/web_contents_view_aura_browsertest.cc12
-rw-r--r--ui/aura/BUILD.gn4
-rw-r--r--ui/aura/aura.gyp4
-rw-r--r--ui/aura/gestures/gesture_recognizer_unittest.cc10
-rw-r--r--ui/aura/test/event_generator.cc (renamed from ui/aura/test/event_generator_delegate_aura.cc)4
-rw-r--r--ui/aura/test/event_generator.h (renamed from ui/aura/test/event_generator_delegate_aura.h)14
-rw-r--r--ui/aura/window_event_dispatcher_unittest.cc32
-rw-r--r--ui/aura/window_unittest.cc24
-rw-r--r--ui/chromeos/touch_exploration_controller_unittest.cc6
-rw-r--r--ui/keyboard/keyboard_controller_unittest.cc4
-rw-r--r--ui/views/corewm/capture_controller_unittest.cc4
-rw-r--r--ui/views/corewm/desktop_capture_controller_unittest.cc4
-rw-r--r--ui/views/corewm/tooltip_controller_unittest.cc14
-rw-r--r--ui/views/touchui/touch_selection_controller_impl_unittest.cc8
-rw-r--r--ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc2
-rw-r--r--ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc8
-rw-r--r--ui/views/widget/widget_interactive_uitest.cc4
-rw-r--r--ui/wm/core/compound_event_filter_unittest.cc6
-rw-r--r--ui/wm/core/focus_controller_unittest.cc18
-rw-r--r--ui/wm/core/input_method_event_filter_unittest.cc6
75 files changed, 472 insertions, 453 deletions
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 71c0ad2..4fecc24 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);
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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) {
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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);
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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 db02d82..69db831 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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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 e9c6abe..21eb2ab 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());
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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 20df051..9344471 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();
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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 2af2dde..ff387aa 100644
--- a/ash/autoclick/autoclick_unittest.cc
+++ b/ash/autoclick/autoclick_unittest.cc
@@ -5,6 +5,7 @@
#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"
@@ -12,7 +13,6 @@
#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.
- ui::test::EventGenerator generator1(root_windows[0]);
+ aura::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.
- ui::test::EventGenerator generator2(root_windows[1]);
+ aura::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 bd8cf49..26e01cc 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());
- ui::test::EventGenerator generator(root_windows[0]);
+ aura::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();
- ui::test::EventGenerator generator1(root_windows[0]);
+ aura::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)
- ui::test::EventGenerator generator2(root_windows[1]);
+ aura::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()));
- ui::test::EventGenerator generator(root_windows[0]);
+ aura::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];
- ui::test::EventGenerator generator(root_window);
+ aura::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()));
- ui::test::EventGenerator generator(root_windows[0]);
+ aura::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 55ccd03..54dd0aa 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/events/test/event_generator.h"
-#include "ui/gfx/display.h"
#include "ui/gfx/display_observer.h"
+#include "ui/gfx/display.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();
- ui::test::EventGenerator generator(root_windows[0]);
+ aura::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();
- ui::test::EventGenerator generator1(root_windows[0]);
- ui::test::EventGenerator generator2(root_windows[1]);
+ aura::test::EventGenerator generator1(root_windows[0]);
+ aura::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 a071279..15f8c6a 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());
- ui::test::EventGenerator generator(root);
+ aura::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());
- ui::test::EventGenerator generator(root);
+ aura::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();
- ui::test::EventGenerator generator(root);
+ aura::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 7a7581c..62d7681 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();
- ui::test::EventGenerator generator1(root_windows[0]);
- ui::test::EventGenerator generator2(root_windows[1]);
+ aura::test::EventGenerator generator1(root_windows[0]);
+ aura::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()));
- ui::test::EventGenerator generator(root_windows[0]);
+ aura::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];
- ui::test::EventGenerator generator(root_window);
+ aura::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()));
- ui::test::EventGenerator generator(root_windows[0]);
+ aura::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 48ff847..c45ba68 100644
--- a/ash/drag_drop/drag_drop_controller_unittest.cc
+++ b/ash/drag_drop/drag_drop_controller_unittest.cc
@@ -12,6 +12,7 @@
#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"
@@ -23,7 +24,6 @@
#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"));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ aura::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"));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ aura::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"));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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"));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget1->GetNativeView());
+ aura::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"));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ aura::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"));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ aura::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"));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ aura::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"));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ aura::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"));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ aura::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"));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget1->GetNativeView());
+ aura::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);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ aura::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);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- widget->GetNativeView());
+ aura::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 71f68e4..b5f9382 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()));
- ui::test::EventGenerator& event_generator(GetEventGenerator());
+ aura::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());
- ui::test::EventGenerator& event_generator(GetEventGenerator());
+ aura::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()));
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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();
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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();
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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();
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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);
- ui::test::EventGenerator& event_generator(GetEventGenerator());
+ aura::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());
- ui::test::EventGenerator& event_generator(GetEventGenerator());
+ aura::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.
- ui::test::EventGenerator& event_generator(GetEventGenerator());
+ aura::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());
- ui::test::EventGenerator& generator(GetEventGenerator());
+ aura::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 df272aa..15e42bf 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 74569d3..33c89c2 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();
- ui::test::EventGenerator event_generator(root, root);
+ aura::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 02c6023..74c8f14 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) {
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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());
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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.
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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());
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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());
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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.
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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.
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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.
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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 92d14d2..708ec92 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 ui::test::EventGenerator(
+ event_generator_.reset(new aura::test::EventGenerator(
native_window->GetRootWindow(), native_window));
}
@@ -97,7 +97,9 @@ class CandidateViewTest : public views::ViewsTestBase,
return -1;
}
- ui::test::EventGenerator* event_generator() { return event_generator_.get(); }
+ aura::test::EventGenerator* event_generator() {
+ return event_generator_.get();
+ }
private:
virtual void ButtonPressed(views::Button* sender,
@@ -107,7 +109,7 @@ class CandidateViewTest : public views::ViewsTestBase,
views::Widget* widget_;
views::View* container_;
- scoped_ptr<ui::test::EventGenerator> event_generator_;
+ scoped_ptr<aura::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 45ffce6..54daf88 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) {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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 a692722..9202734 100644
--- a/ash/root_window_controller_unittest.cc
+++ b/ash/root_window_controller_unittest.cc
@@ -19,6 +19,7 @@
#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"
@@ -29,7 +30,6 @@
#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()));
- ui::test::EventGenerator generator_1st(root_windows[0]);
+ aura::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);
- ui::test::EventGenerator event_generator(root_window, keyboard_window);
+ aura::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);
- ui::test::EventGenerator root_window_event_generator(root_window);
- ui::test::EventGenerator keyboard_event_generator(root_window,
- keyboard_window);
+ aura::test::EventGenerator root_window_event_generator(root_window);
+ aura::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 a6182ec..9f48d74 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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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();
- ui::test::EventGenerator generator(root, root);
+ aura::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.
- ui::test::EventGenerator& generator(GetEventGenerator());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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 1d7a8d0..fb5c1db 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();
- ui::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow(),
- center_point_of_drag_item);
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::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);
- ui::test::EventGenerator generator(second_root, start_point);
+ aura::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 aafb8cd..5d3faf6 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);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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 74c7c02..c798e78 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());
{
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(5, 5));
+ aura::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());
{
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(5, 5));
+ aura::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 4868861..25eae95 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/events/test/event_generator.h"
+#include "ui/aura/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(ui::test::EventGenerator* generator);
+ void ShowTrayMenu(aura::test::EventGenerator* generator);
// Move the mouse over the user item.
- void MoveOverUserItem(ui::test::EventGenerator* generator, int index);
+ void MoveOverUserItem(aura::test::EventGenerator* generator, int index);
// Click on the user item. Note that the tray menu needs to be shown.
- void ClickUserItem(ui::test::EventGenerator* generator, int index);
+ void ClickUserItem(aura::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(ui::test::EventGenerator* generator) {
+void TrayUserTest::ShowTrayMenu(aura::test::EventGenerator* generator) {
gfx::Point center = tray()->GetBoundsInScreen().CenterPoint();
generator->MoveMouseTo(center.x(), center.y());
@@ -112,15 +112,15 @@ void TrayUserTest::ShowTrayMenu(ui::test::EventGenerator* generator) {
generator->ClickLeftButton();
}
-void TrayUserTest::MoveOverUserItem(ui::test::EventGenerator* generator,
- int index) {
+void TrayUserTest::MoveOverUserItem(aura::test::EventGenerator* generator,
+ int index) {
gfx::Point center =
tray_user(index)->GetUserPanelBoundsInScreenForTest().CenterPoint();
generator->MoveMouseTo(center.x(), center.y());
}
-void TrayUserTest::ClickUserItem(ui::test::EventGenerator* generator,
+void TrayUserTest::ClickUserItem(aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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 7f17c3b..886e829 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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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 70db370c..3bf53dd 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_delegate_aura.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_delegate.h"
diff --git a/ash/tooltips/tooltip_controller_unittest.cc b/ash/tooltips/tooltip_controller_unittest.cc
index bb01730..c7834f9 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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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.
- ui::test::EventGenerator generator(root_windows[1]);
+ aura::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.
- ui::test::EventGenerator generator1(root_windows[0]);
+ aura::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 05ceae3..da663d6 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,7 +86,8 @@ TEST_P(AppListControllerTest, ClickOutsideBubbleClosesBubble) {
aura::Window* app_window = shell->GetAppListWindow();
ASSERT_TRUE(app_window);
- ui::test::EventGenerator generator(shell->GetPrimaryRootWindow(), app_window);
+ aura::test::EventGenerator generator(shell->GetPrimaryRootWindow(),
+ app_window);
// Click on the bubble itself. The bubble should remain visible.
generator.ClickLeftButton();
EXPECT_TRUE(shell->GetAppListTargetVisibility());
@@ -111,7 +112,7 @@ TEST_P(AppListControllerTest, TapOutsideBubbleClosesBubble) {
ASSERT_TRUE(app_window);
gfx::Rect app_window_bounds = app_window->GetBoundsInRootWindow();
- ui::test::EventGenerator generator(shell->GetPrimaryRootWindow());
+ aura::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 98c70b0..82489dc 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);
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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 6c1412b..0c0ee28 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));
- ui::test::EventGenerator generator(root_window, root_window);
+ aura::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));
- ui::test::EventGenerator generator(root_window, root_window);
+ aura::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));
- ui::test::EventGenerator generator(root_window, root_window);
+ aura::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));
- ui::test::EventGenerator generator(root_window, root_window);
+ aura::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));
- ui::test::EventGenerator generator(root_window, window2.get());
+ aura::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 8694926..8868689 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);
- ui::test::EventGenerator& event_generator(GetEventGenerator());
+ aura::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);
- ui::test::EventGenerator& event_generator(GetEventGenerator());
+ aura::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());
- ui::test::EventGenerator& event_generator(GetEventGenerator());
+ aura::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();
- ui::test::EventGenerator& event_generator(GetEventGenerator());
+ aura::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 eea43c8..7c3f0e2 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,7 +113,8 @@ class LockStateControllerTest : public AshTestBase {
protected:
void GenerateMouseMoveEvent() {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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 39f77c7..089a232 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();
- ui::test::EventGenerator event_generator(root, root);
+ aura::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 445dd28..8dc5575 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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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 c53664c..dddfeb1 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) {
- ui::test::EventGenerator event_generator(window->GetRootWindow(), window);
+ aura::test::EventGenerator event_generator(window->GetRootWindow(), window);
gfx::RectF target = GetTransformedBounds(window);
event_generator.ClickLeftButton();
}
void SendKey(ui::KeyboardCode key) {
- ui::test::EventGenerator event_generator(Shell::GetPrimaryRootWindow());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window2.get());
+ aura::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);
- ui::test::EventGenerator event_generator(window2->GetRootWindow(), point);
+ aura::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);
- ui::test::EventGenerator event_generator1(window1->GetRootWindow(), point1);
+ aura::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);
- ui::test::EventGenerator event_generator2(window2->GetRootWindow(), point2);
+ aura::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 1489972..4faeacb 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();
- ui::test::EventGenerator& event_generator = GetEventGenerator();
+ aura::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 3b763b4..d908331 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) {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseTo(100, 100);
generator.PressLeftButton();
@@ -53,7 +53,7 @@ TEST_F(PartialScreenshotViewTest, BasicMouse) {
}
TEST_F(PartialScreenshotViewTest, BasicTouch) {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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 066c350..0503a82 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) {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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) {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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) {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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 705e364..06b6fce 100644
--- a/ash/wm/system_gesture_event_filter_unittest.cc
+++ b/ash/wm/system_gesture_event_filter_unittest.cc
@@ -22,6 +22,7 @@
#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"
@@ -30,7 +31,6 @@
#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,7 +249,8 @@ TEST_F(SystemGestureEventFilterTest, TwoFingerDrag) {
gfx::Point(350, 350),
};
- ui::test::EventGenerator generator(root_window, toplevel->GetNativeWindow());
+ aura::test::EventGenerator generator(root_window,
+ toplevel->GetNativeWindow());
wm::WindowState* toplevel_state =
wm::GetWindowState(toplevel->GetNativeWindow());
@@ -315,7 +316,7 @@ TEST_F(SystemGestureEventFilterTest, TwoFingerDragTwoWindows) {
second_bounds.origin() + gfx::Vector2d(40, 20)
};
- ui::test::EventGenerator generator(root_window);
+ aura::test::EventGenerator generator(root_window);
// Do not drag too fast to avoid fling.
generator.GestureMultiFingerScroll(kTouchPoints, points,
50, kSteps, 0, 150);
@@ -340,7 +341,8 @@ TEST_F(SystemGestureEventFilterTest, WindowsWithMaxSizeDontSnap) {
gfx::Point(bounds.x() + 30, bounds.y() + 20),
};
- ui::test::EventGenerator generator(root_window, toplevel->GetNativeWindow());
+ aura::test::EventGenerator generator(root_window,
+ toplevel->GetNativeWindow());
// Swipe down to minimize.
generator.GestureMultiFingerScroll(kTouchPoints, points, 15, kSteps, 0, 150);
@@ -403,7 +405,8 @@ TEST_F(SystemGestureEventFilterTest, DISABLED_TwoFingerDragEdge) {
EXPECT_EQ(HTLEFT, toplevel->GetNativeWindow()->delegate()->
GetNonClientComponent(points[1]));
- ui::test::EventGenerator generator(root_window, toplevel->GetNativeWindow());
+ aura::test::EventGenerator generator(root_window,
+ toplevel->GetNativeWindow());
bounds = toplevel->GetNativeWindow()->bounds();
// Swipe down. Nothing should happen.
@@ -463,7 +466,8 @@ TEST_F(SystemGestureEventFilterTest, TwoFingerDragDelayed) {
EXPECT_EQ(HTCAPTION, toplevel->GetNativeWindow()->delegate()->
GetNonClientComponent(points[1]));
- ui::test::EventGenerator generator(root_window, toplevel->GetNativeWindow());
+ aura::test::EventGenerator generator(root_window,
+ toplevel->GetNativeWindow());
bounds = toplevel->GetNativeWindow()->bounds();
// Swipe right and down starting with one finger.
@@ -498,7 +502,8 @@ TEST_F(SystemGestureEventFilterTest, ThreeFingerGestureStopsDrag) {
EXPECT_EQ(HTCAPTION, toplevel->GetNativeWindow()->delegate()->
GetNonClientComponent(points[1]));
- ui::test::EventGenerator generator(root_window, toplevel->GetNativeWindow());
+ aura::test::EventGenerator generator(root_window,
+ toplevel->GetNativeWindow());
bounds = toplevel->GetNativeWindow()->bounds();
// Swipe right and down starting with two fingers.
@@ -527,7 +532,7 @@ TEST_F(SystemGestureEventFilterTest, DragLeftNearEdgeSnaps) {
gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
};
aura::Window* toplevel_window = toplevel->GetNativeWindow();
- ui::test::EventGenerator generator(root_window, toplevel_window);
+ aura::test::EventGenerator generator(root_window, toplevel_window);
// Check that dragging left snaps before reaching the screen edge.
gfx::Rect work_area =
@@ -555,7 +560,7 @@ TEST_F(SystemGestureEventFilterTest, DragRightNearEdgeSnaps) {
gfx::Point(bounds.x() + bounds.width() / 2, bounds.y() + 5),
};
aura::Window* toplevel_window = toplevel->GetNativeWindow();
- ui::test::EventGenerator generator(root_window, toplevel_window);
+ aura::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 6bc665b..ac03c10 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.
- ui::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), parent.get());
+ aura::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.
- ui::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1);
+ aura::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.
- ui::test::EventGenerator e1(Shell::GetPrimaryRootWindow(),
- Shell::GetPrimaryRootWindow());
+ aura::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.
- ui::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), t1.get());
+ aura::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.
- ui::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), parent.get());
+ aura::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.
- ui::test::EventGenerator e2(Shell::GetPrimaryRootWindow(), unrelated.get());
+ aura::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()));
- ui::test::EventGenerator e1(Shell::GetPrimaryRootWindow(), main.get());
+ aura::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);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), center);
+ aura::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 7c4f4d6..74497f7 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) {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
generator.DragMouseBy(dx, dy);
}
void TouchDragFromCenterBy(aura::Window* window, int dx, int dy) {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ aura::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));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ aura::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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ aura::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)));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ aura::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,7 +598,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragMultipleWindows) {
// Try to drag |notmoved| window. This should not move the window.
{
gfx::Rect bounds = notmoved->bounds();
- ui::test::EventGenerator gen(Shell::GetPrimaryRootWindow(), notmoved.get());
+ aura::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,
@@ -617,8 +618,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragMultipleWindows) {
#endif
TEST_F(ToplevelWindowEventHandlerTest, MAYBE_EscapeReverts) {
scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMRIGHT));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
generator.PressLeftButton();
generator.MoveMouseBy(10, 11);
@@ -643,8 +644,8 @@ TEST_F(ToplevelWindowEventHandlerTest, MAYBE_MinimizeMaximizeCompletes) {
{
scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
target->Focus();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
generator.PressLeftButton();
generator.MoveMouseBy(10, 11);
RunAllPendingInMessageLoop();
@@ -663,8 +664,8 @@ TEST_F(ToplevelWindowEventHandlerTest, MAYBE_MinimizeMaximizeCompletes) {
{
scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
target->Focus();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- target.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
generator.PressLeftButton();
generator.MoveMouseBy(10, 11);
RunAllPendingInMessageLoop();
@@ -688,8 +689,8 @@ TEST_F(ToplevelWindowEventHandlerTest, RunMoveLoopFailsDuringInProgressDrag) {
EXPECT_EQ("0,0 100x100", window1->bounds().ToString());
scoped_ptr<aura::Window> window2(CreateWindow(HTCAPTION));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window1.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ window1.get());
window1->Focus();
generator.PressLeftButton();
generator.MoveMouseBy(10, 11);
@@ -707,7 +708,7 @@ TEST_F(ToplevelWindowEventHandlerTest, RunMoveLoopFailsDuringInProgressDrag) {
namespace {
-void SendMouseReleaseAndReleaseCapture(ui::test::EventGenerator* generator,
+void SendMouseReleaseAndReleaseCapture(aura::test::EventGenerator* generator,
aura::Window* window) {
generator->ReleaseLeftButton();
window->ReleaseCapture();
@@ -719,8 +720,8 @@ void SendMouseReleaseAndReleaseCapture(ui::test::EventGenerator* generator,
// immediately after the mouse release. views::Widget has this behavior.
TEST_F(ToplevelWindowEventHandlerTest, CaptureLossAfterMouseRelease) {
scoped_ptr<aura::Window> window(CreateWindow(HTNOWHERE));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ aura::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 e22c230..cc1a675 100644
--- a/ash/wm/window_manager_unittest.cc
+++ b/ash/wm/window_manager_unittest.cc
@@ -12,6 +12,7 @@
#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"
@@ -19,7 +20,6 @@
#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,7 +174,8 @@ TEST_F(WindowManagerTest, Focus) {
SK_ColorGRAY, -13, gfx::Rect(5, 470, 50, 50), w1.get()));
// Click on a sub-window (w121) to focus it.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w121.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ w121.get());
generator.ClickLeftButton();
aura::client::FocusClient* focus_client =
@@ -286,7 +287,8 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
{
// Click on window2.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w2.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ w2.get());
generator.ClickLeftButton();
// Window2 should have become active.
@@ -302,7 +304,8 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
{
// Click back on window1, but set it up so w1 doesn't activate on click.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w1.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ w1.get());
d1.set_activate(false);
generator.ClickLeftButton();
@@ -332,8 +335,8 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
{
scoped_ptr<aura::Window> w11(CreateTestWindowWithDelegate(
&wd, -11, gfx::Rect(10, 10, 10, 10), w1.get()));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- w11.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ w11.get());
// First set the focus to the child |w11|.
generator.ClickLeftButton();
EXPECT_EQ(w11.get(), focus_client->GetFocusedWindow());
@@ -358,7 +361,8 @@ TEST_F(WindowManagerTest, ActivateOnMouse) {
// Move focus to |w2| first.
scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(
&wd, -1, gfx::Rect(70, 70, 50, 50)));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w2.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ w2.get());
generator.ClickLeftButton();
EXPECT_EQ(w2.get(), focus_client->GetFocusedWindow());
EXPECT_FALSE(w11->CanFocus());
@@ -399,8 +403,8 @@ TEST_F(WindowManagerTest, PanelActivation) {
NonFocusableDelegate nfd;
scoped_ptr<aura::Window> w3(CreateTestWindowInShellWithDelegate(
&nfd, -1, gfx::Rect(70, 70, 50, 50)));
- ui::test::EventGenerator generator3(Shell::GetPrimaryRootWindow(),
- w3.get());
+ aura::test::EventGenerator generator3(Shell::GetPrimaryRootWindow(),
+ w3.get());
wm::ActivateWindow(p1.get());
EXPECT_TRUE(wm::IsActiveWindow(p1.get()));
generator3.ClickLeftButton();
@@ -727,7 +731,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) {
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::test::EventGenerator& generator = GetEventGenerator();
::wm::CursorManager* cursor_manager =
ash::Shell::GetInstance()->cursor_manager();
@@ -750,7 +754,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) {
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::test::EventGenerator& generator = GetEventGenerator();
::wm::CursorManager* cursor_manager =
ash::Shell::GetInstance()->cursor_manager();
@@ -773,7 +777,7 @@ TEST_F(WindowManagerTest, UpdateCursorVisibilityOnKeyEvent) {
}
TEST_F(WindowManagerTest, TestCursorClientObserver) {
- ui::test::EventGenerator& generator = GetEventGenerator();
+ aura::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 8fbb64f..1519d27 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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(10, 10));
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(10, 10));
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(90, 90));
+ aura::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);
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), center);
+ aura::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)));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point(10, 10));
+ aura::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());
{
- ui::test::EventGenerator generator(
+ aura::test::EventGenerator generator(
Shell::GetPrimaryRootWindow(),
parent->bounds().origin() +
gfx::Vector2d(10, parent->bounds().height() - 10));
@@ -496,7 +496,7 @@ TEST_F(WindowModalityControllerTest, ChildModalEventGenerator) {
}
{
- ui::test::EventGenerator generator(
+ aura::test::EventGenerator generator(
Shell::GetPrimaryRootWindow(),
parent->bounds().origin() + gfx::Vector2d(10, 10));
generator.ClickLeftButton();
@@ -511,7 +511,7 @@ TEST_F(WindowModalityControllerTest, ChildModalEventGenerator) {
}
{
- ui::test::EventGenerator generator(
+ aura::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 7a7da34..9ff1d7c 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);
- ui::test::EventGenerator generator(w1->GetRootWindow());
+ aura::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);
- ui::test::EventGenerator generator(w1->GetRootWindow());
+ aura::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);
- ui::test::EventGenerator generator(w1->GetRootWindow());
+ aura::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);
- ui::test::EventGenerator generator(w1->GetRootWindow());
+ aura::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 e9c9f15..f9a1e1a3 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();
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ aura::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());
- ui::test::EventGenerator generator2(second_root, window.get());
+ aura::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).
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ aura::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));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ aura::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));
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ aura::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();
- ui::test::EventGenerator generator(root, window.get());
+ aura::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();
- ui::test::EventGenerator generator(root, window.get());
+ aura::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();
- ui::test::EventGenerator generator(root, window.get());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- window.get());
+ aura::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);
- ui::test::EventGenerator generator(window->GetRootWindow());
+ aura::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();
- ui::test::EventGenerator generator(root, window.get());
+ aura::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();
- ui::test::EventGenerator generator(root, window.get());
+ aura::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();
- ui::test::EventGenerator generator(root, window.get());
+ aura::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 49af2b7..9fae0c9 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();
- ui::test::EventGenerator generator(window_->GetRootWindow());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
+ aura::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());
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- touch_resize_window_.get());
+ aura::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 e00390e..fcfa414 100644
--- a/ash/wm/workspace_controller_unittest.cc
+++ b/ash/wm/workspace_controller_unittest.cc
@@ -22,6 +22,7 @@
#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"
@@ -31,7 +32,6 @@
#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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::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) {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::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) {
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::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.
- ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::test::EventGenerator generator(
+ Shell::GetPrimaryRootWindow(), gfx::Point());
generator.MoveMouseTo(10, 10);
generator.PressLeftButton();
generator.MoveMouseTo(12, 12);
diff --git a/athena/input/accelerator_manager_unittest.cc b/athena/input/accelerator_manager_unittest.cc
index cd74ee1..4f4c753 100644
--- a/athena/input/accelerator_manager_unittest.cc
+++ b/athena/input/accelerator_manager_unittest.cc
@@ -6,7 +6,7 @@
#include "athena/input/public/input_manager.h"
#include "athena/test/athena_test_base.h"
-#include "ui/events/test/event_generator.h"
+#include "ui/aura/test/event_generator.h"
namespace athena {
namespace {
@@ -71,7 +71,7 @@ TEST_F(InputManagerTest, Basic) {
accelerator_manager->RegisterAccelerators(
data, arraysize(data), &test_handler);
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
generator.PressKey(ui::VKEY_A, ui::EF_NONE);
EXPECT_EQ(kInvalidCommandId, test_handler.GetFiredCommandIdAndReset());
diff --git a/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc b/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
index 1d0f2aa..0e78b04 100644
--- a/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
@@ -15,12 +15,12 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test_utils.h"
#include "ui/aura/client/cursor_client.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/window_tree_host.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/test/draw_waiter_for_test.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
-#include "ui/events/test/event_generator.h"
#include "ui/events/test/test_event_handler.h"
namespace ui {
@@ -81,7 +81,7 @@ private:
// after the touch exploration mode is turned off.
IN_PROC_BROWSER_TEST_F(TouchExplorationTest, ToggleOnOff) {
SwitchTouchExplorationMode(true);
- ui::test::EventGenerator generator(root_window_);
+ aura::test::EventGenerator generator(root_window_);
base::TimeDelta initial_time = Now();
ui::TouchEvent initial_press(
@@ -133,7 +133,7 @@ IN_PROC_BROWSER_TEST_F(TouchExplorationTest, ToggleOnOff) {
// finger is still on the screen.
IN_PROC_BROWSER_TEST_F(TouchExplorationTest, SplitTapExplore) {
SwitchTouchExplorationMode(true);
- ui::test::EventGenerator generator(root_window_);
+ aura::test::EventGenerator generator(root_window_);
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(root_window_);
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
index 558de84..275dcdb 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -58,9 +58,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/app_list/views/apps_grid_view.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/events/event.h"
-#include "ui/events/test/event_generator.h"
using apps::AppWindow;
using extensions::Extension;
@@ -268,7 +268,7 @@ class ShelfAppBrowserTest : public ExtensionBrowserTest {
// Try to rip off |item_index|.
void RipOffItemIndex(int index,
- ui::test::EventGenerator* generator,
+ aura::test::EventGenerator* generator,
ash::test::ShelfViewTestAPI* test,
RipOffCommand command) {
ash::ShelfButton* button = test->GetButton(index);
@@ -1607,8 +1607,8 @@ IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, ActivateAfterSessionRestore) {
// TODO(skuhne): Test is flaky with a real compositor: crbug.com/331924
IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, DISABLED_DragAndDrop) {
// Get a number of interfaces we need.
- ui::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::test::EventGenerator generator(
+ ash::Shell::GetPrimaryRootWindow(), gfx::Point());
ash::test::ShelfViewTestAPI test(
ash::test::ShelfTestAPI(shelf_).shelf_view());
AppListService* service = AppListService::Get(chrome::GetActiveDesktop());
@@ -1753,7 +1753,7 @@ IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTestWithMultiMonitor,
aura::Window* secondary_root_window = ash::Shell::GetAllRootWindows()[1];
ash::Shelf* secondary_shelf = ash::Shelf::ForWindow(secondary_root_window);
- ui::test::EventGenerator generator(secondary_root_window, gfx::Point());
+ aura::test::EventGenerator generator(secondary_root_window, gfx::Point());
ash::test::ShelfViewTestAPI test(
ash::test::ShelfTestAPI(secondary_shelf).shelf_view());
AppListService* service = AppListService::Get(chrome::GetActiveDesktop());
@@ -1832,8 +1832,8 @@ IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTestWithMultiMonitor,
// Do tests for removal of items from the shelf by dragging.
IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, DragOffShelf) {
- ui::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::test::EventGenerator generator(
+ ash::Shell::GetPrimaryRootWindow(), gfx::Point());
ash::test::ShelfViewTestAPI test(
ash::test::ShelfTestAPI(shelf_).shelf_view());
test.SetAnimationDuration(1); // Speed up animations for test.
@@ -1935,8 +1935,8 @@ IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, DragOffShelf) {
// Check that clicking on an app shelf item launches a new browser.
IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, ClickItem) {
// Get a number of interfaces we need.
- ui::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ aura::test::EventGenerator generator(
+ ash::Shell::GetPrimaryRootWindow(), gfx::Point());
ash::test::ShelfViewTestAPI test(
ash::test::ShelfTestAPI(shelf_).shelf_view());
AppListService* service = AppListService::Get(chrome::GetActiveDesktop());
diff --git a/chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc b/chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc
index 1d518bb..a3852d2 100644
--- a/chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc
+++ b/chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc
@@ -22,9 +22,9 @@
#include "content/public/browser/notification_service.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/test_utils.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/events/event_utils.h"
-#include "ui/events/test/event_generator.h"
#if defined(OS_CHROMEOS)
#include "chromeos/chromeos_switches.h"
@@ -80,7 +80,7 @@ class TabScrubberTest : public InProcessBrowserTest,
void SendScrubEvent(Browser* browser, int index) {
aura::Window* window = browser->window()->GetNativeWindow();
aura::Window* root = window->GetRootWindow();
- ui::test::EventGenerator event_generator(root, window);
+ aura::test::EventGenerator event_generator(root, window);
int active_index = browser->tab_strip_model()->active_index();
TabScrubber::Direction direction = index < active_index ?
TabScrubber::LEFT : TabScrubber::RIGHT;
@@ -107,7 +107,7 @@ class TabScrubberTest : public InProcessBrowserTest,
void Scrub(Browser* browser, int index, ScrubType scrub_type) {
aura::Window* window = browser->window()->GetNativeWindow();
aura::Window* root = window->GetRootWindow();
- ui::test::EventGenerator event_generator(root, window);
+ aura::test::EventGenerator event_generator(root, window);
event_generator.set_async(true);
activation_order_.clear();
int active_index = browser->tab_strip_model()->active_index();
@@ -150,7 +150,7 @@ class TabScrubberTest : public InProcessBrowserTest,
void SendScrubSequence(Browser* browser, int x_offset, int index) {
aura::Window* window = browser->window()->GetNativeWindow();
aura::Window* root = window->GetRootWindow();
- ui::test::EventGenerator event_generator(root, window);
+ aura::test::EventGenerator event_generator(root, window);
bool wait_for_active = false;
if (index != browser->tab_strip_model()->active_index()) {
wait_for_active = true;
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
index 46e29bd..cc064e1 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
@@ -18,6 +18,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "grit/generated_resources.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/clipboard/clipboard.h"
@@ -27,7 +28,6 @@
#include "ui/base/ui_base_switches.h"
#include "ui/events/event_processor.h"
#include "ui/events/event_utils.h"
-#include "ui/events/test/event_generator.h"
#include "ui/views/controls/textfield/textfield_test_api.h"
class OmniboxViewViewsTest : public InProcessBrowserTest {
@@ -73,8 +73,8 @@ class OmniboxViewViewsTest : public InProcessBrowserTest {
void TapBrowserWindowCenter() {
gfx::Point center = BrowserView::GetBrowserViewForBrowser(
browser())->GetBoundsInScreen().CenterPoint();
- ui::test::EventGenerator generator(
- browser()->window()->GetNativeWindow()->GetRootWindow());
+ aura::test::EventGenerator generator(browser()->window()->
+ GetNativeWindow()->GetRootWindow());
generator.GestureTapAt(center);
}
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
index 9632c6c..c7226a6 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
@@ -51,9 +51,8 @@
#include "ash/wm/window_util.h"
#include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/test/event_generator_delegate_aura.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/window_event_dispatcher.h"
-#include "ui/events/test/event_generator.h"
#endif
using content::WebContents;
@@ -361,8 +360,8 @@ class DetachToBrowserTabDragControllerTest
virtual void SetUpOnMainThread() OVERRIDE {
#if defined(OS_CHROMEOS)
- event_generator_.reset(
- new ui::test::EventGenerator(ash::Shell::GetPrimaryRootWindow()));
+ event_generator_.reset(new aura::test::EventGenerator(
+ ash::Shell::GetPrimaryRootWindow()));
#endif
}
@@ -376,7 +375,7 @@ class DetachToBrowserTabDragControllerTest
if (input_source() == INPUT_SOURCE_MOUSE)
return;
#if defined(OS_CHROMEOS)
- event_generator_.reset(new ui::test::EventGenerator(
+ event_generator_.reset(new aura::test::EventGenerator(
new ScreenEventGeneratorDelegate(ash::wm::GetRootWindowAt(point))));
#endif
}
@@ -530,7 +529,7 @@ class DetachToBrowserTabDragControllerTest
private:
#if defined(OS_CHROMEOS)
- scoped_ptr<ui::test::EventGenerator> event_generator_;
+ scoped_ptr<aura::test::EventGenerator> event_generator_;
#endif
DISALLOW_COPY_AND_ASSIGN(DetachToBrowserTabDragControllerTest);
diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc b/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc
index 5e1e389..a688ebf 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc
@@ -13,9 +13,9 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/test/base/in_process_browser_test.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/test/ui_controls.h"
-#include "ui/events/test/event_generator.h"
#include "ui/views/controls/menu/menu_controller.h"
#include "ui/views/view.h"
#include "ui/views/view_model.h"
@@ -54,7 +54,7 @@ gfx::Rect GetChromeIconBoundsForRootWindow(aura::Window* root_window) {
}
void OpenBrowserUsingShelfOnRootWindow(aura::Window* root_window) {
- ui::test::EventGenerator generator(root_window);
+ aura::test::EventGenerator generator(root_window);
gfx::Point center =
GetChromeIconBoundsForRootWindow(root_window).CenterPoint();
gfx::Display display =
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index a5cf62b..2e4cab0 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -39,6 +39,7 @@
#include "ui/aura/env.h"
#include "ui/aura/layout_manager.h"
#include "ui/aura/test/aura_test_helper.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_cursor_client.h"
#include "ui/aura/test/test_screen.h"
#include "ui/aura/test/test_window_delegate.h"
@@ -51,7 +52,6 @@
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/events/gestures/gesture_configuration.h"
-#include "ui/events/test/event_generator.h"
#include "ui/wm/core/default_activation_client.h"
using testing::_;
@@ -715,7 +715,7 @@ TEST_F(RenderWidgetHostViewAuraTest, DestroyPopupClickOutsidePopup) {
EXPECT_FALSE(parent_window->GetBoundsInRootWindow().Contains(click_point));
TestWindowObserver observer(window);
- ui::test::EventGenerator generator(window->GetRootWindow(), click_point);
+ aura::test::EventGenerator generator(window->GetRootWindow(), click_point);
generator.ClickLeftButton();
ASSERT_TRUE(parent_view_->HasFocus());
ASSERT_TRUE(observer.destroyed());
@@ -742,7 +742,7 @@ TEST_F(RenderWidgetHostViewAuraTest, DestroyPopupTapOutsidePopup) {
EXPECT_FALSE(parent_window->GetBoundsInRootWindow().Contains(tap_point));
TestWindowObserver observer(window);
- ui::test::EventGenerator generator(window->GetRootWindow(), tap_point);
+ aura::test::EventGenerator generator(window->GetRootWindow(), tap_point);
generator.GestureTapAt(tap_point);
ASSERT_TRUE(parent_view_->HasFocus());
ASSERT_TRUE(observer.destroyed());
diff --git a/content/browser/web_contents/aura/window_slider_unittest.cc b/content/browser/web_contents/aura/window_slider_unittest.cc
index 2aaaddc..4a2d0a5 100644
--- a/content/browser/web_contents/aura/window_slider_unittest.cc
+++ b/content/browser/web_contents/aura/window_slider_unittest.cc
@@ -8,6 +8,7 @@
#include "base/time/time.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_window_delegate.h"
#include "ui/aura/window.h"
#include "ui/base/hit_test.h"
@@ -16,7 +17,6 @@
#include "ui/compositor/test/layer_animator_test_controller.h"
#include "ui/events/event_processor.h"
#include "ui/events/event_utils.h"
-#include "ui/events/test/event_generator.h"
#include "ui/gfx/frame_time.h"
namespace content {
@@ -214,7 +214,7 @@ TEST_F(WindowSliderTest, WindowSlideUsingGesture) {
window->SetBounds(gfx::Rect(0, 0, 400, 400));
WindowSliderDelegateTest slider_delegate;
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
// Generate a horizontal overscroll.
WindowSlider* slider =
@@ -310,7 +310,7 @@ TEST_F(WindowSliderTest, WindowSlideIsCancelledOnEvent) {
new WindowSlider(&slider_delegate, root_window(), window.get());
for (int i = 0; events[i]; ++i) {
// Generate a horizontal overscroll.
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
generator.GestureScrollSequenceWithCallback(
gfx::Point(10, 10),
gfx::Point(80, 10),
@@ -352,7 +352,7 @@ TEST_F(WindowSliderTest, WindowSlideInterruptedThenContinues) {
gfx::Point(55, 10),
0, 0);
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
// Start the scroll sequence. Scroll forward so that |window|'s layer is the
// one animating.
@@ -452,7 +452,7 @@ TEST_F(WindowSliderTest, OwnerWindowChangesDuringWindowSlide) {
// Generate a horizontal scroll, and change the owner in the middle of the
// scroll.
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
aura::Window* old_window = window.get();
generator.GestureScrollSequenceWithCallback(
gfx::Point(10, 10),
@@ -484,7 +484,7 @@ TEST_F(WindowSliderTest, NoSlideWhenLayerCantBeCreated) {
WindowSlider* slider =
new WindowSlider(&slider_delegate, root_window(), window.get());
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
// No slide in progress should be reported during scroll since the layer
// wasn't created.
@@ -530,7 +530,7 @@ TEST_F(WindowSliderTest, OwnerIsDestroyedOnSliderDestroy) {
EXPECT_EQ(child_windows + 1, root_window()->children().size());
WindowSliderDeleteOwnerOnDestroy slider_delegate(window);
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
// Generate a horizontal overscroll.
scoped_ptr<WindowSlider> slider(
@@ -561,7 +561,7 @@ TEST_F(WindowSliderTest, OwnerIsDestroyedOnSlideComplete) {
EXPECT_EQ(child_windows + 1, root_window()->children().size());
WindowSliderDeleteOwnerOnComplete slider_delegate(window);
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
// Generate a horizontal overscroll.
new WindowSlider(&slider_delegate, root_window(), window);
@@ -598,7 +598,7 @@ TEST_F(WindowSliderTest, SwipeDuringSwipeAnimation) {
animator->set_disable_timer_for_test(true);
ui::LayerAnimatorTestController test_controller(animator);
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
// Swipe forward so that |window|'s layer is the one animating.
generator.GestureScrollSequence(
diff --git a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
index 421f4ba..a44174e 100644
--- a/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
+++ b/content/browser/web_contents/touch_editable_impl_aura_browsertest.cc
@@ -19,12 +19,12 @@
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/ui_base_switches.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/events/event_utils.h"
-#include "ui/events/test/event_generator.h"
using blink::WebInputEvent;
@@ -149,7 +149,7 @@ IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest,
RenderWidgetHostViewAura* rwhva = static_cast<RenderWidgetHostViewAura*>(
web_contents->GetRenderWidgetHostView());
aura::Window* content = web_contents->GetContentNativeView();
- ui::test::EventGenerator generator(content->GetRootWindow(), content);
+ aura::test::EventGenerator generator(content->GetRootWindow(), content);
gfx::Rect bounds = content->GetBoundsInRootWindow();
touch_editable->Reset();
@@ -331,7 +331,7 @@ IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest,
RenderWidgetHostViewAura* rwhva = static_cast<RenderWidgetHostViewAura*>(
web_contents->GetRenderWidgetHostView());
aura::Window* content = web_contents->GetContentNativeView();
- ui::test::EventGenerator generator(content->GetRootWindow(), content);
+ aura::test::EventGenerator generator(content->GetRootWindow(), content);
gfx::Rect bounds = content->GetBoundsInRootWindow();
EXPECT_EQ(GetRenderWidgetHostViewAura(touch_editable), rwhva);
diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
index 3b4ba77..673db0f 100644
--- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc
+++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
@@ -27,12 +27,12 @@
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "content/shell/browser/shell.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/events/event_processor.h"
#include "ui/events/event_utils.h"
-#include "ui/events/test/event_generator.h"
namespace content {
@@ -184,7 +184,7 @@ class WebContentsViewAuraTest : public ContentBrowserTest {
aura::Window* content = web_contents->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
- ui::test::EventGenerator generator(content->GetRootWindow(), content);
+ aura::test::EventGenerator generator(content->GetRootWindow(), content);
const int kScrollDurationMs = 20;
const int kScrollSteps = 10;
@@ -448,7 +448,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, MAYBE_OverscrollScreenshot) {
content::TitleWatcher title_watcher(web_contents, expected_title);
aura::Window* content = web_contents->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
- ui::test::EventGenerator generator(content->GetRootWindow(), content);
+ aura::test::EventGenerator generator(content->GetRootWindow(), content);
generator.GestureScrollSequence(
gfx::Point(bounds.x() + 2, bounds.y() + 10),
gfx::Point(bounds.right() - 10, bounds.y() + 10),
@@ -616,7 +616,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
aura::Window* content = web_contents->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
- ui::test::EventGenerator generator(content->GetRootWindow(), content);
+ aura::test::EventGenerator generator(content->GetRootWindow(), content);
generator.GestureScrollSequence(
gfx::Point(bounds.x() + 2, bounds.y() + 10),
gfx::Point(bounds.right() - 10, bounds.y() + 10),
@@ -637,7 +637,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, ContentWindowClose) {
aura::Window* content = web_contents->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
- ui::test::EventGenerator generator(content->GetRootWindow(), content);
+ aura::test::EventGenerator generator(content->GetRootWindow(), content);
generator.GestureScrollSequence(
gfx::Point(bounds.x() + 2, bounds.y() + 10),
gfx::Point(bounds.right() - 10, bounds.y() + 10),
@@ -685,7 +685,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
aura::Window* content = web_contents->GetContentNativeView();
gfx::Rect bounds = content->GetBoundsInRootWindow();
- ui::test::EventGenerator generator(content->GetRootWindow(), content);
+ aura::test::EventGenerator generator(content->GetRootWindow(), content);
// Do a swipe left to start a forward navigation. Then quickly do a swipe
// right.
diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn
index 6395c56..c3a6942 100644
--- a/ui/aura/BUILD.gn
+++ b/ui/aura/BUILD.gn
@@ -150,8 +150,8 @@ source_set("test_support") {
"test/aura_test_utils.cc",
"test/aura_test_utils.h",
"test/env_test_helper.h",
- "test/event_generator_delegate_aura.cc",
- "test/event_generator_delegate_aura.h",
+ "test/event_generator.cc",
+ "test/event_generator.h",
"test/test_cursor_client.cc",
"test/test_cursor_client.h",
"test/test_focus_client.cc",
diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp
index 84e5477..6a5788f 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -168,8 +168,8 @@
'test/aura_test_utils.cc',
'test/aura_test_utils.h',
'test/env_test_helper.h',
- 'test/event_generator_delegate_aura.cc',
- 'test/event_generator_delegate_aura.h',
+ 'test/event_generator.cc',
+ 'test/event_generator.h',
'test/test_cursor_client.cc',
'test/test_cursor_client.h',
'test/test_focus_client.cc',
diff --git a/ui/aura/gestures/gesture_recognizer_unittest.cc b/ui/aura/gestures/gesture_recognizer_unittest.cc
index ad99093..872fded 100644
--- a/ui/aura/gestures/gesture_recognizer_unittest.cc
+++ b/ui/aura/gestures/gesture_recognizer_unittest.cc
@@ -10,6 +10,7 @@
#include "testing/gtest/include/gtest/gtest.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/aura/window.h"
@@ -23,7 +24,6 @@
#include "ui/events/gestures/gesture_recognizer_impl.h"
#include "ui/events/gestures/gesture_sequence.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/point.h"
#include "ui/gfx/rect.h"
@@ -2472,7 +2472,7 @@ TEST_P(GestureRecognizerTest, GestureEndLocation) {
GestureEventConsumeDelegate delegate;
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate(
&delegate, -1234, gfx::Rect(10, 10, 300, 300), root_window()));
- ui::test::EventGenerator generator(root_window(), window.get());
+ EventGenerator generator(root_window(), window.get());
const gfx::Point begin(20, 20);
const gfx::Point end(150, 150);
const gfx::Vector2d window_offset =
@@ -2495,7 +2495,7 @@ TEST_P(GestureRecognizerTest, CaptureSendsGestureEnd) {
scoped_ptr<aura::Window> window(CreateTestWindowWithDelegate(
delegate.get(), -1234, gfx::Rect(10, 10, 300, 300), root_window()));
- ui::test::EventGenerator generator(root_window());
+ EventGenerator generator(root_window());
generator.MoveMouseRelativeTo(window.get(), gfx::Point(10, 10));
generator.PressTouch();
@@ -2526,7 +2526,7 @@ TEST_P(GestureRecognizerTest, CaptureDoesNotCancelFinishedTouches) {
-1234, gfx::Rect(10, 10, 300, 300), root_window()));
window1->SetCapture();
- ui::test::EventGenerator generator(root_window());
+ EventGenerator generator(root_window());
TimedEvents tes;
// Generate two touch-press events on the window.
@@ -2865,7 +2865,7 @@ TEST_P(GestureRecognizerTest, MultiFingerSwipe) {
gfx::Point(80, 50)
};
- ui::test::EventGenerator generator(root_window(), window.get());
+ aura::test::EventGenerator generator(root_window(), window.get());
// The unified gesture recognizer assumes a finger has stopped if it hasn't
// moved for too long. See ui/events/gesture_detection/velocity_tracker.cc's
diff --git a/ui/aura/test/event_generator_delegate_aura.cc b/ui/aura/test/event_generator.cc
index a32ab5b..e899afd 100644
--- a/ui/aura/test/event_generator_delegate_aura.cc
+++ b/ui/aura/test/event_generator.cc
@@ -1,8 +1,8 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/aura/test/event_generator_delegate_aura.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/window_event_dispatcher.h"
diff --git a/ui/aura/test/event_generator_delegate_aura.h b/ui/aura/test/event_generator.h
index 5850789..aed36d6 100644
--- a/ui/aura/test/event_generator_delegate_aura.h
+++ b/ui/aura/test/event_generator.h
@@ -1,9 +1,11 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_AURA_TEST_EVENT_GENERATOR_DELEGATE_AURA_H_
-#define UI_AURA_TEST_EVENT_GENERATOR_DELEGATE_AURA_H_
+// TODO(tapted): Rename this file event_generator_delegate_aura.h.
+
+#ifndef UI_AURA_TEST_EVENT_GENERATOR_H_
+#define UI_AURA_TEST_EVENT_GENERATOR_H_
#include "ui/events/test/event_generator.h"
@@ -49,7 +51,11 @@ class EventGeneratorDelegateAura : public ui::test::EventGeneratorDelegate {
DISALLOW_COPY_AND_ASSIGN(EventGeneratorDelegateAura);
};
+// Expose the EventGenerator from ui::test in the aura::test namespace.
+// TODO(tapted): Remove this.
+using ui::test::EventGenerator;
+
} // namespace test
} // namespace aura
-#endif // UI_AURA_TEST_EVENT_GENERATOR_DELEGATE_AURA_H_
+#endif // UI_AURA_TEST_EVENT_GENERATOR_H_
diff --git a/ui/aura/window_event_dispatcher_unittest.cc b/ui/aura/window_event_dispatcher_unittest.cc
index 13403e7..55b7eaa 100644
--- a/ui/aura/window_event_dispatcher_unittest.cc
+++ b/ui/aura/window_event_dispatcher_unittest.cc
@@ -15,6 +15,7 @@
#include "ui/aura/env.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/test/env_test_helper.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_cursor_client.h"
#include "ui/aura/test/test_screen.h"
#include "ui/aura/test/test_window_delegate.h"
@@ -27,7 +28,6 @@
#include "ui/events/event_utils.h"
#include "ui/events/gestures/gesture_configuration.h"
#include "ui/events/keycodes/keyboard_codes.h"
-#include "ui/events/test/event_generator.h"
#include "ui/events/test/test_event_handler.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
@@ -318,7 +318,7 @@ TEST_F(WindowEventDispatcherTest, CanProcessEventsWithinSubtree) {
{
// Attempting to send a key event to w1 (not in the lock container) should
// cause focus to be reset.
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.PressKey(ui::VKEY_SPACE, 0);
EXPECT_EQ(NULL, client::GetFocusClient(w1)->GetFocusedWindow());
EXPECT_FALSE(IsFocusedWindow(w1));
@@ -327,12 +327,12 @@ TEST_F(WindowEventDispatcherTest, CanProcessEventsWithinSubtree) {
{
// Events sent to a window not in the lock container will not be processed.
// i.e. never sent to the non-lock container's event filter.
- ui::test::EventGenerator generator(root_window(), w1);
+ test::EventGenerator generator(root_window(), w1);
generator.ClickLeftButton();
EXPECT_EQ(0, nonlock_ef.num_mouse_events());
// Events sent to a window in the lock container will be processed.
- ui::test::EventGenerator generator3(root_window(), w3.get());
+ test::EventGenerator generator3(root_window(), w3.get());
generator3.PressLeftButton();
EXPECT_EQ(1, lock_ef.num_mouse_events());
}
@@ -826,7 +826,7 @@ TEST_F(WindowEventDispatcherTest, TouchMovesHeldOnScroll) {
&delegate, 1, gfx::Rect(50, 50, 100, 100), root_window()));
window->AddPreTargetHandler(&handler);
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.GestureScrollSequence(
gfx::Point(60, 60), gfx::Point(10, 60),
base::TimeDelta::FromMilliseconds(100), 25);
@@ -1163,7 +1163,7 @@ TEST_F(WindowEventDispatcherTest, DeleteWindowDuringDispatch) {
w1->AddPreTargetHandler(&w1_filter);
client::GetFocusClient(w1.get())->FocusWindow(w11);
- ui::test::EventGenerator generator(root_window(), w11);
+ test::EventGenerator generator(root_window(), w11);
// First up, no one deletes anything.
tracker.Add(w11);
@@ -1227,7 +1227,7 @@ TEST_F(WindowEventDispatcherTest,
DetachesParentOnTapDelegate delegate;
scoped_ptr<Window> parent(CreateNormalWindow(22, w1.get(), NULL));
Window* child = CreateNormalWindow(11, parent.get(), &delegate);
- ui::test::EventGenerator generator(root_window(), child);
+ test::EventGenerator generator(root_window(), child);
generator.GestureTapAt(gfx::Point(40, 40));
}
@@ -1236,7 +1236,7 @@ namespace {
// A window delegate that processes nested gestures on tap.
class NestedGestureDelegate : public test::TestWindowDelegate {
public:
- NestedGestureDelegate(ui::test::EventGenerator* generator,
+ NestedGestureDelegate(test::EventGenerator* generator,
const gfx::Point tap_location)
: generator_(generator),
tap_location_(tap_location),
@@ -1264,7 +1264,7 @@ class NestedGestureDelegate : public test::TestWindowDelegate {
}
}
- ui::test::EventGenerator* generator_;
+ test::EventGenerator* generator_;
const gfx::Point tap_location_;
int gesture_end_count_;
DISALLOW_COPY_AND_ASSIGN(NestedGestureDelegate);
@@ -1278,13 +1278,13 @@ TEST_F(WindowEventDispatcherTest, GestureEndDeliveredAfterNestedGestures) {
scoped_ptr<Window> w1(CreateNormalWindow(1, root_window(), &d1));
w1->SetBounds(gfx::Rect(0, 0, 100, 100));
- ui::test::EventGenerator nested_generator(root_window(), w1.get());
+ test::EventGenerator nested_generator(root_window(), w1.get());
NestedGestureDelegate d2(&nested_generator, w1->bounds().CenterPoint());
scoped_ptr<Window> w2(CreateNormalWindow(1, root_window(), &d2));
w2->SetBounds(gfx::Rect(100, 0, 100, 100));
// Tap on w2 which triggers nested gestures for w1.
- ui::test::EventGenerator generator(root_window(), w2.get());
+ test::EventGenerator generator(root_window(), w2.get());
generator.GestureTapAt(w2->bounds().CenterPoint());
// Both windows should get their gesture end events.
@@ -1401,11 +1401,11 @@ TEST_F(WindowEventDispatcherTest, GestureRepostEventOrder) {
// Generate a tap down gesture for the repost_source. This will be reposted
// to repost_target.
- ui::test::EventGenerator repost_generator(root_window(), repost_source.get());
+ test::EventGenerator repost_generator(root_window(), repost_source.get());
repost_generator.GestureTapAt(gfx::Point(40, 40));
RunAllPendingInMessageLoop();
- ui::test::EventGenerator scroll_generator(root_window(), repost_target.get());
+ test::EventGenerator scroll_generator(root_window(), repost_target.get());
scroll_generator.GestureScrollSequence(
gfx::Point(80, 80),
gfx::Point(100, 100),
@@ -1465,7 +1465,7 @@ TEST_F(WindowEventDispatcherTest, DeleteWindowDuringMouseMovedDispatch) {
w1->SetBounds(gfx::Rect(20, 20, 60, 60));
EXPECT_EQ(NULL, host()->dispatcher()->mouse_moved_handler());
- ui::test::EventGenerator generator(root_window(), w1.get());
+ test::EventGenerator generator(root_window(), w1.get());
// Move mouse over window 1 to set it as the |mouse_moved_handler_| for the
// root window.
@@ -1966,7 +1966,7 @@ TEST_F(WindowEventDispatcherTestInHighDPI, TouchMovesHeldOnScroll) {
&delegate, 1, gfx::Rect(50, 50, 100, 100), root_window()));
window->AddPreTargetHandler(&handler);
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.GestureScrollSequence(
gfx::Point(120, 120), gfx::Point(20, 120),
base::TimeDelta::FromMilliseconds(100), 25);
@@ -2008,7 +2008,7 @@ class SelfDestructDelegate : public test::TestWindowDelegate {
};
TEST_F(WindowEventDispatcherTest, SynthesizedLocatedEvent) {
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.MoveMouseTo(10, 10);
EXPECT_EQ("10,10",
Env::GetInstance()->last_mouse_location().ToString());
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index a468cda..d398eb2 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -20,6 +20,7 @@
#include "ui/aura/client/window_tree_client.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/test/aura_test_utils.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/test/window_test_api.h"
@@ -38,7 +39,6 @@
#include "ui/events/event_utils.h"
#include "ui/events/gestures/gesture_configuration.h"
#include "ui/events/keycodes/keyboard_codes.h"
-#include "ui/events/test/event_generator.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/skia_util.h"
@@ -781,7 +781,7 @@ TEST_F(WindowTest, CaptureTests) {
EXPECT_TRUE(window->HasCapture());
EXPECT_EQ(0, delegate.capture_lost_count());
EXPECT_EQ(0, delegate.capture_changed_event_count());
- ui::test::EventGenerator generator(root_window(), gfx::Point(50, 50));
+ EventGenerator generator(root_window(), gfx::Point(50, 50));
generator.PressLeftButton();
EXPECT_EQ(1, delegate.mouse_event_count());
generator.ReleaseLeftButton();
@@ -1039,7 +1039,7 @@ TEST_F(WindowTest, ChangeCaptureWhileMouseDown) {
EXPECT_TRUE(window->HasCapture());
EXPECT_EQ(0, delegate.capture_lost_count());
EXPECT_EQ(0, delegate.capture_changed_event_count());
- ui::test::EventGenerator generator(root_window(), gfx::Point(50, 50));
+ EventGenerator generator(root_window(), gfx::Point(50, 50));
generator.PressLeftButton();
EXPECT_EQ(0, delegate.capture_lost_count());
EXPECT_EQ(0, delegate.capture_changed_event_count());
@@ -1142,7 +1142,7 @@ TEST_F(WindowTest, MouseEnterExit) {
CreateTestWindowWithDelegate(&d2, 2, gfx::Rect(70, 70, 50, 50),
root_window()));
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w1.get());
EXPECT_TRUE(d1.entered());
EXPECT_FALSE(d1.exited());
@@ -1163,7 +1163,7 @@ TEST_F(WindowTest, WindowTreeHostExit) {
CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50),
root_window()));
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w1.get());
EXPECT_TRUE(d1.entered());
EXPECT_FALSE(d1.exited());
@@ -1189,7 +1189,7 @@ TEST_F(WindowTest, MouseEnterExitWithClick) {
CreateTestWindowWithDelegate(&d2, 2, gfx::Rect(70, 70, 50, 50),
root_window()));
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w1.get());
EXPECT_TRUE(d1.entered());
EXPECT_FALSE(d1.exited());
@@ -1215,7 +1215,7 @@ TEST_F(WindowTest, MouseEnterExitWhenDeleteWithCapture) {
CreateTestWindowWithDelegate(&delegate, 1, gfx::Rect(10, 10, 50, 50),
root_window()));
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(window.get());
EXPECT_TRUE(delegate.entered());
EXPECT_FALSE(delegate.exited());
@@ -1243,7 +1243,7 @@ TEST_F(WindowTest, MouseEnterExitWithDelete) {
CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50),
root_window()));
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w1.get());
EXPECT_TRUE(d1.entered());
EXPECT_FALSE(d1.exited());
@@ -1277,7 +1277,7 @@ TEST_F(WindowTest, MouseEnterExitWithHide) {
CreateTestWindowWithDelegate(&d1, 1, gfx::Rect(10, 10, 50, 50),
root_window()));
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w1.get());
EXPECT_TRUE(d1.entered());
EXPECT_FALSE(d1.exited());
@@ -1309,7 +1309,7 @@ TEST_F(WindowTest, MouseEnterExitWithParentHide) {
MouseEnterExitWindowDelegate d2;
Window* w2 = CreateTestWindowWithDelegate(&d2, 2, gfx::Rect(10, 10, 50, 50),
w1.get());
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w2);
// Enters / exits can be send asynchronously.
RunAllPendingInMessageLoop();
@@ -1333,7 +1333,7 @@ TEST_F(WindowTest, MouseEnterExitWithParentDelete) {
MouseEnterExitWindowDelegate d2;
Window* w2 = CreateTestWindowWithDelegate(&d2, 2, gfx::Rect(10, 10, 50, 50),
w1.get());
- ui::test::EventGenerator generator(root_window());
+ test::EventGenerator generator(root_window());
generator.MoveMouseToCenterOf(w2);
// Enters / exits can be send asynchronously.
@@ -2024,7 +2024,7 @@ TEST_F(WindowTest, VisibilityClientIsVisible) {
TEST_F(WindowTest, MouseEventsOnWindowChange) {
gfx::Size size = host()->GetBounds().size();
- ui::test::EventGenerator generator(root_window());
+ EventGenerator generator(root_window());
generator.MoveMouseTo(50, 50);
EventCountDelegate d1;
diff --git a/ui/chromeos/touch_exploration_controller_unittest.cc b/ui/chromeos/touch_exploration_controller_unittest.cc
index 1f1155f..b00814b 100644
--- a/ui/chromeos/touch_exploration_controller_unittest.cc
+++ b/ui/chromeos/touch_exploration_controller_unittest.cc
@@ -8,12 +8,12 @@
#include "base/time/time.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/test/aura_test_base.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_cursor_client.h"
#include "ui/aura/window.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/events/gestures/gesture_provider_aura.h"
-#include "ui/events/test/event_generator.h"
#include "ui/events/test/events_test_utils.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gl/gl_implementation.h"
@@ -171,7 +171,7 @@ class TouchExplorationTest : public aura::test::AuraTestBase {
aura::test::AuraTestBase::SetUp();
cursor_client_.reset(new aura::test::TestCursorClient(root_window()));
root_window()->AddPreTargetHandler(&event_capturer_);
- generator_.reset(new test::EventGenerator(root_window()));
+ generator_.reset(new aura::test::EventGenerator(root_window()));
// The generator takes ownership of the clock.
generator_->SetTickClock(scoped_ptr<base::TickClock>(simulated_clock_));
cursor_client()->ShowCursor();
@@ -315,7 +315,7 @@ class TouchExplorationTest : public aura::test::AuraTestBase {
simulated_clock_->NowTicks().ToInternalValue());
}
- scoped_ptr<test::EventGenerator> generator_;
+ scoped_ptr<aura::test::EventGenerator> generator_;
ui::GestureDetector::Config gesture_detector_config_;
// Owned by |generator_|.
base::SimpleTestTickClock* simulated_clock_;
diff --git a/ui/keyboard/keyboard_controller_unittest.cc b/ui/keyboard/keyboard_controller_unittest.cc
index 7f97a5f..a39bee8 100644
--- a/ui/keyboard/keyboard_controller_unittest.cc
+++ b/ui/keyboard/keyboard_controller_unittest.cc
@@ -12,6 +12,7 @@
#include "ui/aura/client/focus_client.h"
#include "ui/aura/layout_manager.h"
#include "ui/aura/test/aura_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/aura/window_event_dispatcher.h"
@@ -26,7 +27,6 @@
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/compositor/test/layer_animator_test_controller.h"
-#include "ui/events/test/event_generator.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/keyboard/keyboard_controller_observer.h"
#include "ui/keyboard/keyboard_controller_proxy.h"
@@ -294,7 +294,7 @@ TEST_F(KeyboardControllerTest, ClickDoesNotFocusKeyboard) {
EventObserver observer;
keyboard_container->AddPreTargetHandler(&observer);
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
generator.MoveMouseTo(proxy()->GetKeyboardWindow()->bounds().CenterPoint());
generator.ClickLeftButton();
EXPECT_TRUE(window->HasFocus());
diff --git a/ui/views/corewm/capture_controller_unittest.cc b/ui/views/corewm/capture_controller_unittest.cc
index 9a536ae..ffece4a 100644
--- a/ui/views/corewm/capture_controller_unittest.cc
+++ b/ui/views/corewm/capture_controller_unittest.cc
@@ -7,13 +7,13 @@
#include "base/logging.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_screen.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.h"
#include "ui/events/event_utils.h"
-#include "ui/events/test/event_generator.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view.h"
#include "ui/views/widget/root_view.h"
@@ -137,7 +137,7 @@ TEST_F(CaptureControllerTest, ResetOtherWindowCaptureOnCapture) {
TEST_F(CaptureControllerTest, TouchTargetResetOnCaptureChange) {
// Create a window inside the WindowEventDispatcher.
scoped_ptr<aura::Window> w1(CreateNormalWindow(1, root_window(), NULL));
- ui::test::EventGenerator event_generator1(root_window());
+ aura::test::EventGenerator event_generator1(root_window());
event_generator1.PressTouch();
w1->SetCapture();
// Both capture clients should return the same capture window.
diff --git a/ui/views/corewm/desktop_capture_controller_unittest.cc b/ui/views/corewm/desktop_capture_controller_unittest.cc
index a7628a6..27736f9 100644
--- a/ui/views/corewm/desktop_capture_controller_unittest.cc
+++ b/ui/views/corewm/desktop_capture_controller_unittest.cc
@@ -7,13 +7,13 @@
#include "base/logging.h"
#include "base/path_service.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/aura/window_tree_host.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/events/event.h"
-#include "ui/events/test/event_generator.h"
#include "ui/gl/gl_surface.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view.h"
@@ -87,7 +87,7 @@ views::Widget* CreateWidget() {
TEST_F(DesktopCaptureControllerTest, ResetMouseHandlers) {
scoped_ptr<Widget> w1(CreateWidget());
scoped_ptr<Widget> w2(CreateWidget());
- ui::test::EventGenerator generator1(w1->GetNativeView()->GetRootWindow());
+ aura::test::EventGenerator generator1(w1->GetNativeView()->GetRootWindow());
generator1.MoveMouseToCenterOf(w1->GetNativeView());
generator1.PressLeftButton();
EXPECT_FALSE(w1->HasCapture());
diff --git a/ui/views/corewm/tooltip_controller_unittest.cc b/ui/views/corewm/tooltip_controller_unittest.cc
index 9fbb63c..8cce09c 100644
--- a/ui/views/corewm/tooltip_controller_unittest.cc
+++ b/ui/views/corewm/tooltip_controller_unittest.cc
@@ -9,12 +9,12 @@
#include "ui/aura/client/screen_position_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_screen.h"
#include "ui/aura/test/test_window_delegate.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/gfx/screen.h"
@@ -101,7 +101,7 @@ class TooltipControllerTest : public aura::test::AuraTestBase {
view_->SetBoundsRect(widget_->GetContentsView()->GetLocalBounds());
helper_.reset(new TooltipControllerTestHelper(
GetController(widget_.get())));
- generator_.reset(new ui::test::EventGenerator(GetRootWindow()));
+ generator_.reset(new aura::test::EventGenerator(GetRootWindow()));
}
virtual void TearDown() OVERRIDE {
@@ -137,7 +137,7 @@ class TooltipControllerTest : public aura::test::AuraTestBase {
scoped_ptr<views::Widget> widget_;
TooltipTestView* view_;
scoped_ptr<TooltipControllerTestHelper> helper_;
- scoped_ptr<ui::test::EventGenerator> generator_;
+ scoped_ptr<aura::test::EventGenerator> generator_;
private:
scoped_ptr<TooltipController> controller_;
@@ -600,7 +600,7 @@ class TooltipControllerTest2 : public aura::test::AuraTestBase {
root_window()->AddPreTargetHandler(controller_.get());
SetTooltipClient(root_window(), controller_.get());
helper_.reset(new TooltipControllerTestHelper(controller_.get()));
- generator_.reset(new ui::test::EventGenerator(root_window()));
+ generator_.reset(new aura::test::EventGenerator(root_window()));
}
virtual void TearDown() OVERRIDE {
@@ -617,7 +617,7 @@ class TooltipControllerTest2 : public aura::test::AuraTestBase {
// Owned by |controller_|.
TestTooltip* test_tooltip_;
scoped_ptr<TooltipControllerTestHelper> helper_;
- scoped_ptr<ui::test::EventGenerator> generator_;
+ scoped_ptr<aura::test::EventGenerator> generator_;
private:
scoped_ptr<TooltipController> controller_;
@@ -677,7 +677,7 @@ class TooltipControllerTest3 : public aura::test::AuraTestBase {
widget_->GetContentsView()->AddChildView(view_);
view_->SetBoundsRect(widget_->GetContentsView()->GetLocalBounds());
- generator_.reset(new ui::test::EventGenerator(GetRootWindow()));
+ generator_.reset(new aura::test::EventGenerator(GetRootWindow()));
controller_.reset(new TooltipController(
scoped_ptr<views::corewm::Tooltip>(test_tooltip_)));
GetRootWindow()->RemovePreTargetHandler(
@@ -706,7 +706,7 @@ class TooltipControllerTest3 : public aura::test::AuraTestBase {
// Owned by |controller_|.
TestTooltip* test_tooltip_;
scoped_ptr<TooltipControllerTestHelper> helper_;
- scoped_ptr<ui::test::EventGenerator> generator_;
+ scoped_ptr<aura::test::EventGenerator> generator_;
scoped_ptr<views::Widget> widget_;
TooltipTestView* view_;
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
index 73cf4f0..0af64c3 100644
--- a/ui/views/touchui/touch_selection_controller_impl_unittest.cc
+++ b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
@@ -6,11 +6,11 @@
#include "base/strings/utf_string_conversions.h"
#include "grit/ui_resources.h"
#include "ui/aura/client/screen_position_client.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/touch/touch_editing_controller.h"
#include "ui/base/ui_base_switches.h"
-#include "ui/events/test/event_generator.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
@@ -543,7 +543,7 @@ TEST_F(TouchSelectionControllerImplTest,
DoubleTapInTextfieldWithCursorHandleShouldSelectText) {
CreateTextfield();
textfield_->SetText(ASCIIToUTF16("some text"));
- ui::test::EventGenerator generator(
+ aura::test::EventGenerator generator(
textfield_->GetWidget()->GetNativeView()->GetRootWindow());
// Tap the textfield to invoke touch selection.
@@ -804,7 +804,7 @@ TEST_F(TouchSelectionControllerImplTest, MouseEventDeactivatesTouchSelection) {
CreateTextfield();
EXPECT_FALSE(GetSelectionController());
- ui::test::EventGenerator generator(
+ aura::test::EventGenerator generator(
textfield_widget_->GetNativeView()->GetRootWindow());
generator.set_current_location(gfx::Point(5, 5));
@@ -845,7 +845,7 @@ TEST_F(TouchSelectionControllerImplTest, KeyEventDeactivatesTouchSelection) {
CreateTextfield();
EXPECT_FALSE(GetSelectionController());
- ui::test::EventGenerator generator(
+ aura::test::EventGenerator generator(
textfield_widget_->GetNativeView()->GetRootWindow());
RunPendingMessages();
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc
index 72bc3fb..f52fe91 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc
@@ -8,10 +8,10 @@
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/cursor_client.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.h"
#include "ui/aura/window_tree_host.h"
-#include "ui/events/test/event_generator.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/widget.h"
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc b/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
index 75a71ac..0451d78 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc
@@ -7,11 +7,11 @@
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.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/base/hit_test.h"
#include "ui/base/x/x11_util.h"
-#include "ui/events/test/event_generator.h"
#include "ui/gfx/display_observer.h"
#include "ui/gfx/x/x11_types.h"
#include "ui/views/test/views_test_base.h"
@@ -290,7 +290,7 @@ TEST_F(DesktopScreenX11Test, DoubleClickHeaderMaximizes) {
DesktopWindowTreeHostX11::GetHostForXID(window->GetHost()->
GetAcceleratedWidget());
- ui::test::EventGenerator generator(window);
+ aura::test::EventGenerator generator(window);
generator.ClickLeftButton();
generator.DoubleClickLeftButton();
RunPendingMessages();
@@ -316,7 +316,7 @@ TEST_F(DesktopScreenX11Test, DoubleClickTwoDifferentTargetsDoesntMaximizes) {
DesktopWindowTreeHostX11::GetHostForXID(window->GetHost()->
GetAcceleratedWidget());
- ui::test::EventGenerator generator(window);
+ aura::test::EventGenerator generator(window);
native_widget->set_window_component(HTCLIENT);
generator.ClickLeftButton();
native_widget->set_window_component(HTCAPTION);
@@ -343,7 +343,7 @@ TEST_F(DesktopScreenX11Test, RightClickDuringDoubleClickDoesntMaximize) {
DesktopWindowTreeHostX11::GetHostForXID(window->GetHost()->
GetAcceleratedWidget()));
- ui::test::EventGenerator generator(window);
+ aura::test::EventGenerator generator(window);
native_widget->set_window_component(HTCLIENT);
generator.ClickLeftButton();
native_widget->set_window_component(HTCAPTION);
diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc
index b173354..9f29b06 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -11,13 +11,13 @@
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/env.h"
+#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/base/ui_base_switches.h"
#include "ui/events/event_processor.h"
-#include "ui/events/test/event_generator.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gl/gl_surface.h"
#include "ui/views/controls/textfield/textfield.h"
@@ -769,7 +769,7 @@ TEST_F(WidgetTestInteractive, TouchSelectionQuickMenuIsNotActivated) {
RunPendingMessages();
- ui::test::EventGenerator generator(widget.GetNativeView()->GetRootWindow());
+ aura::test::EventGenerator generator(widget.GetNativeView()->GetRootWindow());
generator.GestureTapAt(gfx::Point(10, 10));
ShowQuickMenuImmediately(static_cast<TouchSelectionControllerImpl*>(
textfield_test_api.touch_selection_controller()));
diff --git a/ui/wm/core/compound_event_filter_unittest.cc b/ui/wm/core/compound_event_filter_unittest.cc
index 27de90e..afd3bcb 100644
--- a/ui/wm/core/compound_event_filter_unittest.cc
+++ b/ui/wm/core/compound_event_filter_unittest.cc
@@ -7,13 +7,13 @@
#include "ui/aura/client/cursor_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_cursor_client.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
-#include "ui/events/test/event_generator.h"
#include "ui/wm/core/default_activation_client.h"
#include "ui/wm/public/activation_client.h"
@@ -180,7 +180,7 @@ TEST_F(CompoundEventFilterTest, FilterConsumedGesture) {
// Tap on the window should not focus it since the filter will be consuming
// the gestures.
- ui::test::EventGenerator generator(root_window(), gfx::Point(50, 50));
+ aura::test::EventGenerator generator(root_window(), gfx::Point(50, 50));
generator.PressTouch();
EXPECT_FALSE(window->HasFocus());
@@ -191,7 +191,7 @@ TEST_F(CompoundEventFilterTest, FilterConsumedGesture) {
// Verifies we don't attempt to hide the mouse when the mouse is down and a
// touch event comes in.
TEST_F(CompoundEventFilterTest, DontHideWhenMouseDown) {
- ui::test::EventGenerator event_generator(root_window());
+ aura::test::EventGenerator event_generator(root_window());
scoped_ptr<CompoundEventFilter> compound_filter(new CompoundEventFilter);
aura::Env::GetInstance()->AddPreTargetHandler(compound_filter.get());
diff --git a/ui/wm/core/focus_controller_unittest.cc b/ui/wm/core/focus_controller_unittest.cc
index a10cef3..5d65943 100644
--- a/ui/wm/core/focus_controller_unittest.cc
+++ b/ui/wm/core/focus_controller_unittest.cc
@@ -10,6 +10,7 @@
#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/client/focus_change_observer.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/aura/window.h"
@@ -20,7 +21,6 @@
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/events/event_handler.h"
-#include "ui/events/test/event_generator.h"
#include "ui/wm/core/base_focus_rules.h"
#include "ui/wm/core/wm_state.h"
#include "ui/wm/public/activation_change_observer.h"
@@ -772,7 +772,7 @@ class FocusControllerDirectTestBase : public FocusControllerTestBase {
aura::Window* w2 = root_window()->GetChildById(2);
aura::client::GetCaptureClient(root_window())->SetCapture(w2);
- ui::test::EventGenerator generator(root_window(), w2);
+ aura::test::EventGenerator generator(root_window(), w2);
generator.ClickLeftButton();
EXPECT_EQ(1, GetActiveWindowId());
@@ -909,7 +909,7 @@ class FocusControllerMouseEventTest : public FocusControllerDirectTestBase {
aura::Window* w1 = root_window()->GetChildById(1);
SimpleEventHandler handler;
root_window()->PrependPreTargetHandler(&handler);
- ui::test::EventGenerator generator(root_window(), w1);
+ aura::test::EventGenerator generator(root_window(), w1);
generator.ClickLeftButton();
EXPECT_EQ(NULL, GetActiveWindow());
generator.GestureTapAt(w1->bounds().CenterPoint());
@@ -922,17 +922,17 @@ class FocusControllerMouseEventTest : public FocusControllerDirectTestBase {
private:
// Overridden from FocusControllerTestBase:
virtual void FocusWindowDirect(aura::Window* window) OVERRIDE {
- ui::test::EventGenerator generator(root_window(), window);
+ aura::test::EventGenerator generator(root_window(), window);
generator.ClickLeftButton();
}
virtual void ActivateWindowDirect(aura::Window* window) OVERRIDE {
- ui::test::EventGenerator generator(root_window(), window);
+ aura::test::EventGenerator generator(root_window(), window);
generator.ClickLeftButton();
}
virtual void DeactivateWindowDirect(aura::Window* window) OVERRIDE {
aura::Window* next_activatable =
test_focus_rules()->GetNextActivatableWindow(window);
- ui::test::EventGenerator generator(root_window(), next_activatable);
+ aura::test::EventGenerator generator(root_window(), next_activatable);
generator.ClickLeftButton();
}
virtual bool IsInputEvent() OVERRIDE { return true; }
@@ -947,17 +947,17 @@ class FocusControllerGestureEventTest : public FocusControllerDirectTestBase {
private:
// Overridden from FocusControllerTestBase:
virtual void FocusWindowDirect(aura::Window* window) OVERRIDE {
- ui::test::EventGenerator generator(root_window(), window);
+ aura::test::EventGenerator generator(root_window(), window);
generator.GestureTapAt(window->bounds().CenterPoint());
}
virtual void ActivateWindowDirect(aura::Window* window) OVERRIDE {
- ui::test::EventGenerator generator(root_window(), window);
+ aura::test::EventGenerator generator(root_window(), window);
generator.GestureTapAt(window->bounds().CenterPoint());
}
virtual void DeactivateWindowDirect(aura::Window* window) OVERRIDE {
aura::Window* next_activatable =
test_focus_rules()->GetNextActivatableWindow(window);
- ui::test::EventGenerator generator(root_window(), next_activatable);
+ aura::test::EventGenerator generator(root_window(), next_activatable);
generator.GestureTapAt(window->bounds().CenterPoint());
}
virtual bool IsInputEvent() OVERRIDE { return true; }
diff --git a/ui/wm/core/input_method_event_filter_unittest.cc b/ui/wm/core/input_method_event_filter_unittest.cc
index d6b37bf..50c1fbc 100644
--- a/ui/wm/core/input_method_event_filter_unittest.cc
+++ b/ui/wm/core/input_method_event_filter_unittest.cc
@@ -7,20 +7,20 @@
#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_windows.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/ime/dummy_text_input_client.h"
#include "ui/base/ime/input_method.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/wm/core/compound_event_filter.h"
#include "ui/wm/core/default_activation_client.h"
#include "ui/wm/public/activation_client.h"
#if !defined(OS_WIN) && !defined(USE_X11)
-// On platforms except Windows and X11, ui::test::EventGenerator::PressKey
+// On platforms except Windows and X11, aura::test::EventGenerator::PressKey
// generates a key event without native_event(), which is not supported by
// ui::MockInputMethod.
#define TestInputMethodKeyEventPropagation \
@@ -103,7 +103,7 @@ TEST_F(InputMethodEventFilterTest, TestInputMethodKeyEventPropagation) {
// automatically set up by AshTestBase, consumes it and sends a new
// ui::ET_TRANSLATED_KEY_* event to the root window, which will be consumed by
// the test event filter.
- ui::test::EventGenerator generator(root_window());
+ aura::test::EventGenerator generator(root_window());
EXPECT_EQ(0, test_filter_.num_key_events());
generator.PressKey(ui::VKEY_SPACE, 0);
EXPECT_EQ(1, test_filter_.num_key_events());