OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 div { |
| 6 width: 100px; |
| 7 @apply --foo; |
| 8 height: 100px; |
| 9 } |
| 10 </style> |
| 11 <script> |
| 12 var rule = document.styleSheets[0].cssRules[0]; |
| 13 var style = rule.style; |
| 14 |
| 15 test(function(){ |
| 16 var expected = "width: 100px; @apply --foo; height: 100px;" |
| 17 assert_equals(rule.cssText, "div { " + expected + " }"); |
| 18 assert_equals(style.cssText, expected); |
| 19 }, "@apply should serialize correctly in cssText"); |
| 20 |
| 21 test(function(){ |
| 22 assert_equals(style.item(0), "width"); |
| 23 assert_equals(style.item(1), "@apply"); |
| 24 assert_equals(style.item(2), "height"); |
| 25 }, "CSSStyleDeclaration.item should work with @apply"); |
| 26 </script> |
OLD | NEW |