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

Unified Diff: LayoutTests/fast/css/parsing-color-quirk.html

Issue 1122293002: Disallow hashless hex color quirk for non integer <number> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test Created 5 years, 7 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 | « no previous file | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/parsing-color-quirk.html
diff --git a/LayoutTests/fast/css/parsing-color-quirk.html b/LayoutTests/fast/css/parsing-color-quirk.html
index 1ac0dbbb486f94ae0554de75f097584df9734c03..9e68fad4327567b225b22b644d0ffce5e8ac1726 100644
--- a/LayoutTests/fast/css/parsing-color-quirk.html
+++ b/LayoutTests/fast/css/parsing-color-quirk.html
@@ -36,12 +36,18 @@
#t27 { border-right: ff0000 }
#t28 { border-bottom: ff0000 }
#t29 { border: ff0000 }
+
+#t30 { background-color: 1.1 }
+#t31 { background-color: +1.1 }
+#t32 { background-color: 1e1 }
+#t33 { background-color: 1e+1 }
+#t34 { background-color: 1e-1 }
</style>
<script>
var sheet = document.styleSheets[0];
test(function(){ assert_true(!!sheet); }, "StyleSheet present");
-test(function(){ assert_equals(sheet.cssRules.length, 29); }, "All rules parsed");
+test(function(){ assert_equals(sheet.cssRules.length, 34); }, "All rules parsed");
test(function(){
assert_equals(sheet.cssRules[0].style.color, "rgb(0, 128, 0)");
@@ -158,4 +164,25 @@ test(function(){
test(function(){
assert_equals(sheet.cssRules[28].style.borderTopColor, "");
}, "No hashless color quirk for border shorthand");
+
+test(function(){
+ assert_equals(sheet.cssRules[29].style.backgroundColor, "");
+}, "No hashless color quirk for background-color property with invalid hashless value");
+
+test(function(){
+ assert_equals(sheet.cssRules[30].style.backgroundColor, "");
+}, "No hashless color quirk for background-color property with invalid hashless value");
+
+test(function(){
+ assert_equals(sheet.cssRules[31].style.backgroundColor, "");
+}, "No hashless color quirk for background-color property with invalid hashless value");
+
+test(function(){
+ assert_equals(sheet.cssRules[32].style.backgroundColor, "");
+}, "No hashless color quirk for background-color property with invalid hashless value");
+
+test(function(){
+ assert_equals(sheet.cssRules[33].style.backgroundColor, "");
+}, "No hashless color quirk for background-color property with invalid hashless value");
+
</script>
« no previous file with comments | « no previous file | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698