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

Unified Diff: chrome/common/extensions/manifest_tests/extension_manifests_icons_unittest.cc

Issue 1504453002: Allow arbitrary sizes for extension icons (and bookmark app icons) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test updated Created 5 years 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/common/extensions/manifest_tests/extension_manifests_icons_unittest.cc
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_icons_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_icons_unittest.cc
index 20c26bbbd5620b94fe62fa44dc69d65f37890453..e73ba823478fb0c6401177737b569f1e4a470696 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_icons_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_icons_unittest.cc
@@ -26,17 +26,9 @@ TEST_F(IconsManifestTest, NormalizeIconPaths) {
ExtensionIconSet::MATCH_EXACTLY));
}
-TEST_F(IconsManifestTest, InvalidIconSizes) {
+TEST_F(IconsManifestTest, IconSizes) {
scoped_refptr<extensions::Extension> extension(
- LoadAndExpectSuccess("init_ignored_icon_size.json"));
- EXPECT_EQ("",
- IconsInfo::GetIcons(extension.get())
- .Get(300, ExtensionIconSet::MATCH_EXACTLY));
-}
-
-TEST_F(IconsManifestTest, ValidIconSizes) {
- scoped_refptr<extensions::Extension> extension(
- LoadAndExpectSuccess("init_valid_icon_size.json"));
+ LoadAndExpectSuccess("init_icon_size.json"));
const ExtensionIconSet& icons = IconsInfo::GetIcons(extension.get());
EXPECT_EQ("16.png", icons.Get(extension_misc::EXTENSION_ICON_BITTY,
@@ -53,6 +45,10 @@ TEST_F(IconsManifestTest, ValidIconSizes) {
ExtensionIconSet::MATCH_EXACTLY));
EXPECT_EQ("512.png", icons.Get(extension_misc::EXTENSION_ICON_GIGANTOR,
ExtensionIconSet::MATCH_EXACTLY));
+
+ // Any old size will be accepted.
+ EXPECT_EQ("300.png", IconsInfo::GetIcons(extension.get())
+ .Get(300, ExtensionIconSet::MATCH_EXACTLY));
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698