Chromium Code Reviews| 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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 EXPECT_EQ(GetPrimaryShelf()->shelf_layout_manager()->GetShelfBackgroundType(), | 702 EXPECT_EQ(GetPrimaryShelf()->shelf_layout_manager()->GetShelfBackgroundType(), |
| 703 SHELF_BACKGROUND_DEFAULT); | 703 SHELF_BACKGROUND_OVERLAP); |
|
oshima
2017/07/13 04:41:32
This should stay right?
Muyuan
2017/07/13 18:46:01
It should be OVERLAP per UX requirement. The test
| |
| 704 } | 704 } |
| 705 | 705 |
| 706 // Tests that the half app list closes if the user taps outside its bounds. | 706 // Tests that the half app list closes if the user taps outside its bounds. |
| 707 TEST_F(FullscreenAppListPresenterDelegateTest, | 707 TEST_F(FullscreenAppListPresenterDelegateTest, |
| 708 TapAndClickOutsideClosesHalfAppList) { | 708 TapAndClickOutsideClosesHalfAppList) { |
| 709 // TODO(newcomer): Investigate mash failures crbug.com/726838 | 709 // TODO(newcomer): Investigate mash failures crbug.com/726838 |
| 710 app_list_presenter_impl()->Show(GetPrimaryDisplayId()); | 710 app_list_presenter_impl()->Show(GetPrimaryDisplayId()); |
| 711 ui::test::EventGenerator& generator = GetEventGenerator(); | 711 ui::test::EventGenerator& generator = GetEventGenerator(); |
| 712 | 712 |
| 713 // Transition to half app list by entering text. | 713 // Transition to half app list by entering text. |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 744 generator.PressKey(ui::KeyboardCode::VKEY_0, 0); | 744 generator.PressKey(ui::KeyboardCode::VKEY_0, 0); |
| 745 EXPECT_EQ(app_list->app_list_state(), app_list::AppListView::HALF); | 745 EXPECT_EQ(app_list->app_list_state(), app_list::AppListView::HALF); |
| 746 | 746 |
| 747 // Clicking outside the bounds closes the app list. | 747 // Clicking outside the bounds closes the app list. |
| 748 generator.MoveMouseTo(gfx::Point(10, 10)); | 748 generator.MoveMouseTo(gfx::Point(10, 10)); |
| 749 generator.ClickLeftButton(); | 749 generator.ClickLeftButton(); |
| 750 EXPECT_FALSE(app_list_presenter_impl()->IsVisible()); | 750 EXPECT_FALSE(app_list_presenter_impl()->IsVisible()); |
| 751 } | 751 } |
| 752 | 752 |
| 753 } // namespace ash | 753 } // namespace ash |
| OLD | NEW |