Index: third_party/WebKit/Source/core/css/parser/CSSParserFastPathsTest.cpp |
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserFastPathsTest.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserFastPathsTest.cpp |
index a464c2d836963e2442208589a77dff27f825e96a..250a2619677fc1bc1e6a1bb8f7187a88662c9b8c 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSParserFastPathsTest.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserFastPathsTest.cpp |
@@ -4,6 +4,7 @@ |
#include "core/css/parser/CSSParserFastPaths.h" |
+#include "core/css/CSSColorValue.h" |
#include "core/css/CSSIdentifierValue.h" |
#include "core/css/CSSValueList.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -98,4 +99,12 @@ TEST(CSSParserFastPathsTest, ParseInvalidTransform) { |
ASSERT_EQ(nullptr, value); |
} |
+TEST(CSSParserFastPathsTest, ParseColorWithLargeAlpha) { |
+ CSSValue* value = CSSParserFastPaths::parseColor("rgba(0,0,0,1893205797.13)", |
+ HTMLStandardMode); |
+ EXPECT_NE(nullptr, value); |
+ EXPECT_TRUE(value->isColorValue()); |
+ EXPECT_EQ(Color::black, toCSSColorValue(*value).value()); |
+} |
+ |
} // namespace blink |