OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
3 <style> | 3 <style> |
4 .inner1 [attr] { color: red; } | 4 .inner1 [attr] { color: red; } |
5 .inner2 .nomatch { color: red; } | 5 .inner2 .nomatch { color: red; } |
6 </style> | 6 </style> |
7 <div id="outer"> | 7 <div id="outer"> |
8 <div id="inner1"> | 8 <div id="inner1"> |
9 <div></div> | 9 <div></div> |
10 </div> | 10 </div> |
11 <div id="inner2"> | 11 <div id="inner2"> |
12 <div attr></div> | 12 <div attr></div> |
13 </div> | 13 </div> |
14 </div> | 14 </div> |
15 <script> | 15 <script> |
16 description("Test invalidation set scope for attribute features."); | 16 description("Test invalidation set scope for attribute features."); |
17 | 17 |
18 document.body.offsetLeft; // force style recalc. | 18 document.body.offsetLeft; // force style recalc. |
19 | 19 |
20 document.getElementById("inner1").className = "inner1"; | 20 document.getElementById("inner1").className = "inner1"; |
21 document.getElementById("inner2").className = "inner2"; | 21 document.getElementById("inner2").className = "inner2"; |
22 if (window.internals) | 22 if (window.internals) |
23 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); | 23 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0"); |
24 </script> | 24 </script> |
OLD | NEW |