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 :target #match { background-color: green } | 4 :target #match { background-color: green } |
5 #target + div { color: pink } | 5 #target + div { color: pink } |
6 </style> | 6 </style> |
7 <div id="target"> | 7 <div id="target"> |
8 <div></div> | 8 <div></div> |
9 <div></div> | 9 <div></div> |
10 <div> | 10 <div> |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 var transparent = "rgba(0, 0, 0, 0)"; | 25 var transparent = "rgba(0, 0, 0, 0)"; |
26 var green = "rgb(0, 128, 0)"; | 26 var green = "rgb(0, 128, 0)"; |
27 | 27 |
28 shouldBe("getComputedStyle(match, '').backgroundColor", "transparent"); | 28 shouldBe("getComputedStyle(match, '').backgroundColor", "transparent"); |
29 | 29 |
30 target.offsetTop; // Force recalc. | 30 target.offsetTop; // Force recalc. |
31 | 31 |
32 document.location.hash = "#target"; | 32 document.location.hash = "#target"; |
33 | 33 |
34 // Should have checked that internals.updateStyleAndReturnAffectedElementCount() | 34 // Should have checked that internals.updateStyleAndLayoutAndReturnAffectedEleme
ntCount() |
35 // equals 2 here, but the target style is updated synchronously from where the | 35 // equals 2 here, but the target style is updated synchronously from where the |
36 // target is set. | 36 // target is set. |
37 | 37 |
38 shouldBe("getComputedStyle(match, '').backgroundColor", "green"); | 38 shouldBe("getComputedStyle(match, '').backgroundColor", "green"); |
39 </script> | 39 </script> |
OLD | NEW |