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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_views_browsertest.cc

Issue 1861013004: AppListController refactoring part 3: Switching over to use AppListShower in Ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus_chrome_delegates_ash_impl
Patch Set: Rebase. Created 4 years, 8 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 | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/ash/app_list/app_list_controller_ash.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/app_list/app_list_service_views.h" 5 #include "chrome/browser/ui/app_list/app_list_service_views.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "chrome/browser/extensions/extension_browsertest.h" 11 #include "chrome/browser/extensions/extension_browsertest.h"
12 #include "chrome/browser/lifetime/keep_alive_registry.h" 12 #include "chrome/browser/lifetime/keep_alive_registry.h"
13 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" 13 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
14 #include "chrome/browser/ui/app_list/test/chrome_app_list_test_support.h" 14 #include "chrome/browser/ui/app_list/test/chrome_app_list_test_support.h"
15 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_commands.h" 16 #include "chrome/browser/ui/browser_commands.h"
17 #include "chrome/common/chrome_paths.h" 17 #include "chrome/common/chrome_paths.h"
18 #include "chrome/test/base/in_process_browser_test.h" 18 #include "chrome/test/base/in_process_browser_test.h"
19 #include "content/public/browser/notification_service.h" 19 #include "content/public/browser/notification_service.h"
20 #include "content/public/test/test_utils.h" 20 #include "content/public/test/test_utils.h"
21 #include "ui/app_list/app_list_switches.h" 21 #include "ui/app_list/app_list_switches.h"
22 #include "ui/app_list/views/app_list_main_view.h" 22 #include "ui/app_list/views/app_list_main_view.h"
23 #include "ui/app_list/views/app_list_view.h" 23 #include "ui/app_list/views/app_list_view.h"
24 #include "ui/app_list/views/contents_view.h" 24 #include "ui/app_list/views/contents_view.h"
25 #include "ui/events/test/event_generator.h" 25 #include "ui/events/test/event_generator.h"
26 #include "ui/views/widget/widget.h" 26 #include "ui/views/widget/widget.h"
27 27
28 #if defined(OS_CHROMEOS) 28 #if defined(OS_CHROMEOS)
29 #include "ash/shell.h" 29 #include "ash/shell.h"
30 #include "ash/test/app_list_controller_test_api.h" 30 #include "chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h"
31 #endif 31 #endif
32 32
33 namespace { 33 namespace {
34 34
35 app_list::AppListView* GetAppListView(AppListService* service) { 35 app_list::AppListView* GetAppListView(AppListService* service) {
36 #if defined(OS_CHROMEOS) 36 #if defined(OS_CHROMEOS)
37 return ash::test::AppListControllerTestApi(ash::Shell::GetInstance()).view(); 37 return AppListServiceAshTestApi().GetAppListView();
38 #else 38 #else
39 return static_cast<AppListServiceViews*>(service)->shower().app_list(); 39 return static_cast<AppListServiceViews*>(service)->shower().app_list();
40 #endif 40 #endif
41 } 41 }
42 42
43 } // namespace 43 } // namespace
44 44
45 namespace test { 45 namespace test {
46 46
47 // Allow access to private variables of the AppListView for testing. 47 // Allow access to private variables of the AppListView for testing.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 service->ShowForAppInstall(browser()->profile(), extension->id(), false); 235 service->ShowForAppInstall(browser()->profile(), extension->id(), false);
236 app_list::AppListView* app_list_view = GetAppListView(service); 236 app_list::AppListView* app_list_view = GetAppListView(service);
237 ASSERT_TRUE(app_list_view); 237 ASSERT_TRUE(app_list_view);
238 238
239 app_list::ContentsView* contents_view = 239 app_list::ContentsView* contents_view =
240 app_list_view->app_list_main_view()->contents_view(); 240 app_list_view->app_list_main_view()->contents_view();
241 241
242 EXPECT_TRUE(contents_view->IsStateActive(app_list::AppListModel::STATE_APPS)); 242 EXPECT_TRUE(contents_view->IsStateActive(app_list::AppListModel::STATE_APPS));
243 } 243 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/ash/app_list/app_list_controller_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698