OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <memory> | 5 #include <memory> |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/public/cpp/config.h" | 8 #include "ash/public/cpp/config.h" |
9 #include "ash/public/cpp/shelf_types.h" | 9 #include "ash/public/cpp/shelf_types.h" |
10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 EXPECT_EQ(shelf_layout_manager->GetShelfBackgroundType(), | 692 EXPECT_EQ(shelf_layout_manager->GetShelfBackgroundType(), |
693 SHELF_BACKGROUND_DEFAULT); | 693 SHELF_BACKGROUND_DEFAULT); |
694 app_list_presenter_impl()->Dismiss(); | 694 app_list_presenter_impl()->Dismiss(); |
695 | 695 |
696 // Set the alignment to the side and show the app list. The background | 696 // Set the alignment to the side and show the app list. The background |
697 // should show. | 697 // should show. |
698 GetPrimaryShelf()->SetAlignment(ShelfAlignment::SHELF_ALIGNMENT_LEFT); | 698 GetPrimaryShelf()->SetAlignment(ShelfAlignment::SHELF_ALIGNMENT_LEFT); |
699 app_list_presenter_impl()->Show(GetPrimaryDisplayId()); | 699 app_list_presenter_impl()->Show(GetPrimaryDisplayId()); |
700 EXPECT_TRUE(app_list::features::IsFullscreenAppListEnabled()); | 700 EXPECT_TRUE(app_list::features::IsFullscreenAppListEnabled()); |
701 EXPECT_FALSE(GetPrimaryShelf()->IsHorizontalAlignment()); | 701 EXPECT_FALSE(GetPrimaryShelf()->IsHorizontalAlignment()); |
| 702 // TODO(muyuanli): This should be SHELF_BACKGROUND_OVERLAP but the test |
| 703 // construction code is not quite correct. See crbug.com/742461. |
702 EXPECT_EQ(GetPrimaryShelf()->shelf_layout_manager()->GetShelfBackgroundType(), | 704 EXPECT_EQ(GetPrimaryShelf()->shelf_layout_manager()->GetShelfBackgroundType(), |
703 SHELF_BACKGROUND_DEFAULT); | 705 SHELF_BACKGROUND_DEFAULT); |
704 } | 706 } |
705 | 707 |
706 // Tests that the half app list closes if the user taps outside its bounds. | 708 // Tests that the half app list closes if the user taps outside its bounds. |
707 TEST_F(FullscreenAppListPresenterDelegateTest, | 709 TEST_F(FullscreenAppListPresenterDelegateTest, |
708 TapAndClickOutsideClosesHalfAppList) { | 710 TapAndClickOutsideClosesHalfAppList) { |
709 // TODO(newcomer): Investigate mash failures crbug.com/726838 | 711 // TODO(newcomer): Investigate mash failures crbug.com/726838 |
710 app_list_presenter_impl()->Show(GetPrimaryDisplayId()); | 712 app_list_presenter_impl()->Show(GetPrimaryDisplayId()); |
711 ui::test::EventGenerator& generator = GetEventGenerator(); | 713 ui::test::EventGenerator& generator = GetEventGenerator(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 generator.PressKey(ui::KeyboardCode::VKEY_0, 0); | 746 generator.PressKey(ui::KeyboardCode::VKEY_0, 0); |
745 EXPECT_EQ(app_list->app_list_state(), app_list::AppListView::HALF); | 747 EXPECT_EQ(app_list->app_list_state(), app_list::AppListView::HALF); |
746 | 748 |
747 // Clicking outside the bounds closes the app list. | 749 // Clicking outside the bounds closes the app list. |
748 generator.MoveMouseTo(gfx::Point(10, 10)); | 750 generator.MoveMouseTo(gfx::Point(10, 10)); |
749 generator.ClickLeftButton(); | 751 generator.ClickLeftButton(); |
750 EXPECT_FALSE(app_list_presenter_impl()->IsVisible()); | 752 EXPECT_FALSE(app_list_presenter_impl()->IsVisible()); |
751 } | 753 } |
752 | 754 |
753 } // namespace ash | 755 } // namespace ash |
OLD | NEW |