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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc

Issue 2833173002: mash: Support ShelfModel access in Chrome. (Closed)
Patch Set: Cleanup; Fix an Arc test by use CLC, not Ash's ShelfModel. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
index 2f4fc9a9823c578403dae293ccdd580bc970212d..a8da6c1fda265f08174cab31e68a9b11f28f4cc2 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -2408,3 +2408,14 @@ IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest,
ASSERT_FALSE(
IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE));
}
+
+// Ensure Ash and Chrome ShelfModel changes are synchronized correctly.
+IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTest, ShelfModelSyncsWithAsh) {
+ // The ChromeLauncherController instance should be initialized and contain
+ // shelf items for the AppList and browser shortcut.
+ ash::ShelfModel* model = controller_->shelf_model();
+ EXPECT_EQ(2, model->item_count());
+ constexpr char kAppListId[] = "jlfapfmkapbjlfbpjedlinehodkccjee";
+ EXPECT_EQ(kAppListId, model->items()[0].id.app_id);
+ EXPECT_EQ(extension_misc::kChromeAppId, model->items()[1].id.app_id);
+}

Powered by Google App Engine
This is Rietveld 408576698