OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <style> |
| 4 .a .b:not(:-internal-spatial-navigation-focus) { background-color: green } |
| 5 </style> |
| 6 <div id="a"> |
| 7 <select id="sel" multiple> |
| 8 <option id="b" class="b">1</option> |
| 9 <option>2</option> |
| 10 </select> |
| 11 <div></div> |
| 12 <div></div> |
| 13 </div> |
| 14 <div> |
| 15 <div></div> |
| 16 <div></div> |
| 17 </div> |
| 18 <script> |
| 19 description("Use descendant invalidation set in the presence of an :-internal-sp
atial-navigation-focus pseudo class."); |
| 20 |
| 21 debug("This test relies on the bug (crbug.com/432436) that internal pseudo class
es are being\n\ |
| 22 exposed to the extent that they are not dropped, but in the case of :-internal-s
patial-navigation-focus,\n\ |
| 23 never matched. If the mentioned bug is fixed this test will start failing. When
that happens,\n\ |
| 24 we need to either add the possibility to use internal css features in author sty
le for tests,\n\ |
| 25 support injecting UA style for tests, or drop this test.\n"); |
| 26 |
| 27 var transparent = "rgba(0, 0, 0, 0)"; |
| 28 var green = "rgb(0, 128, 0)"; |
| 29 |
| 30 if (window.internals) |
| 31 internals.settings.setSpatialNavigationEnabled(true); |
| 32 sel.focus(); |
| 33 |
| 34 shouldBe("getComputedStyle(b).backgroundColor", "transparent"); |
| 35 |
| 36 a.offsetTop; // Force recalc. |
| 37 a.className = "a"; |
| 38 |
| 39 if (window.internals) |
| 40 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); |
| 41 |
| 42 shouldBe("getComputedStyle(b).backgroundColor", "green"); |
| 43 </script> |
OLD | NEW |