Commit 6892a730 authored by Andrew Xu's avatar Andrew Xu Committed by Commit Bot

[scrollable shelf] Fix broken tests with flag enabled

Fix another two tests which are broken with the flag enabled:
(1) ShelfTooltipManagerTest.HideForEvents: The event generator fails
to reset the mouse button.
(2) ShelfWidgetTest.LauncherInitiallySized: It assumes that the
shelf widget's bounds are identical with the bounds of the shelf view.
However, it is incorrect with the scrollable shelf enabled.

Bug: 1002576
Change-Id: Ia573eef66a25b73e45b9b69e0e435320b2f07eca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808459
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697336}
parent 6d24bd2f
......@@ -183,6 +183,7 @@ TEST_F(ShelfTooltipManagerTest, HideForEvents) {
generator->MoveMouseTo(shelf_bounds.CenterPoint());
generator->PressLeftButton();
EXPECT_FALSE(tooltip_manager_->IsVisible());
generator->ReleaseLeftButton();
// Should hide for touch events in the shelf.
ShowTooltipForFirstAppIcon();
......
......@@ -152,7 +152,7 @@ TEST_F(ShelfWidgetTest, LauncherInitiallySized) {
const int nav_width =
shelf_widget->navigation_widget()->GetWindowBoundsInScreen().width();
const int hotseat_width =
GetPrimaryShelf()->GetShelfViewForTesting()->width();
shelf_widget->hotseat_widget()->GetWindowBoundsInScreen().width();
const int margins = ShelfConfig::Get()->home_button_edge_spacing() +
ShelfConfig::Get()->app_icon_group_margin();
EXPECT_EQ(status_width, total_width - nav_width - hotseat_width - margins);
......
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