| Index: chrome/browser/android/shortcut_info_unittest.cc
|
| diff --git a/chrome/browser/android/shortcut_info_unittest.cc b/chrome/browser/android/shortcut_info_unittest.cc
|
| index 86826ed29292bc2313f0177a0d1ad033a6b9a83d..f5fd032003a48307c706d8f9ff957b623b2edae5 100644
|
| --- a/chrome/browser/android/shortcut_info_unittest.cc
|
| +++ b/chrome/browser/android/shortcut_info_unittest.cc
|
| @@ -54,11 +54,19 @@ TEST_F(ShortcutInfoTest, ShortNameFallsBackToName) {
|
| ASSERT_EQ(manifest_.name.string(), info_.short_name);
|
| }
|
|
|
| -TEST_F(ShortcutInfoTest, UserTitleBecomesShortName) {
|
| - manifest_.short_name =
|
| - base::NullableString16(base::ASCIIToUTF16("name"), false);
|
| - info_.user_title = base::ASCIIToUTF16("title");
|
| +// Test that if a manifest with an empty name and empty short_name is passed,
|
| +// that ShortcutInfo::UpdateFromManifest() does not overwrite the current
|
| +// ShortcutInfo::name and ShortcutInfo::short_name.
|
| +TEST_F(ShortcutInfoTest, IgnoreEmptyNameAndShortName) {
|
| + base::string16 initial_name(base::ASCIIToUTF16("name"));
|
| + base::string16 initial_short_name(base::ASCIIToUTF16("short_name"));
|
| +
|
| + manifest_.display = blink::kWebDisplayModeStandalone;
|
| + info_.name = initial_name;
|
| + info_.short_name = initial_short_name;
|
| + manifest_.name = base::NullableString16(base::string16(), false);
|
| info_.UpdateFromManifest(manifest_);
|
|
|
| - ASSERT_EQ(manifest_.short_name.string(), info_.user_title);
|
| + ASSERT_EQ(initial_name, info_.name);
|
| + ASSERT_EQ(initial_short_name, info_.short_name);
|
| }
|
|
|