diff options
author | markusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-24 13:18:41 +0000 |
---|---|---|
committer | markusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-24 13:18:41 +0000 |
commit | dd131d3723dee3050b746319e437514d8fdb6bb1 (patch) | |
tree | c44435187d6d4df51dcf5e02b31be151de270390 /ash/shelf | |
parent | 2c6e3b04ca361d052f1e8fdc70983bcc7c379dba (diff) | |
download | chromium_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
Diffstat (limited to 'ash/shelf')
-rw-r--r-- | ash/shelf/shelf_layout_manager_unittest.cc | 42 | ||||
-rw-r--r-- | ash/shelf/shelf_view_unittest.cc | 14 |
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 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(); |