OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <style> |
| 4 .theme ::-webkit-file-upload-button { background-color: green } |
| 5 </style> |
| 6 <div id="t"> |
| 7 <div></div> |
| 8 <div></div> |
| 9 <div></div> |
| 10 <div></div> |
| 11 <div></div> |
| 12 <input type="file"></input> |
| 13 </div> |
| 14 <script> |
| 15 description("Check that targeted class invalidation works for custom pseudo elem
ents."); |
| 16 |
| 17 shouldBeTrue("!!window.internals"); |
| 18 |
| 19 if (window.internals) { |
| 20 var gray = "rgb(192, 192, 192)"; |
| 21 var green = "rgb(0, 128, 0)"; |
| 22 |
| 23 fileUploadButton = internals.shadowRoot(document.querySelector("input")).fir
stChild; |
| 24 |
| 25 shouldBe("getComputedStyle(fileUploadButton, null).backgroundColor", "gray")
; |
| 26 |
| 27 document.body.offsetLeft; // force style recalc. |
| 28 |
| 29 document.getElementById("t").className = "theme"; |
| 30 |
| 31 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); |
| 32 shouldBe("getComputedStyle(fileUploadButton, null).backgroundColor", "green"
); |
| 33 } |
| 34 </script> |
OLD | NEW |