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

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: Added test suite for icon_family. 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 ee6b647808d0e59e32716c58fd93e2a10f80e01c..9ed5737769567694d13d90651026749c653d98e6 100644
--- a/chrome/browser/web_applications/web_app_mac_unittest.mm
+++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -132,8 +132,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(
+ IDR_PRODUCT_LOGO_32);
+ info.favicon.Add(product_logo);
WebAppShortcutCreatorMock shortcut_creator(info);
shortcut_creator.UpdateIcon(dst_path);
@@ -143,8 +145,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);
+ EXPECT_EQ(product_logo.ToSkBitmap()->height(), [image size].height);
}
} // namespace web_app

Powered by Google App Engine
This is Rietveld 408576698