OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <style></style> |
| 5 <div> |
| 6 <div></div> |
| 7 <div></div> |
| 8 <div></div> |
| 9 <div></div> |
| 10 <div></div> |
| 11 <span></span> |
| 12 </div> |
| 13 <script> |
| 14 test(() => { |
| 15 assert_true(!!window.internals, "Test requires window.internals."); |
| 16 document.body.offsetTop; |
| 17 document.styleSheets[0].insertRule("span{background:green}", 0); |
| 18 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1, "
Check that only the span is affected."); |
| 19 }, "Inserting a style rule with a type selector should only invalidate eleme
nts with that type."); |
| 20 </script> |
OLD | NEW |