Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / invalidation / spatial-navigation-focus-pseudo.html
blob5790444bbbf4231086037537d885c42e16a2e8ee
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-spatial-navigation-focus pseudo class.");
21 debug("This test relies on the bug (crbug.com/432436) that internal pseudo classes are being\n\
22 exposed to the extent that they are not dropped, but in the case of :-internal-spatial-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 style for tests,\n\
25 support injecting UA style for tests, or drop this test.\n");
27 var transparent = "rgba(0, 0, 0, 0)";
28 var green = "rgb(0, 128, 0)";
30 if (window.internals)
31 internals.settings.setSpatialNavigationEnabled(true);
32 sel.focus();
34 shouldBe("getComputedStyle(b).backgroundColor", "transparent");
36 a.offsetTop; // Force recalc.
37 a.className = "a";
39 if (window.internals)
40 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
42 shouldBe("getComputedStyle(b).backgroundColor", "green");
43 </script>