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

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

Issue 2484413002: Enhance chrome.app.window API with title property
Patch Set: Rebase Created 4 years, 1 month 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_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 f4f0d6627aad0f104752d00253b47b39a0cab07d..defd526815a37b85f88ad95227af0cde33393c04 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
@@ -198,9 +198,10 @@ class LauncherPlatformAppBrowserTest
ash::ShelfModel* shelf_model() { return ash::WmShell::Get()->shelf_model(); }
ash::ShelfID CreateAppShortcutLauncherItem(
- const ash::launcher::AppLauncherId& app_launcher_id) {
+ const ash::launcher::AppLauncherId& app_launcher_id,
+ const std::string& title) {
return controller_->CreateAppShortcutLauncherItem(
- app_launcher_id, shelf_model()->item_count());
+ app_launcher_id, title, shelf_model()->item_count());
}
const ash::ShelfItem& GetLastLauncherItem() {
@@ -304,7 +305,7 @@ class ShelfAppBrowserTest : public ExtensionBrowserTest {
// Then create a shortcut.
int item_count = model_->item_count();
ash::ShelfID shortcut_id = controller_->CreateAppShortcutLauncherItem(
- ash::launcher::AppLauncherId(app_id), item_count);
+ ash::launcher::AppLauncherId(app_id), "", item_count);
controller_->SyncPinPosition(shortcut_id);
EXPECT_EQ(++item_count, model_->item_count());
const ash::ShelfItem& item = *model_->ItemByID(shortcut_id);
@@ -318,7 +319,7 @@ class ShelfAppBrowserTest : public ExtensionBrowserTest {
ash::ShelfID PinFakeApp(const std::string& app_id) {
return controller_->CreateAppShortcutLauncherItem(
- ash::launcher::AppLauncherId(app_id), model_->item_count());
+ ash::launcher::AppLauncherId(app_id), "", model_->item_count());
}
// Get the index of an item which has the given type.
@@ -425,7 +426,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, LaunchPinned) {
// Then create a shortcut.
ash::ShelfID shortcut_id =
- CreateAppShortcutLauncherItem(ash::launcher::AppLauncherId(app_id));
+ CreateAppShortcutLauncherItem(ash::launcher::AppLauncherId(app_id), "");
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
ash::ShelfItem item = *shelf_model()->ItemByID(shortcut_id);
@@ -462,7 +463,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, PinRunning) {
// Create a shortcut. The app item should be after it.
ash::ShelfID foo_id =
- CreateAppShortcutLauncherItem(ash::launcher::AppLauncherId("foo"));
+ CreateAppShortcutLauncherItem(ash::launcher::AppLauncherId("foo"), "");
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
EXPECT_LT(shelf_model()->ItemIndexByID(foo_id),
@@ -477,7 +478,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, PinRunning) {
// New shortcuts should come after the item.
ash::ShelfID bar_id =
- CreateAppShortcutLauncherItem(ash::launcher::AppLauncherId("bar"));
+ CreateAppShortcutLauncherItem(ash::launcher::AppLauncherId("bar"), "");
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
EXPECT_LT(shelf_model()->ItemIndexByID(id),
@@ -497,7 +498,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, UnpinRunning) {
// Then create a shortcut.
ash::ShelfID shortcut_id =
- CreateAppShortcutLauncherItem(ash::launcher::AppLauncherId(app_id));
+ CreateAppShortcutLauncherItem(ash::launcher::AppLauncherId(app_id), "");
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
ash::ShelfItem item = *shelf_model()->ItemByID(shortcut_id);
@@ -507,7 +508,7 @@ IN_PROC_BROWSER_TEST_F(LauncherPlatformAppBrowserTest, UnpinRunning) {
// Create a second shortcut. This will be needed to force the first one to
// move once it gets unpinned.
ash::ShelfID foo_id =
- CreateAppShortcutLauncherItem(ash::launcher::AppLauncherId("foo"));
+ CreateAppShortcutLauncherItem(ash::launcher::AppLauncherId("foo"), "");
++item_count;
ASSERT_EQ(item_count, shelf_model()->item_count());
EXPECT_LT(shelf_model()->ItemIndexByID(shortcut_id),

Powered by Google App Engine
This is Rietveld 408576698