| Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_browsertest.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_browsertest.cc
|
| index d792aa29e5f511f2390b2ab0a4ebf6a56a1af0ee..9efd0ce03060905a8fd5e2fd18b116a15c9cc26a 100644
|
| --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_browsertest.cc
|
| +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_browsertest.cc
|
| @@ -254,7 +254,7 @@
|
| }
|
|
|
| ash::ShelfItemDelegate* GetShelfItemDelegate(ash::ShelfID id) {
|
| - return shelf_model()->GetShelfItemDelegate(id);
|
| + return controller_->GetShelfItemDelegate(id);
|
| }
|
|
|
| ChromeLauncherControllerImpl* controller_;
|
| @@ -788,7 +788,9 @@
|
| const ash::ShelfItem& item1 = GetLastLauncherPanelItem();
|
| EXPECT_EQ(ash::TYPE_APP_PANEL, item1.type);
|
| EXPECT_EQ(ash::STATUS_RUNNING, item1.status);
|
| - ash::ShelfItemDelegate* item1_delegate = GetShelfItemDelegate(item1.id);
|
| + EXPECT_EQ(nullptr, GetShelfItemDelegate(item1.id));
|
| + ash::ShelfItemDelegate* item1_delegate =
|
| + shelf_model()->GetShelfItemDelegate(item1.id);
|
| EXPECT_EQ(ash::TYPE_APP_PANEL,
|
| panel->GetNativeWindow()->GetProperty(ash::kShelfItemTypeKey));
|
| // Click the item and confirm that the panel is activated.
|
| @@ -826,7 +828,9 @@
|
| const ash::ShelfItem& item1 = GetLastLauncherPanelItem();
|
| EXPECT_EQ(ash::TYPE_APP_PANEL, item1.type);
|
| EXPECT_EQ(ash::STATUS_RUNNING, item1.status);
|
| - ash::ShelfItemDelegate* item1_delegate = GetShelfItemDelegate(item1.id);
|
| + EXPECT_EQ(nullptr, GetShelfItemDelegate(item1.id));
|
| + ash::ShelfItemDelegate* item1_delegate =
|
| + shelf_model()->GetShelfItemDelegate(item1.id);
|
| EXPECT_EQ(ash::TYPE_APP_PANEL,
|
| panel->GetNativeWindow()->GetProperty(ash::kShelfItemTypeKey));
|
| // Click the item and confirm that the panel is activated.
|
| @@ -906,6 +910,8 @@
|
| ASSERT_TRUE(app_custom_icon_item_delegate);
|
| EXPECT_TRUE(app_custom_icon_item_delegate->image_set_by_controller());
|
|
|
| + // Panels are handled by ShelfWindowWatcher, not ChromeLauncherController.
|
| + EXPECT_EQ(nullptr, GetShelfItemDelegate(panel_item.id));
|
| // Ensure icon heights are correct (see test.js in app_icon/ test directory)
|
| EXPECT_EQ(extension_misc::EXTENSION_ICON_SMALL, app_item.image.height());
|
| EXPECT_EQ(extension_misc::EXTENSION_ICON_LARGE,
|
| @@ -1540,7 +1546,10 @@
|
| EXPECT_FALSE(panel->GetBaseWindow()->IsActive());
|
| // Confirm that a shelf item was created and is the correct state.
|
| const ash::ShelfItem& item = GetLastLauncherPanelItem();
|
| - ash::ShelfItemDelegate* shelf_item_delegate = GetShelfItemDelegate(item.id);
|
| + // Panels are handled by ShelfWindowWatcher, not ChromeLauncherController.
|
| + EXPECT_EQ(nullptr, GetShelfItemDelegate(item.id));
|
| + ash::ShelfItemDelegate* shelf_item_delegate =
|
| + shelf_model()->GetShelfItemDelegate(item.id);
|
| EXPECT_NE(nullptr, shelf_item_delegate);
|
| EXPECT_EQ(ash::TYPE_APP_PANEL, item.type);
|
| EXPECT_EQ(ash::STATUS_RUNNING, item.status);
|
| @@ -1765,7 +1774,7 @@
|
|
|
| // Now request to either activate an existing app or create a new one.
|
| ash::ShelfItemDelegate* item_delegate =
|
| - model_->GetShelfItemDelegate(shortcut_id);
|
| + controller_->GetShelfItemDelegate(shortcut_id);
|
| SelectItem(item_delegate, ui::ET_KEY_RELEASED);
|
|
|
| // Check that we have set focus on the existing application and nothing new
|
|
|