| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>@media CSSOM - inherited from CSSConditionRule</title> |
| 5 <script src="../resources/testharness.js"></script> |
| 6 <script src="../resources/testharnessreport.js"></script> |
| 7 <style> |
| 8 @media screen and (min-width: 480px) { |
| 9 body { background-color: lightgreen; } |
| 10 } |
| 11 </style> |
| 12 </head> |
| 13 <body> |
| 14 <p>Test for <a href="http://crbug.com/651792">bug 651792</a>.</p> |
| 15 <script> |
| 16 var rules = document.styleSheets[0].cssRules; |
| 17 test(function(){ |
| 18 assert_equals(CSSRule.STYLE_RULE,1); |
| 19 assert_equals(CSSRule.MEDIA_RULE,4); |
| 20 assert_equals(rules.length, 1); |
| 21 assert_equals(rules[0].type, 4); |
| 22 assert_equals(rules[0].cssRules.length, 1); |
| 23 assert_equals(rules[0].cssRules[0].type, 1); |
| 24 assert_equals(rules[0].conditionText, "screen and (min-width: 480px)"); |
| 25 assert_equals(rules[0].cssText, |
| 26 "@media screen and (min-width: 480px) { \n" + |
| 27 " body { background-color: lightgreen; }\n" + |
| 28 "}"); |
| 29 }, "@media inherited from CSSConditionRule pass."); |
| 30 </script> |
| 31 </body> |
| 32 </html> |
| OLD | NEW |