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

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

Issue 1963843002: Implement stricter hashless hex color parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more subtests Created 4 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
Index: third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html b/third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html
index 70c3cf3aaa88b2f73c805e93990ccdca6e485691..d0faa51a9cea44b7b4f853f441f7e380b7f76f11 100644
--- a/third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html
+++ b/third_party/WebKit/LayoutTests/fast/css/parsing-color-quirk.html
@@ -43,12 +43,17 @@
#t33 { background-color: 1e+1 }
#t34 { background-color: 1e-1 }
#t35 { background-color: 2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222f }
+#t36 { background-color: 0.000ff }
+#t37 { background-color: -0001ff }
+#t38 { background-color: -0.000ff }
+#t39 { background-color: -1.1 }
+#t40 { background-color: -1 }
</style>
<script>
var sheet = document.styleSheets[0];
test(function(){ assert_true(!!sheet); }, "StyleSheet present");
-test(function(){ assert_equals(sheet.cssRules.length, 35); }, "All rules parsed");
+test(function(){ assert_equals(sheet.cssRules.length, 40); }, "All rules parsed");
test(function(){
assert_equals(sheet.cssRules[0].style.color, "rgb(0, 128, 0)");
@@ -190,4 +195,23 @@ test(function(){
assert_equals(sheet.cssRules[34].style.backgroundColor, "");
}, "No hashless color quirk for background-color property with invalid hashless value");
+test(function(){
+ assert_equals(sheet.cssRules[35].style.backgroundColor, "");
+}, "No hashless color quirk for background-color property with invalid hashless value");
+
+test(function(){
+ assert_equals(sheet.cssRules[36].style.backgroundColor, "");
+}, "No hashless color quirk for background-color property with invalid hashless value");
+
+test(function(){
+ assert_equals(sheet.cssRules[37].style.backgroundColor, "");
+}, "No hashless color quirk for background-color property with invalid hashless value");
+
+test(function(){
+ assert_equals(sheet.cssRules[38].style.backgroundColor, "");
+}, "No hashless color quirk for background-color property with invalid hashless value");
+
+test(function(){
+ assert_equals(sheet.cssRules[39].style.backgroundColor, "");
+}, "No hashless color quirk for background-color property with invalid hashless value");
</script>
rune 2016/05/10 21:27:32 What's the pass rate of http://w3c-test.org/quirks
rwlbuis 2016/05/10 21:34:31 Without patch 26 fail, with patch 0 fail :) Thanks

Powered by Google App Engine
This is Rietveld 408576698