5 <script src=
"../../resources/js-test.js"></script>
7 .entry[
status=
"foo"] .toggle {
10 .entry[
status=
"bar"] .toggle {
16 <div class=
"entry" status=
"foo">
17 <span class=
"toggle">Text.
</span>
21 description("This test checks that attribute selectors are recursively re-evaluated when the attribute changes.");
23 var entry
= document
.getElementsByClassName("entry")[0];
24 var toggle
= document
.getElementsByClassName("toggle")[0];
26 shouldBe("getComputedStyle(toggle).color", "'rgb(0, 128, 0)'");
27 entry
.setAttribute("status", "bar");
28 shouldBe("getComputedStyle(toggle).color", "'rgb(255, 0, 0)'");
30 document
.body
.removeChild(entry
);