summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-28 01:48:52 +0000
committertapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-28 01:48:52 +0000
commit73c9fd0c41a31aab0be7a31e173f3a90f7b588f7 (patch)
tree0becd035d0e5424fc115a5e84d3b86cf218fe648 /chrome
parenteab395117ab90f0a26b2c0335c3619e459973fe6 (diff)
downloadchromium_src-73c9fd0c41a31aab0be7a31e173f3a90f7b588f7.zip
chromium_src-73c9fd0c41a31aab0be7a31e173f3a90f7b588f7.tar.gz
chromium_src-73c9fd0c41a31aab0be7a31e173f3a90f7b588f7.tar.bz2
Cleanups for aura/test/event_generator.h (resolve TODOs)
Some purely mechanical changes left over from r283694, now that aura::test::EventGenerator has moved to ui::test in src/ui/events. Moves aura/test/event_generator.* to event_generator_delegate_aura.* Removes `using ui::test::EventGenerator;` declaration and redirects includes that don't extend the delegate to include the ui/test event_generator.h directly BUG=378134 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285209 Review URL: https://codereview.chromium.org/406413004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-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
6 files changed, 27 insertions, 26 deletions
diff --git a/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc b/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
index b03c6fe71..ed22cac 100644
--- a/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc
@@ -17,12 +17,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 {
@@ -88,7 +88,7 @@ private:
// after the touch exploration mode is turned off.
IN_PROC_BROWSER_TEST_F(TouchExplorationTest, ToggleOnOff) {
SwitchTouchExplorationMode(true);
- aura::test::EventGenerator generator(root_window_);
+ ui::test::EventGenerator generator(root_window_);
base::TimeDelta initial_time = Now();
ui::TouchEvent initial_press(
@@ -140,7 +140,7 @@ IN_PROC_BROWSER_TEST_F(TouchExplorationTest, ToggleOnOff) {
// finger is still on the screen.
IN_PROC_BROWSER_TEST_F(TouchExplorationTest, SplitTapExplore) {
SwitchTouchExplorationMode(true);
- aura::test::EventGenerator generator(root_window_);
+ ui::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 ee1cc92..61eb0a9 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,
- aura::test::EventGenerator* generator,
+ ui::test::EventGenerator* generator,
ash::test::ShelfViewTestAPI* test,
RipOffCommand command) {
ash::ShelfButton* button = test->GetButton(index);
@@ -1606,8 +1606,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.
- aura::test::EventGenerator generator(
- ash::Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow(),
+ gfx::Point());
ash::test::ShelfViewTestAPI test(
ash::test::ShelfTestAPI(shelf_).shelf_view());
AppListService* service = AppListService::Get(chrome::GetActiveDesktop());
@@ -1752,7 +1752,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);
- aura::test::EventGenerator generator(secondary_root_window, gfx::Point());
+ ui::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());
@@ -1831,8 +1831,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) {
- aura::test::EventGenerator generator(
- ash::Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::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.
@@ -1934,8 +1934,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.
- aura::test::EventGenerator generator(
- ash::Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::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 a3852d2..1d518bb 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();
- aura::test::EventGenerator event_generator(root, window);
+ ui::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();
- aura::test::EventGenerator event_generator(root, window);
+ ui::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();
- aura::test::EventGenerator event_generator(root, window);
+ ui::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 cc064e1..46e29bd 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
@@ -18,7 +18,6 @@
#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"
@@ -28,6 +27,7 @@
#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();
- aura::test::EventGenerator generator(browser()->window()->
- GetNativeWindow()->GetRootWindow());
+ ui::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 c7226a6..9632c6c 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,8 +51,9 @@
#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.h"
+#include "ui/aura/test/event_generator_delegate_aura.h"
#include "ui/aura/window_event_dispatcher.h"
+#include "ui/events/test/event_generator.h"
#endif
using content::WebContents;
@@ -360,8 +361,8 @@ class DetachToBrowserTabDragControllerTest
virtual void SetUpOnMainThread() OVERRIDE {
#if defined(OS_CHROMEOS)
- event_generator_.reset(new aura::test::EventGenerator(
- ash::Shell::GetPrimaryRootWindow()));
+ event_generator_.reset(
+ new ui::test::EventGenerator(ash::Shell::GetPrimaryRootWindow()));
#endif
}
@@ -375,7 +376,7 @@ class DetachToBrowserTabDragControllerTest
if (input_source() == INPUT_SOURCE_MOUSE)
return;
#if defined(OS_CHROMEOS)
- event_generator_.reset(new aura::test::EventGenerator(
+ event_generator_.reset(new ui::test::EventGenerator(
new ScreenEventGeneratorDelegate(ash::wm::GetRootWindowAt(point))));
#endif
}
@@ -529,7 +530,7 @@ class DetachToBrowserTabDragControllerTest
private:
#if defined(OS_CHROMEOS)
- scoped_ptr<aura::test::EventGenerator> event_generator_;
+ scoped_ptr<ui::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 a688ebf..5e1e389 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) {
- aura::test::EventGenerator generator(root_window);
+ ui::test::EventGenerator generator(root_window);
gfx::Point center =
GetChromeIconBoundsForRootWindow(root_window).CenterPoint();
gfx::Display display =