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

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: Add a 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
« no previous file with comments | « skia/ext/skia_utils_ios.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e6dc264f05117fc18f7da59bd6b19bc611092c0a 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, (int)(alpha * 255));
Justin Novosad 2015/10/30 20:22:04 To be totally safe with respect to machine precisi
+ EXPECT_EQ(100, (int)(red * 255));
+ EXPECT_EQ(150, (int)(green * 255));
+ EXPECT_EQ(200, (int)(blue * 255));
+}
+
} // namespace
« no previous file with comments | « skia/ext/skia_utils_ios.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698