| 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 0c8fbd59d0d6011895de136dcc70359c913f744f..a2fb48032f4b40173f1ee0314950529b06f96134 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) {
|
| @@ -43,6 +55,7 @@ void ChromeAppListItem::UpdateFromSync(
|
| }
|
|
|
| AppListControllerDelegate* ChromeAppListItem::GetController() {
|
| - return AppListService::Get(chrome::GetActiveDesktop())->
|
| - GetControllerDelegate();
|
| + return g_controller_for_test != nullptr ?
|
| + g_controller_for_test :
|
| + AppListService::Get(chrome::GetActiveDesktop())->GetControllerDelegate();
|
| }
|
|
|