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

Unified Diff: ash/wm/window_cycle_controller_unittest.cc

Issue 2576913002: Use mojo app list interfaces for mash and classic ash. (Closed)
Patch Set: Fix AppListPresenterImplTest. Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/window_cycle_controller_unittest.cc
diff --git a/ash/wm/window_cycle_controller_unittest.cc b/ash/wm/window_cycle_controller_unittest.cc
index 28ca6b1cd19f84303406f857d3876616d760f86b..a268a045c0e86676016f3b81767a1ff697336c82 100644
--- a/ash/wm/window_cycle_controller_unittest.cc
+++ b/ash/wm/window_cycle_controller_unittest.cc
@@ -22,6 +22,7 @@
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/shelf_view_test_api.h"
+#include "ash/test/test_app_list_presenter_impl.h"
#include "ash/test/test_shell_delegate.h"
#include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h"
@@ -31,6 +32,7 @@
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
+#include "ui/display/manager/display_manager.h"
#include "ui/events/event_handler.h"
#include "ui/events/test/event_generator.h"
#include "ui/gfx/geometry/rect.h"
@@ -468,14 +470,17 @@ TEST_F(WindowCycleControllerTest, MostRecentlyUsed) {
// Tests that beginning window selection hides the app list.
TEST_F(WindowCycleControllerTest, SelectingHidesAppList) {
+ // The tested behavior relies on the app list presenter implementation.
+ test::TestAppListPresenterImpl app_list_presenter_impl;
+
WindowCycleController* controller = WmShell::Get()->window_cycle_controller();
std::unique_ptr<aura::Window> window0(CreateTestWindowInShellWithId(0));
std::unique_ptr<aura::Window> window1(CreateTestWindowInShellWithId(1));
- WmShell::Get()->ShowAppList();
- EXPECT_TRUE(WmShell::Get()->GetAppListTargetVisibility());
+ app_list_presenter_impl.Show(display_manager()->first_display_id());
+ EXPECT_TRUE(app_list_presenter_impl.IsVisible());
controller->HandleCycleWindow(WindowCycleController::FORWARD);
- EXPECT_FALSE(WmShell::Get()->GetAppListTargetVisibility());
+ EXPECT_FALSE(app_list_presenter_impl.IsVisible());
// Make sure that dismissing the app list this way doesn't pass activation
// to a different window.

Powered by Google App Engine
This is Rietveld 408576698