OLD | NEW |
---|---|
1 <script src="../../resources/testharness.js"></script> | 1 <script src="../../resources/testharness.js"></script> |
2 <script src="../../resources/testharnessreport.js"></script> | 2 <script src="../../resources/testharnessreport.js"></script> |
3 <style> | 3 <style> |
4 #t1 { color: 008000 } | 4 #t1 { color: 008000 } |
5 #t2 { background-color: 008000 } | 5 #t2 { background-color: 008000 } |
6 #t3 { border-color: 008000 } | 6 #t3 { border-color: 008000 } |
7 #t4 { border-bottom-color: 008000 } | 7 #t4 { border-bottom-color: 008000 } |
8 #t5 { border-left-color: 008000 } | 8 #t5 { border-left-color: 008000 } |
9 #t6 { border-right-color: 008000 } | 9 #t6 { border-right-color: 008000 } |
10 #t7 { border-top-color: 008000 } | 10 #t7 { border-top-color: 008000 } |
(...skipping 25 matching lines...) Expand all Loading... | |
36 #t27 { border-right: ff0000 } | 36 #t27 { border-right: ff0000 } |
37 #t28 { border-bottom: ff0000 } | 37 #t28 { border-bottom: ff0000 } |
38 #t29 { border: ff0000 } | 38 #t29 { border: ff0000 } |
39 | 39 |
40 #t30 { background-color: 1.1 } | 40 #t30 { background-color: 1.1 } |
41 #t31 { background-color: +1.1 } | 41 #t31 { background-color: +1.1 } |
42 #t32 { background-color: 1e1 } | 42 #t32 { background-color: 1e1 } |
43 #t33 { background-color: 1e+1 } | 43 #t33 { background-color: 1e+1 } |
44 #t34 { background-color: 1e-1 } | 44 #t34 { background-color: 1e-1 } |
45 #t35 { background-color: 2222222222222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222222222222222222222222222222222222 2222222222222222222222222f } | 45 #t35 { background-color: 2222222222222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222222222222222222222222222222222222 2222222222222222222222222f } |
46 | |
47 #t36 { border-color: 1010 } | |
48 #t37 { border-color: 00101010 } | |
49 #t38 { border-color: ff10 } | |
50 #t39 { border-color: ff101010 } | |
46 </style> | 51 </style> |
47 <script> | 52 <script> |
48 var sheet = document.styleSheets[0]; | 53 var sheet = document.styleSheets[0]; |
49 | 54 |
50 test(function(){ assert_true(!!sheet); }, "StyleSheet present"); | 55 test(function(){ assert_true(!!sheet); }, "StyleSheet present"); |
51 test(function(){ assert_equals(sheet.cssRules.length, 35); }, "All rules parsed" ); | 56 test(function(){ assert_equals(sheet.cssRules.length, 39); }, "All rules parsed" ); |
52 | 57 |
53 test(function(){ | 58 test(function(){ |
54 assert_equals(sheet.cssRules[0].style.color, "rgb(0, 128, 0)"); | 59 assert_equals(sheet.cssRules[0].style.color, "rgb(0, 128, 0)"); |
55 }, "Hashless color quirk for color property"); | 60 }, "Hashless color quirk for color property"); |
56 | 61 |
57 test(function(){ | 62 test(function(){ |
58 assert_equals(sheet.cssRules[1].style.backgroundColor, "rgb(0, 128, 0)"); | 63 assert_equals(sheet.cssRules[1].style.backgroundColor, "rgb(0, 128, 0)"); |
59 }, "Hashless color quirk for background-color property"); | 64 }, "Hashless color quirk for background-color property"); |
60 | 65 |
61 test(function(){ | 66 test(function(){ |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 }, "No hashless color quirk for background-color property with invalid hashless value"); | 188 }, "No hashless color quirk for background-color property with invalid hashless value"); |
184 | 189 |
185 test(function(){ | 190 test(function(){ |
186 assert_equals(sheet.cssRules[33].style.backgroundColor, ""); | 191 assert_equals(sheet.cssRules[33].style.backgroundColor, ""); |
187 }, "No hashless color quirk for background-color property with invalid hashless value"); | 192 }, "No hashless color quirk for background-color property with invalid hashless value"); |
188 | 193 |
189 test(function(){ | 194 test(function(){ |
190 assert_equals(sheet.cssRules[34].style.backgroundColor, ""); | 195 assert_equals(sheet.cssRules[34].style.backgroundColor, ""); |
191 }, "No hashless color quirk for background-color property with invalid hashless value"); | 196 }, "No hashless color quirk for background-color property with invalid hashless value"); |
192 | 197 |
198 test(function(){ | |
199 assert_equals(sheet.cssRules[35].style.borderColor, "rgb(0, 16, 16)"); | |
200 }, "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
| |
201 | |
202 test(function(){ | |
203 assert_equals(sheet.cssRules[36].style.borderColor, "rgb(16, 16, 16)"); | |
204 }, "No hashless color quirk for border-color property with 4/8 hex color value") ; | |
205 | |
206 test(function(){ | |
207 assert_equals(sheet.cssRules[37].style.borderColor, ""); | |
208 }, "No hashless color quirk for border-color property with 4/8 hex color value") ; | |
209 | |
210 test(function(){ | |
211 assert_equals(sheet.cssRules[38].style.borderColor, ""); | |
212 }, "No hashless color quirk for border-color property with 4/8 hex color value") ; | |
193 </script> | 213 </script> |
OLD | NEW |