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 #link { background-color: red } | 4 #link { background-color: red } |
5 #link:-webkit-any-link { background-color: green } | 5 #link:-webkit-any-link { background-color: green } |
6 #link + div { color: pink } | 6 #link + div { color: pink } |
7 </style> | 7 </style> |
8 <a id="link">This link should have a green background.</a> | 8 <a id="link">This link should have a green background.</a> |
9 <div> | 9 <div> |
10 <div></div> | 10 <div></div> |
11 <div></div> | 11 <div></div> |
12 <div></div> | 12 <div></div> |
13 <div></div> | 13 <div></div> |
14 </div> | 14 </div> |
15 <script> | 15 <script> |
16 description("Use descendant invalidation set for :-webkit-any-link pseudo class.
") | 16 description("Use descendant invalidation set for :-webkit-any-link pseudo class.
") |
17 | 17 |
18 var red = "rgb(255, 0, 0)"; | 18 var red = "rgb(255, 0, 0)"; |
19 var green = "rgb(0, 128, 0)"; | 19 var green = "rgb(0, 128, 0)"; |
20 | 20 |
21 shouldBe("getComputedStyle(link).backgroundColor", "red"); | 21 shouldBe("getComputedStyle(link).backgroundColor", "red"); |
22 | 22 |
23 link.offsetTop; // Force recalc. | 23 link.offsetTop; // Force recalc. |
24 link.href = "not-visited.html"; | 24 link.href = "not-visited.html"; |
25 | 25 |
26 if (window.internals) | 26 if (window.internals) |
27 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 27 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1
"); |
28 | 28 |
29 shouldBe("getComputedStyle(link).backgroundColor", "green"); | 29 shouldBe("getComputedStyle(link).backgroundColor", "green"); |
30 </script> | 30 </script> |
OLD | NEW |