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

Unified Diff: chrome/browser/apps/drive/drive_app_converter_browsertest.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
« no previous file with comments | « chrome/browser/apps/drive/drive_app_converter.cc ('k') | chrome/browser/extensions/bookmark_app_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/drive/drive_app_converter_browsertest.cc
diff --git a/chrome/browser/apps/drive/drive_app_converter_browsertest.cc b/chrome/browser/apps/drive/drive_app_converter_browsertest.cc
index 7cdef7945ea9353328bd7f2abd718d7885604632..11df12d7f35e52710f30fe53a97f88228063cf97 100644
--- a/chrome/browser/apps/drive/drive_app_converter_browsertest.cc
+++ b/chrome/browser/apps/drive/drive_app_converter_browsertest.cc
@@ -71,9 +71,9 @@ class DriveAppConverterTest : public ExtensionBrowserTest {
drive::DriveAppInfo GetTestDriveApp() {
// Define four icons. icon1.png is 16x16 and good to use. icon2.png is
// 16x16 but claims to be 32x32 and should be dropped. icon3.png is 66x66
- // and not a valid extension icon size and should be dropped too. The forth
- // one is icon2.png with 16x16 but should be ignored because 16x16 already
- // has icon1.png as its resource.
+ // and not a typical icon size but it should be allowed. The fourth one is
+ // icon2.png with 16x16 but should be ignored because 16x16 already has
+ // icon1.png as its resource.
drive::DriveAppInfo::IconList app_icons;
app_icons.push_back(std::make_pair(16, GetTestUrl("extensions/icon1.png")));
app_icons.push_back(std::make_pair(32, GetTestUrl("extensions/icon2.png")));
@@ -117,7 +117,11 @@ IN_PROC_BROWSER_TEST_F(DriveAppConverterTest, GoodApp) {
EXPECT_EQ(extensions::LAUNCH_CONTAINER_TAB,
AppLaunchInfo::GetLaunchContainer(app));
EXPECT_EQ(0u, app->permissions_data()->active_permissions().apis().size());
- EXPECT_EQ(1u, extensions::IconsInfo::GetIcons(app).map().size());
+ const ExtensionIconSet& icons = extensions::IconsInfo::GetIcons(app);
+ EXPECT_EQ(2u, icons.map().size());
+ EXPECT_FALSE(icons.Get(16, ExtensionIconSet::MATCH_EXACTLY).empty());
+ EXPECT_TRUE(icons.Get(32, ExtensionIconSet::MATCH_EXACTLY).empty());
+ EXPECT_FALSE(icons.Get(66, ExtensionIconSet::MATCH_EXACTLY).empty());
const Extension* installed = extensions::ExtensionSystem::Get(profile())
->extension_service()
« no previous file with comments | « chrome/browser/apps/drive/drive_app_converter.cc ('k') | chrome/browser/extensions/bookmark_app_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698