2 <script src=
"../../../resources/js-test.js"></script>
4 #link { background-color: red }
5 #link:-webkit-any-link { background-color: green }
6 #link + div { color: pink }
8 <a id=
"link">This link should have a green background.
</a>
16 description("Use descendant invalidation set for :-webkit-any-link pseudo class.")
18 var red
= "rgb(255, 0, 0)";
19 var green
= "rgb(0, 128, 0)";
21 shouldBe("getComputedStyle(link).backgroundColor", "red");
23 link
.offsetTop
; // Force recalc.
24 link
.href
= "not-visited.html";
27 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
29 shouldBe("getComputedStyle(link).backgroundColor", "green");