summaryrefslogtreecommitdiffstats
path: root/ash/shelf
diff options
context:
space:
mode:
authortapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-28 01:48:52 +0000
committertapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-28 01:48:52 +0000
commit73c9fd0c41a31aab0be7a31e173f3a90f7b588f7 (patch)
tree0becd035d0e5424fc115a5e84d3b86cf218fe648 /ash/shelf
parenteab395117ab90f0a26b2c0335c3619e459973fe6 (diff)
downloadchromium_src-73c9fd0c41a31aab0be7a31e173f3a90f7b588f7.zip
chromium_src-73c9fd0c41a31aab0be7a31e173f3a90f7b588f7.tar.gz
chromium_src-73c9fd0c41a31aab0be7a31e173f3a90f7b588f7.tar.bz2
Cleanups for aura/test/event_generator.h (resolve TODOs)
Some purely mechanical changes left over from r283694, now that aura::test::EventGenerator has moved to ui::test in src/ui/events. Moves aura/test/event_generator.* to event_generator_delegate_aura.* Removes `using ui::test::EventGenerator;` declaration and redirects includes that don't extend the delegate to include the ui/test event_generator.h directly BUG=378134 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285209 Review URL: https://codereview.chromium.org/406413004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shelf')
-rw-r--r--ash/shelf/shelf_layout_manager_unittest.cc42
-rw-r--r--ash/shelf/shelf_view_unittest.cc14
2 files changed, 28 insertions, 28 deletions
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index 9f48d74..a6182ec 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -27,13 +27,13 @@
#include "base/command_line.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animator.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/events/gestures/gesture_configuration.h"
+#include "ui/events/test/event_generator.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
#include "ui/views/controls/label.h"
@@ -408,7 +408,7 @@ void ShelfLayoutManagerTest::RunGestureDragTests(gfx::Vector2d delta) {
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
shelf->LayoutShelf();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
const int kNumScrollSteps = 4;
ShelfDragCallback handler(shelf_hidden, shelf_shown);
@@ -828,7 +828,7 @@ TEST_F(ShelfLayoutManagerTest, ShelfUpdatedWhenStatusAreaChangesSize) {
// Various assertions around auto-hide.
TEST_F(ShelfLayoutManagerTest, MAYBE_AutoHide) {
aura::Window* root = Shell::GetPrimaryRootWindow();
- aura::test::EventGenerator generator(root, root);
+ ui::test::EventGenerator generator(root, root);
generator.MoveMouseTo(0, 0);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -919,7 +919,7 @@ TEST_F(ShelfLayoutManagerTest, AutoHideShelfOnScreenBoundary) {
int y = root_windows[0]->GetBoundsInScreen().y();
// Start off the mouse nowhere near the shelf; the shelf should be hidden.
- aura::test::EventGenerator& generator(GetEventGenerator());
+ ui::test::EventGenerator& generator(GetEventGenerator());
generator.MoveMouseTo(right_edge - 50, y);
UpdateAutoHideStateNow();
EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
@@ -987,8 +987,8 @@ TEST_F(ShelfLayoutManagerTest, AutoHideShelfOnScreenBoundary) {
TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) {
// Since ShelfLayoutManager queries for mouse location, move the mouse so
// it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
generator.MoveMouseTo(0, 0);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -1040,8 +1040,8 @@ TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) {
TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) {
// Since ShelfLayoutManager queries for mouse location, move the mouse so
// it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
generator.MoveMouseTo(0, 0);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -1085,8 +1085,8 @@ TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) {
TEST_F(ShelfLayoutManagerTest, TestDimmingBehavior) {
// Since ShelfLayoutManager queries for mouse location, move the mouse so
// it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
generator.MoveMouseTo(0, 0);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -1159,8 +1159,8 @@ TEST_F(ShelfLayoutManagerTest, TestDimmingBehavior) {
TEST_F(ShelfLayoutManagerTest, TestDimmingBehaviorWithMenus) {
// Since ShelfLayoutManager queries for mouse location, move the mouse so
// it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
generator.MoveMouseTo(0, 0);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -1229,8 +1229,8 @@ TEST_F(ShelfLayoutManagerTest, TestDimmingBehaviorWithMenus) {
TEST_F(ShelfLayoutManagerTest, VisibleWhenStatusOrShelfFocused) {
// Since ShelfLayoutManager queries for mouse location, move the mouse so
// it isn't over the shelf.
- aura::test::EventGenerator generator(
- Shell::GetPrimaryRootWindow(), gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
generator.MoveMouseTo(0, 0);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -1532,7 +1532,7 @@ TEST_F(ShelfLayoutManagerTest, GestureEdgeSwipe) {
widget->Show();
widget->Maximize();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
aura::Window* window = widget->GetNativeWindow();
shelf->LayoutShelf();
@@ -1584,7 +1584,7 @@ TEST_F(ShelfLayoutManagerTest, GestureEdgeSwipeInMaximizeMode) {
wm::GetWindowState(window)->set_hide_shelf_when_fullscreen(false);
widget->SetFullscreen(true);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
// The maximize mode gets started.
shelf->OnMaximizeModeStarted();
@@ -1703,7 +1703,7 @@ TEST_F(ShelfLayoutManagerTest, ShelfAnimatesWhenGestureComplete) {
ui::ScopedAnimationDurationScaleMode regular_animations(
ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
gfx::Rect shelf_bounds_in_screen =
GetShelfWidget()->GetWindowBoundsInScreen();
gfx::Point start(shelf_bounds_in_screen.CenterPoint());
@@ -1735,7 +1735,7 @@ TEST_F(ShelfLayoutManagerTest, ShelfAnimatesWhenGestureComplete) {
gfx::Point start =
GetShelfWidget()->GetWindowBoundsInScreen().CenterPoint();
gfx::Point end(start.x(), start.y() - 100);
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
// Test that the shelf animates to the visible bounds after a swipe up on
// the auto hidden shelf.
@@ -1769,7 +1769,7 @@ TEST_F(ShelfLayoutManagerTest, GestureRevealsTrayBubble) {
// Create a visible window so auto-hide behavior is enforced.
CreateTestWidget();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
SystemTray* tray = GetSystemTray();
// First, make sure the shelf is visible.
@@ -1910,7 +1910,7 @@ TEST_F(ShelfLayoutManagerTest, BubbleEnlargesShelfMouseHitArea) {
CreateTestWidget();
shelf->LayoutShelf();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
// Make two iterations - first without a message bubble which should make
// the shelf disappear and then with a message bubble which should keep it
@@ -2006,7 +2006,7 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_StatusAreaHitBoxCoversEdge) {
ShelfLayoutManager* shelf = GetShelfLayoutManager();
StatusAreaWidget* status_area_widget =
Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseTo(399,399);
// Test bottom right pixel for bottom alignment.
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index fb5c1db..1d7a8d0 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -37,13 +37,13 @@
#include "base/strings/string_number_conversions.h"
#include "grit/ash_resources.h"
#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/event_generator.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/compositor/layer.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
+#include "ui/events/test/event_generator.h"
#include "ui/views/view_model.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
@@ -517,8 +517,8 @@ class ShelfViewTest : public AshTestBase {
gfx::Point center_point_of_drag_item =
drag_button->GetBoundsInScreen().CenterPoint();
- aura::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow(),
- center_point_of_drag_item);
+ ui::test::EventGenerator generator(ash::Shell::GetPrimaryRootWindow(),
+ center_point_of_drag_item);
// Rip an item off to OverflowBubble.
generator.PressLeftButton();
gfx::Point rip_off_point(center_point_of_drag_item.x(), 0);
@@ -1326,7 +1326,7 @@ TEST_F(ShelfViewTest, ShouldHideTooltipWithAppListWindowTest) {
TEST_F(ShelfViewTest, ShouldHideTooltipWhenHoveringOnTooltip) {
ShelfTooltipManager* tooltip_manager = shelf_view_->tooltip_manager();
tooltip_manager->CreateZeroDelayTimerForTest();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
// Move the mouse off any item and check that no tooltip is shown.
generator.MoveMouseTo(gfx::Point(0, 0));
@@ -1418,8 +1418,8 @@ TEST_F(ShelfViewTest, OverflowBubbleSize) {
int item_width = test_for_overflow_view.GetButtonSize() +
test_for_overflow_view.GetButtonSpacing();
- aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
- gfx::Point());
+ ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ gfx::Point());
ShelfButton* button = test_for_overflow_view.GetButton(ripped_index);
// Rip off the last visible item.
gfx::Point start_point = button->GetBoundsInScreen().CenterPoint();
@@ -1606,7 +1606,7 @@ TEST_F(ShelfViewTest, CheckRipOffFromLeftShelfAlignmentWithMultiMonitor) {
gfx::Point start_point = button->GetBoundsInScreen().CenterPoint();
wm::ConvertPointFromScreen(second_root, &start_point);
- aura::test::EventGenerator generator(second_root, start_point);
+ ui::test::EventGenerator generator(second_root, start_point);
// Rip off the browser item.
generator.PressLeftButton();