| Index: ash/shelf/shelf_layout_manager_unittest.cc
|
| diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
|
| index 7bafd4822bc5e16994deb36c32d8988cacbee0c4..456b185ef38d0b3b4fc1b9fb58c405089096260d 100644
|
| --- a/ash/shelf/shelf_layout_manager_unittest.cc
|
| +++ b/ash/shelf/shelf_layout_manager_unittest.cc
|
| @@ -303,6 +303,10 @@ class ShelfLayoutManagerTest : public test::AshTestBase {
|
| ash::WmShell::Get()->session_controller()->SetSessionInfo(std::move(info));
|
| }
|
|
|
| + int64_t GetPrimaryDisplayId() {
|
| + return display::Screen::GetScreen()->GetPrimaryDisplay().id();
|
| + }
|
| +
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManagerTest);
|
| };
|
| @@ -680,6 +684,10 @@ TEST_F(ShelfLayoutManagerTest, ShelfUpdatedWhenStatusAreaChangesSize) {
|
|
|
| // Various assertions around auto-hide.
|
| TEST_F(ShelfLayoutManagerTest, AutoHide) {
|
| + // TODO: investigate failure in mash, http://crbug.com/695686.
|
| + if (WmShell::Get()->IsRunningInMash())
|
| + return;
|
| +
|
| ui::test::EventGenerator& generator(GetEventGenerator());
|
|
|
| WmShelf* shelf = GetPrimaryShelf();
|
| @@ -739,6 +747,10 @@ TEST_F(ShelfLayoutManagerTest, AutoHide) {
|
| // Test the behavior of the shelf when it is auto hidden and it is on the
|
| // boundary between the primary and the secondary display.
|
| TEST_F(ShelfLayoutManagerTest, AutoHideShelfOnScreenBoundary) {
|
| + // TODO: investigate failure in mash, http://crbug.com/695686.
|
| + if (WmShell::Get()->IsRunningInMash())
|
| + return;
|
| +
|
| UpdateDisplay("800x600,800x600");
|
| Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
|
| display::test::CreateDisplayLayout(display_manager(),
|
| @@ -944,8 +956,12 @@ TEST_F(ShelfLayoutManagerTest, OpenAppListWithShelfVisibleState) {
|
| EXPECT_FALSE(app_list_presenter_impl.GetTargetVisibility());
|
| EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState());
|
|
|
| + // TODO: fails in mash because of AppListPresenter. http://crbug.com/696028.
|
| + if (WmShell::Get()->IsRunningInMash())
|
| + return;
|
| +
|
| // Show the app list and the shelf stays visible.
|
| - app_list_presenter_impl.Show(display_manager()->first_display_id());
|
| + app_list_presenter_impl.Show(GetPrimaryDisplayId());
|
| EXPECT_TRUE(app_list_presenter_impl.GetTargetVisibility());
|
| EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState());
|
|
|
| @@ -972,8 +988,12 @@ TEST_F(ShelfLayoutManagerTest, OpenAppListWithShelfAutoHideState) {
|
| EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
|
| EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->GetAutoHideState());
|
|
|
| + // TODO: fails in mash because of AppListPresenter. http://crbug.com/696028.
|
| + if (WmShell::Get()->IsRunningInMash())
|
| + return;
|
| +
|
| // Show the app list and the shelf should be temporarily visible.
|
| - app_list_presenter_impl.Show(display_manager()->first_display_id());
|
| + app_list_presenter_impl.Show(GetPrimaryDisplayId());
|
| // The shelf's auto hide state won't be changed until the timer fires, so
|
| // force it to update now.
|
| GetShelfLayoutManager()->UpdateVisibilityState();
|
| @@ -1036,8 +1056,12 @@ TEST_F(ShelfLayoutManagerTest, DualDisplayOpenAppListWithShelfAutoHideState) {
|
| EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf_1->GetAutoHideState());
|
| EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf_2->GetAutoHideState());
|
|
|
| + // TODO: fails in mash because of AppListPresenter. http://crbug.com/696028.
|
| + if (WmShell::Get()->IsRunningInMash())
|
| + return;
|
| +
|
| // Show the app list; only the shelf on the same display should be shown.
|
| - app_list_presenter_impl.Show(display_manager()->first_display_id());
|
| + app_list_presenter_impl.Show(GetPrimaryDisplayId());
|
| Shell::GetInstance()->UpdateShelfVisibility();
|
| EXPECT_TRUE(app_list_presenter_impl.GetTargetVisibility());
|
| EXPECT_EQ(SHELF_AUTO_HIDE, shelf_1->GetVisibilityState());
|
| @@ -1072,8 +1096,12 @@ TEST_F(ShelfLayoutManagerTest, OpenAppListWithShelfHiddenState) {
|
| EXPECT_FALSE(app_list_presenter_impl.GetTargetVisibility());
|
| EXPECT_EQ(SHELF_HIDDEN, shelf->GetVisibilityState());
|
|
|
| + // TODO: fails in mash because of AppListPresenter. http://crbug.com/696028.
|
| + if (WmShell::Get()->IsRunningInMash())
|
| + return;
|
| +
|
| // Show the app list and the shelf should be temporarily visible.
|
| - app_list_presenter_impl.Show(display_manager()->first_display_id());
|
| + app_list_presenter_impl.Show(GetPrimaryDisplayId());
|
| EXPECT_TRUE(app_list_presenter_impl.GetTargetVisibility());
|
| EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState());
|
|
|
| @@ -1215,6 +1243,10 @@ TEST_F(ShelfLayoutManagerTest, FullscreenWindowOnSecondDisplay) {
|
|
|
| // Test for Pinned mode.
|
| TEST_F(ShelfLayoutManagerTest, PinnedWindowHidesShelf) {
|
| + // TODO: investigate failure in mash, http://crbug.com/695686.
|
| + if (WmShell::Get()->IsRunningInMash())
|
| + return;
|
| +
|
| WmShelf* shelf = GetPrimaryShelf();
|
|
|
| aura::Window* window1 = CreateTestWindow();
|
| @@ -1301,6 +1333,10 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
|
| }
|
|
|
| TEST_F(ShelfLayoutManagerTest, GestureDrag) {
|
| + // TODO: investigate failure in mash, http://crbug.com/695686.
|
| + if (WmShell::Get()->IsRunningInMash())
|
| + return;
|
| +
|
| // Slop is an implementation detail of gesture recognition, and complicates
|
| // these tests. Ignore it.
|
| ui::GestureConfiguration::GetInstance()
|
| @@ -1448,6 +1484,10 @@ TEST_F(ShelfLayoutManagerTest, ShelfAnimatesWhenGestureComplete) {
|
| }
|
|
|
| TEST_F(ShelfLayoutManagerTest, ShelfFlickerOnTrayActivation) {
|
| + // TODO: investigate failure in mash, http://crbug.com/695686.
|
| + if (WmShell::Get()->IsRunningInMash())
|
| + return;
|
| +
|
| WmShelf* shelf = GetPrimaryShelf();
|
|
|
| // Create a visible window so auto-hide behavior is enforced.
|
| @@ -1703,6 +1743,10 @@ TEST_F(ShelfLayoutManagerTest, ShutdownHandlesWindowActivation) {
|
| }
|
|
|
| TEST_F(ShelfLayoutManagerTest, ShelfLayoutInUnifiedDesktop) {
|
| + // TODO: requires unified desktop mode. http://crbug.com/581462.
|
| + if (WmShell::Get()->IsRunningInMash())
|
| + return;
|
| +
|
| Shell::GetInstance()->display_manager()->SetUnifiedDesktopEnabled(true);
|
| UpdateDisplay("500x400, 500x400");
|
|
|
|
|