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

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: Use a constant instead of magic number. Created 7 years, 9 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
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 7dbbfdf257317016948ada30b36d0232ff2d20e8..3a44a815c19ba24c9e1361ac6cc49294a25c6deb 100644
--- a/chrome/browser/web_applications/web_app_mac_unittest.mm
+++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -137,8 +137,10 @@ 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().GetImageNamed(
Robert Sesek 2013/04/04 18:39:02 GetNativeImageNamed
Matt Giuca 2013/04/05 06:30:13 Done.
+ IDR_PRODUCT_LOGO_32);
+ info.favicon.Add(product_logo);
WebAppShortcutCreatorMock shortcut_creator(info);
shortcut_creator.UpdateIcon(dst_path);
@@ -148,8 +150,8 @@ TEST(WebAppShortcutCreatorTest, UpdateIcon) {
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.ToSkBitmap()->width(), [image size].width);
Robert Sesek 2013/04/04 18:39:02 Use ->Width() and ->Height()
Matt Giuca 2013/04/05 06:30:13 Done.
+ EXPECT_EQ(product_logo.ToSkBitmap()->height(), [image size].height);
}
} // namespace web_app

Powered by Google App Engine
This is Rietveld 408576698