| 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 .select::selection { | 4 .select::selection { |
| 5 background-color: red; | 5 background-color: red; |
| 6 } | 6 } |
| 7 | 7 |
| 8 .t1 .select::selection, | 8 .t1 .select::selection, |
| 9 .t2 .select::selection:window-inactive { | 9 .t2 .select::selection:window-inactive { |
| 10 background-color: green; | 10 background-color: green; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 var select = document.querySelectorAll(".select"); | 46 var select = document.querySelectorAll(".select"); |
| 47 | 47 |
| 48 setSelection(select[0].firstChild); | 48 setSelection(select[0].firstChild); |
| 49 shouldBe("getComputedStyle(select[0], '::selection').backgroundColor", "red"); | 49 shouldBe("getComputedStyle(select[0], '::selection').backgroundColor", "red"); |
| 50 | 50 |
| 51 document.body.offsetTop; // Force recalc. | 51 document.body.offsetTop; // Force recalc. |
| 52 t1.className = "t1"; | 52 t1.className = "t1"; |
| 53 if (window.internals) | 53 if (window.internals) |
| 54 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); | 54 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); |
| 55 shouldBe("getComputedStyle(select[0], '::selection').backgroundColor", "green"); | 55 shouldBe("getComputedStyle(select[0], '::selection').backgroundColor", "green"); |
| 56 | 56 |
| 57 shouldBeDefined(window.testRunner); | 57 shouldBeDefined(window.testRunner); |
| 58 testRunner.setWindowIsKey(false); | 58 testRunner.setWindowIsKey(false); |
| 59 | 59 |
| 60 setSelection(select[1].firstChild); | 60 setSelection(select[1].firstChild); |
| 61 shouldBe("getComputedStyle(select[1], '::selection').backgroundColor", "red"); | 61 shouldBe("getComputedStyle(select[1], '::selection').backgroundColor", "red"); |
| 62 | 62 |
| 63 document.body.offsetTop; // Force recalc. | 63 document.body.offsetTop; // Force recalc. |
| 64 t2.className = "t2"; | 64 t2.className = "t2"; |
| 65 if (window.internals) | 65 if (window.internals) |
| 66 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); | 66 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); |
| 67 shouldBe("getComputedStyle(select[1], '::selection').backgroundColor", "green"); | 67 shouldBe("getComputedStyle(select[1], '::selection').backgroundColor", "green"); |
| 68 </script> | 68 </script> |
| OLD | NEW |