| Index: chrome/browser/ui/app_list/chrome_app_list_item.cc
|
| diff --git a/chrome/browser/ui/app_list/chrome_app_list_item.cc b/chrome/browser/ui/app_list/chrome_app_list_item.cc
|
| index 24ca68d674c4793b73137a6363e6fbc3398fc5ae..aa892ab4561bd77907a1d89f68070739045194ef 100644
|
| --- a/chrome/browser/ui/app_list/chrome_app_list_item.cc
|
| +++ b/chrome/browser/ui/app_list/chrome_app_list_item.cc
|
| @@ -12,6 +12,18 @@
|
| #include "ui/gfx/color_utils.h"
|
| #include "ui/gfx/image/image_skia_operations.h"
|
|
|
| +namespace {
|
| +
|
| +AppListControllerDelegate* g_controller_for_test = nullptr;
|
| +
|
| +} // namespace
|
| +
|
| +// static
|
| +void ChromeAppListItem::OverrideAppListControllerDelegateForTesting(
|
| + AppListControllerDelegate* controller) {
|
| + g_controller_for_test = controller;
|
| +}
|
| +
|
| // static
|
| gfx::ImageSkia ChromeAppListItem::CreateDisabledIcon(
|
| const gfx::ImageSkia& icon) {
|
| @@ -56,6 +68,7 @@ void ChromeAppListItem::UpdatePositionFromOrdering() {
|
| }
|
|
|
| AppListControllerDelegate* ChromeAppListItem::GetController() {
|
| - return AppListService::Get(chrome::GetActiveDesktop())->
|
| - GetControllerDelegate();
|
| + return g_controller_for_test != nullptr ?
|
| + g_controller_for_test :
|
| + AppListService::Get(chrome::GetActiveDesktop())->GetControllerDelegate();
|
| }
|
|
|