OLD | NEW |
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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "ui/app_list/views/custom_launcher_page_view.h" | 24 #include "ui/app_list/views/custom_launcher_page_view.h" |
25 #include "ui/app_list/views/search_box_view.h" | 25 #include "ui/app_list/views/search_box_view.h" |
26 #include "ui/aura/window.h" | 26 #include "ui/aura/window.h" |
27 #include "ui/events/test/event_generator.h" | 27 #include "ui/events/test/event_generator.h" |
28 #include "ui/views/controls/textfield/textfield.h" | 28 #include "ui/views/controls/textfield/textfield.h" |
29 #include "ui/views/controls/webview/webview.h" | 29 #include "ui/views/controls/webview/webview.h" |
30 #include "ui/views/focus/focus_manager.h" | 30 #include "ui/views/focus/focus_manager.h" |
31 | 31 |
32 #if defined(OS_CHROMEOS) | 32 #if defined(OS_CHROMEOS) |
33 #include "chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h" | 33 #include "chrome/browser/ui/ash/app_list/test/app_list_service_ash_test_api.h" |
34 #include "ui/app_list/shower/app_list_shower_impl.h" | 34 #include "ui/app_list/presenter/app_list_presenter_impl.h" |
35 #endif | 35 #endif |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 // The path of the test application within the "platform_apps" directory. | 39 // The path of the test application within the "platform_apps" directory. |
40 const char kCustomLauncherPagePath[] = "custom_launcher_page"; | 40 const char kCustomLauncherPagePath[] = "custom_launcher_page"; |
41 | 41 |
42 // The app ID of the test application. | 42 // The app ID of the test application. |
43 const char kCustomLauncherPageID[] = "lmadimbbgapmngbiclpjjngmdickadpl"; | 43 const char kCustomLauncherPageID[] = "lmadimbbgapmngbiclpjjngmdickadpl"; |
44 | 44 |
(...skipping 29 matching lines...) Expand all Loading... |
74 AppListService* service = AppListService::Get(); | 74 AppListService* service = AppListService::Get(); |
75 DCHECK(service); | 75 DCHECK(service); |
76 service->ShowForProfile(browser()->profile()); | 76 service->ShowForProfile(browser()->profile()); |
77 } | 77 } |
78 | 78 |
79 app_list::AppListView* GetAppListView() { | 79 app_list::AppListView* GetAppListView() { |
80 app_list::AppListView* app_list_view = nullptr; | 80 app_list::AppListView* app_list_view = nullptr; |
81 #if defined(OS_CHROMEOS) | 81 #if defined(OS_CHROMEOS) |
82 AppListServiceAshTestApi service_test; | 82 AppListServiceAshTestApi service_test; |
83 app_list_view = service_test.GetAppListView(); | 83 app_list_view = service_test.GetAppListView(); |
84 EXPECT_TRUE(service_test.GetAppListShower()->GetTargetVisibility()); | 84 EXPECT_TRUE(service_test.GetAppListPresenter()->GetTargetVisibility()); |
85 #else | 85 #else |
86 AppListServiceViews* service = | 86 AppListServiceViews* service = |
87 static_cast<AppListServiceViews*>(AppListService::Get()); | 87 static_cast<AppListServiceViews*>(AppListService::Get()); |
88 // The app list should have loaded instantly since the profile is already | 88 // The app list should have loaded instantly since the profile is already |
89 // loaded. | 89 // loaded. |
90 EXPECT_TRUE(service->IsAppListVisible()); | 90 EXPECT_TRUE(service->IsAppListVisible()); |
91 app_list_view = service->shower().app_list(); | 91 app_list_view = service->shower().app_list(); |
92 #endif | 92 #endif |
93 return app_list_view; | 93 return app_list_view; |
94 } | 94 } |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 // And in reverse. | 460 // And in reverse. |
461 EXPECT_EQ( | 461 EXPECT_EQ( |
462 search_box_textfield, | 462 search_box_textfield, |
463 app_list_view->GetFocusManager()->GetNextFocusableView( | 463 app_list_view->GetFocusManager()->GetNextFocusableView( |
464 custom_page_webview, custom_page_webview->GetWidget(), true, false)); | 464 custom_page_webview, custom_page_webview->GetWidget(), true, false)); |
465 EXPECT_EQ(custom_page_webview, | 465 EXPECT_EQ(custom_page_webview, |
466 app_list_view->GetFocusManager()->GetNextFocusableView( | 466 app_list_view->GetFocusManager()->GetNextFocusableView( |
467 search_box_textfield, search_box_textfield->GetWidget(), true, | 467 search_box_textfield, search_box_textfield->GetWidget(), true, |
468 false)); | 468 false)); |
469 } | 469 } |
OLD | NEW |