Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(575)

Unified Diff: LayoutTests/fast/css/invalidation/spatial-navigation-focus-pseudo.html

Issue 705693005: No need for subtree recalc for :-internal-spatial-navigation-focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@tmp-base
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/spatial-navigation-focus-pseudo-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/invalidation/spatial-navigation-focus-pseudo.html
diff --git a/LayoutTests/fast/css/invalidation/spatial-navigation-focus-pseudo.html b/LayoutTests/fast/css/invalidation/spatial-navigation-focus-pseudo.html
new file mode 100644
index 0000000000000000000000000000000000000000..d166a880c05bf636fa5363fb100e79497c7c1a04
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/spatial-navigation-focus-pseudo.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+.a .b:not(:-internal-spatial-navigation-focus) { background-color: green }
+</style>
+<div id="a">
+ <select id="sel" multiple>
+ <option id="b" class="b">1</option>
+ <option>2</option>
+ </select>
+ <div></div>
+ <div></div>
+</div>
+<div>
+ <div></div>
+ <div></div>
+</div>
+<script>
+description("Use descendant invalidation set in the presence of an :-internal-spatial-navigation-focus pseudo class.");
+
+debug("This test relies on the bug (crbug.com/432436) that internal pseudo classes are being\n\
+exposed to the extent that they are not dropped, but in the case of :-internal-spatial-navigation-focus,\n\
+never matched. If the mentioned bug is fixed this test will start failing. When that happens,\n\
+we need to either add the possibility to use internal css features in author style for tests,\n\
+support injecting UA style for tests, or drop this test.\n");
+
+var transparent = "rgba(0, 0, 0, 0)";
+var green = "rgb(0, 128, 0)";
+
+if (window.internals)
+ internals.settings.setSpatialNavigationEnabled(true);
+sel.focus();
+
+shouldBe("getComputedStyle(b).backgroundColor", "transparent");
+
+a.offsetTop; // Force recalc.
+a.className = "a";
+
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
+
+shouldBe("getComputedStyle(b).backgroundColor", "green");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/spatial-navigation-focus-pseudo-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698