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

Unified Diff: ash/wm/overview/window_selector_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/overview/window_selector_unittest.cc
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index 4be3a098bb8b4ca49a2c5c112580650f761bf76b..d886dccad58adc4b20ad9de7745f1f364adea5f0 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -36,6 +36,7 @@
#include "ash/test/ash_test_base.h"
#include "ash/test/shelf_view_test_api.h"
#include "ash/test/shell_test_api.h"
+#include "ash/test/test_app_list_presenter_impl.h"
#include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h"
#include "base/command_line.h"
@@ -1207,10 +1208,15 @@ TEST_F(WindowSelectorTest, SelectingHidesAppList) {
gfx::Rect bounds(0, 0, 400, 400);
std::unique_ptr<aura::Window> window1(CreateWindow(bounds));
std::unique_ptr<aura::Window> window2(CreateWindow(bounds));
- WmShell::Get()->ShowAppList();
- EXPECT_TRUE(WmShell::Get()->GetAppListTargetVisibility());
+
+ // The tested behavior relies on the app list presenter delegate.
+ test::TestAppListPresenterImpl app_list_presenter_impl;
+
+ app_list_presenter_impl.Show(display_manager()->first_display_id());
+ EXPECT_TRUE(app_list_presenter_impl.IsVisible());
+
ToggleOverview();
- EXPECT_FALSE(WmShell::Get()->GetAppListTargetVisibility());
+ EXPECT_FALSE(app_list_presenter_impl.IsVisible());
ToggleOverview();
}

Powered by Google App Engine
This is Rietveld 408576698