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

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
« no previous file with comments | « 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..3870dd3f38e3c06fef309f8f69b51cc48434c9f1 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(153, 100, 150, 200);
+ std::string color_string = SkColorToRgbaString(color);
+ EXPECT_EQ(color_string, "rgba(100,150,200,.6)");
+}
+
+TEST(ColorUtils, SkColorToRgbString) {
+ SkColor color = SkColorSetARGB(200, 50, 100, 150);
+ std::string color_string = SkColorToRgbString(color);
+ EXPECT_EQ(color_string, "50,100,150");
+}
+
} // namespace color_utils
« no previous file with comments | « ui/gfx/color_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698