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

Side by Side Diff: LayoutTests/fast/dom/SelectorAPI/loose-subtree-nth.html

Issue 1023393002: Cache element indices for :nth-child and :nth-last-child selectors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missing initializer and incorrect assert. Created 5 years, 8 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script>
4 description("Element.querySelector matching nth-child of loose subtree.");
5
6 var root = document.createElement("div");
7 for (var i = 0; i < 12; i++) {
8 var child = document.createElement("span");
9 if (i == 11)
10 child.id = "pass";
11 root.appendChild(child);
12 }
13
14 shouldBe('root.querySelector(":nth-child(12)").id', '"pass"');
15 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698