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

Unified Diff: skia/ext/skia_utils_ios_unittest.mm

Issue 1413903008: Add LargeIconCache and LargeIconServiceFactory for iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits for unit test Created 5 years, 2 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: skia/ext/skia_utils_ios_unittest.mm
diff --git a/skia/ext/skia_utils_ios_unittest.mm b/skia/ext/skia_utils_ios_unittest.mm
index 71f46a4e6b349cc751d43ac614d41d65f5a81013..02994727bf54647c0149eef44515e5b20de919a3 100644
--- a/skia/ext/skia_utils_ios_unittest.mm
+++ b/skia/ext/skia_utils_ios_unittest.mm
@@ -749,5 +749,16 @@ TEST_F(SkiaUtilsIosTest, Image88x88OrLarger) {
EXPECT_EQ(1UL, bitmaps.size());
}
+TEST_F(SkiaUtilsIosTest, UIColorFromSkColor) {
+ SkColor color = SkColorSetARGB(50, 100, 150, 200);
+ UIColor* ios_color = gfx::UIColorFromSkColor(color);
+ CGFloat red, green, blue, alpha;
+ [ios_color getRed:&red green:&green blue:&blue alpha:&alpha];
+ EXPECT_EQ(50, static_cast<int>(alpha * 255 + 0.5f));
+ EXPECT_EQ(100, static_cast<int>(red * 255 + 0.5f));
+ EXPECT_EQ(150, static_cast<int>(green * 255 + 0.5f));
+ EXPECT_EQ(200, static_cast<int>(blue * 255 + 0.5f));
+}
+
} // namespace
« ios/chrome/browser/favicon/large_icon_cache.cc ('K') | « skia/ext/skia_utils_ios.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698