Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Side by Side Diff: ash/app_list/app_list_presenter_delegate_unittest.cc

Issue 2967543003: collect windows from mru_list in workspace_controller. (Closed)
Patch Set: write down todo for test Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.cc ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.cc ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698