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

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: 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 8bc7b766abaed2132ac875bf7d816de33aa9bc9b..b4c003de4f800b536216ffd8e6f8707e516d69f0 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
@@ -197,9 +197,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() {
@@ -303,7 +304,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);
@@ -317,7 +318,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.
@@ -424,7 +425,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);
@@ -461,7 +462,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),
@@ -476,7 +477,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),
@@ -496,7 +497,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);
@@ -506,7 +507,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