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

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

Issue 1936913002: [CSS] Accept 8 (#RRGGBBAA) and 4 (#RGBA) value hex colors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: the-hashless-hex-color-quirk. 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..aa68f6f934f47c7cf26ca2d4fec120e0f86a4e2e 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 { border-color: 1010 }
+#t37 { border-color: 00101010 }
+#t38 { border-color: ff10 }
+#t39 { border-color: ff101010 }
</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, 39); }, "All rules parsed");
test(function(){
assert_equals(sheet.cssRules[0].style.color, "rgb(0, 128, 0)");
@@ -190,4 +195,19 @@ 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.borderColor, "rgb(0, 16, 16)");
+}, "No hashless color quirk for border-color property with 4/8 hex color value");
Timothy Loh 2016/05/11 07:23:08 The test comment for this and the next are wrong,
PhistucK 2016/05/11 08:02:46 Why are they valid? Step 4 in https://quirks.spec.
Timothy Loh 2016/05/11 08:05:03 At this point "serialization" consists of six char
Noel Gordon 2016/05/12 01:59:26 Did something like that: adjusted the comments to
+
+test(function(){
+ assert_equals(sheet.cssRules[36].style.borderColor, "rgb(16, 16, 16)");
+}, "No hashless color quirk for border-color property with 4/8 hex color value");
+
+test(function(){
+ assert_equals(sheet.cssRules[37].style.borderColor, "");
+}, "No hashless color quirk for border-color property with 4/8 hex color value");
+
+test(function(){
+ assert_equals(sheet.cssRules[38].style.borderColor, "");
+}, "No hashless color quirk for border-color property with 4/8 hex color value");
</script>

Powered by Google App Engine
This is Rietveld 408576698