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

Unified Diff: chrome/browser/web_applications/web_app_mac_unittest.mm

Issue 12881003: ShortcutInfo::favicon is now a gfx::ImageFamily instead of gfx::Image. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: CopyGdkPixbuf and TODO. Created 7 years, 8 months 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/web_applications/web_app_mac.mm ('k') | chrome/browser/web_applications/web_app_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_applications/web_app_mac_unittest.mm
diff --git a/chrome/browser/web_applications/web_app_mac_unittest.mm b/chrome/browser/web_applications/web_app_mac_unittest.mm
index eae79e5611ebe10a1ffedca49c8b90913b413520..2579cb367133a8c51eb3b8ffc16dfa24e0b2fe4c 100644
--- a/chrome/browser/web_applications/web_app_mac_unittest.mm
+++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -160,19 +160,21 @@ TEST(WebAppShortcutCreatorTest, UpdateIcon) {
base::FilePath dst_path = scoped_temp_dir.path();
ShellIntegration::ShortcutInfo info = GetShortcutInfo();
- info.favicon = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- IDR_PRODUCT_LOGO_32);
+ gfx::Image product_logo =
+ ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
+ IDR_PRODUCT_LOGO_32);
+ info.favicon.Add(product_logo);
WebAppShortcutCreatorMock shortcut_creator(info);
- shortcut_creator.UpdateIcon(dst_path);
+ ASSERT_TRUE(shortcut_creator.UpdateIcon(dst_path));
base::FilePath icon_path =
dst_path.Append("Contents").Append("Resources").Append("app.icns");
scoped_nsobject<NSImage> image([[NSImage alloc] initWithContentsOfFile:
base::mac::FilePathToNSString(icon_path)]);
EXPECT_TRUE(image);
- EXPECT_EQ(info.favicon.ToSkBitmap()->width(), [image size].width);
- EXPECT_EQ(info.favicon.ToSkBitmap()->height(), [image size].height);
+ EXPECT_EQ(product_logo.Width(), [image size].width);
+ EXPECT_EQ(product_logo.Height(), [image size].height);
}
} // namespace web_app
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.mm ('k') | chrome/browser/web_applications/web_app_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698