2 <script src=
"../../../resources/js-test.js"></script>
4 .theme ::-webkit-file-upload-button { background-color: green }
12 <input type=
"file"></input>
15 description("Check that targeted class invalidation works for custom pseudo elements.");
17 shouldBeTrue("!!window.internals");
19 if (window
.internals
) {
20 var gray
= "rgb(192, 192, 192)";
21 var green
= "rgb(0, 128, 0)";
23 fileUploadButton
= internals
.shadowRoot(document
.querySelector("input")).firstChild
;
25 shouldBe("getComputedStyle(fileUploadButton, null).backgroundColor", "gray");
27 document
.body
.offsetLeft
; // force style recalc.
29 document
.getElementById("t").className
= "theme";
31 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
32 shouldBe("getComputedStyle(fileUploadButton, null).backgroundColor", "green");