OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 |
| 5 <style> |
| 6 div { |
| 7 margin: 10px; |
| 8 border: 10px solid green; |
| 9 width: 80px; |
| 10 height: 80px; |
| 11 background: red; |
| 12 } |
| 13 #a { @some at-rule; background: green; } |
| 14 #b { @at-rule yay { } background: green; } |
| 15 #c, #d { |
| 16 background: green; |
| 17 border-color: red; |
| 18 } |
| 19 #c { |
| 20 not-an-at-rule { } |
| 21 background: red; |
| 22 border-color: green; |
| 23 } |
| 24 #d { |
| 25 #also-not-an-at-rule { } |
| 26 background: red; |
| 27 border-color: green; |
| 28 } |
| 29 </style> |
| 30 |
| 31 <div id=a></div> |
| 32 <div id=b></div> |
| 33 <div id=c></div> |
| 34 <div id=d></div> |
| 35 <div id=e></div> |
| 36 |
| 37 <script> |
| 38 test(function(){ |
| 39 assert_equals(getComputedStyle(a).backgroundColor, "rgb(0, 128, 0)"); |
| 40 }, "Declarations allowed after semicolon-terminated at-rules in declaration list
"); |
| 41 test(function(){ |
| 42 assert_equals(getComputedStyle(b).backgroundColor, "rgb(0, 128, 0)"); |
| 43 }, "Declarations allowed after at-rules with an associated block in declaration
list"); |
| 44 test(function(){ |
| 45 assert_equals(getComputedStyle(c).backgroundColor, "rgb(0, 128, 0)"); |
| 46 assert_equals(getComputedStyle(c).borderColor, "rgb(0, 128, 0)"); |
| 47 assert_equals(getComputedStyle(d).backgroundColor, "rgb(0, 128, 0)"); |
| 48 assert_equals(getComputedStyle(d).borderColor, "rgb(0, 128, 0)"); |
| 49 }, "Error recovery looks for semicolon and not block end"); |
| 50 </script> |
OLD | NEW |