diff options
Diffstat (limited to 'extensions/common/image_util_unittest.cc')
-rw-r--r-- | extensions/common/image_util_unittest.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/extensions/common/image_util_unittest.cc b/extensions/common/image_util_unittest.cc index 8e7d80f..e4a81bb 100644 --- a/extensions/common/image_util_unittest.cc +++ b/extensions/common/image_util_unittest.cc @@ -108,4 +108,15 @@ TEST(ImageUtilTest, AcceptHsla) { RunPassHslTest("hsla(0, 100%, 50%, 1)", SK_ColorRED); } +TEST(ImageUtilTest, BasicColorKeyword) { + SkColor color = 0; + EXPECT_TRUE(image_util::ParseCssColorString("red", &color)); + EXPECT_EQ(color, SK_ColorRED); + + EXPECT_TRUE(image_util::ParseCssColorString("blue", &color)); + EXPECT_EQ(color, SK_ColorBLUE); + + EXPECT_FALSE(image_util::ParseCssColorString("my_red", &color)); +} + } // namespace extensions |