Commit 315f8dc5 authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

Update ShelfAnimatesToHiddenWhenGestureOutComplete

The test was timing out waiting for the auto-hidden shelf to get shown
while hovering the mouse pointer over it. This changes the test to use
swipe up gesture to show the shelf (which is used in other tests).

BUG=1000463

Change-Id: I4270215be79239eb2861bb08bfae0fd3fc386f16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214610Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771882}
parent d28332a9
...@@ -1669,9 +1669,7 @@ TEST_P(ShelfLayoutManagerTest, ShelfAnimatesToVisibleWhenGestureInComplete) { ...@@ -1669,9 +1669,7 @@ TEST_P(ShelfLayoutManagerTest, ShelfAnimatesToVisibleWhenGestureInComplete) {
// Tests that the shelf animates to the auto hidden bounds after a swipe down // Tests that the shelf animates to the auto hidden bounds after a swipe down
// on the visible shelf. // on the visible shelf.
// TODO(https://crbug.com/1000463): Flaky. TEST_P(ShelfLayoutManagerTest, ShelfAnimatesToHiddenWhenGestureOutComplete) {
TEST_P(ShelfLayoutManagerTest,
DISABLED_ShelfAnimatesToHiddenWhenGestureOutComplete) {
Shelf* shelf = GetPrimaryShelf(); Shelf* shelf = GetPrimaryShelf();
shelf->SetAutoHideBehavior(ShelfAutoHideBehavior::kAlways); shelf->SetAutoHideBehavior(ShelfAutoHideBehavior::kAlways);
EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
...@@ -1691,10 +1689,8 @@ TEST_P(ShelfLayoutManagerTest, ...@@ -1691,10 +1689,8 @@ TEST_P(ShelfLayoutManagerTest,
ui::test::EventGenerator* generator = GetEventGenerator(); ui::test::EventGenerator* generator = GetEventGenerator();
// Show the shelf first. // Show the shelf first.
display::Display display =
display::Screen::GetScreen()->GetPrimaryDisplay();
WidgetAnimationWaiter waiter1(GetShelfWidget(), visible_bounds); WidgetAnimationWaiter waiter1(GetShelfWidget(), visible_bounds);
generator->MoveMouseTo(display.bounds().bottom_center()); SwipeUpOnShelf();
waiter1.WaitForAnimation(); waiter1.WaitForAnimation();
EXPECT_TRUE(waiter1.WasValidAnimation()); EXPECT_TRUE(waiter1.WasValidAnimation());
EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->GetAutoHideState()); EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->GetAutoHideState());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment