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

Unified Diff: ui/gfx/color_utils_unittest.cc

Issue 2714633003: Adds more metadata to the about:webapks page (Closed)
Patch Set: Adds more metadata to the about:webapks page Created 3 years, 10 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
« ui/gfx/color_utils.h ('K') | « ui/gfx/color_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_utils_unittest.cc
diff --git a/ui/gfx/color_utils_unittest.cc b/ui/gfx/color_utils_unittest.cc
index 367029f9a0c7eb24e3e55284c172fbcf95afac9b..acfc736808ba68fab8675e055c8636bc3dd0984e 100644
--- a/ui/gfx/color_utils_unittest.cc
+++ b/ui/gfx/color_utils_unittest.cc
@@ -166,4 +166,16 @@ TEST(ColorUtils, AlphaBlend) {
EXPECT_EQ(0U, SkColorGetA(AlphaBlend(fore, back, 255)));
}
+TEST(ColorUtils, SkColorToRGBAString) {
+ SkColor color = SkColorSetARGB(50, 100, 150, 153);
+ std::string color_string = SkColorToRGBAString(color);
+ EXPECT_EQ(color_string, "rgba(50,100,150,0.6)");
+}
+
+TEST(ColorUtils, SkColorToRGBString) {
+ SkColor color = SkColorSetARGB(50, 100, 150, 200);
+ std::string color_string = SkColorToRGBString(color);
+ EXPECT_EQ(color_string, "50,100,150");
+}
+
} // namespace color_utils
« ui/gfx/color_utils.h ('K') | « ui/gfx/color_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698