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

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 test name. 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..787b0b934de7e075f86d181e4dd73b1c08bb5064 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -5,6 +5,7 @@
#include <algorithm>
#include <vector>
+#include "ash/app_list/app_list_presenter_delegate_factory.h"
#include "ash/aura/wm_window_aura.h"
#include "ash/common/accessibility_delegate.h"
#include "ash/common/accessibility_types.h"
@@ -46,6 +47,8 @@
#include "base/strings/utf_string_conversions.h"
#include "base/test/user_action_tester.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "ui/app_list/presenter/app_list_presenter_impl.h"
+#include "ui/app_list/presenter/test/test_app_list_view_delegate_factory.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/focus_client.h"
@@ -1207,10 +1210,18 @@ 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.
+ AppListPresenterDelegateFactory app_list_presenter_delegate_factory(
+ base::MakeUnique<app_list::TestAppListViewDelegateFactory>());
+ app_list::AppListPresenterImpl app_list_presenter_impl(
+ &app_list_presenter_delegate_factory);
+
+ 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