| 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();
|
| }
|
|
|
|
|