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

Unified Diff: LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-rootNode.html

Issue 26218002: ClassRootNodeList should start from rootNode, not the first child of rootNode. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-rootNode-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-rootNode.html
diff --git a/LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-rootNode.html b/LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-rootNode.html
new file mode 100644
index 0000000000000000000000000000000000000000..7ff558ad1a25ed69c17b462e5b370e7b92e55c53
--- /dev/null
+++ b/LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-rootNode.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<html>
+<head>
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body id="target" class="target">
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <pre id='console'></pre>
+</body>
+<script>
+description('Test for crbug.com/304069: querySelectorAll regression.');
+shouldBe("document.body.querySelectorAll('#target > div').length", "6");
+shouldBe("document.body.querySelectorAll('#target').length", "0");
+shouldBe("document.body.querySelectorAll('.target > div').length", "6");
+shouldBe("document.body.querySelectorAll('.target').length", "0");
+shouldBe("document.body.querySelectorAll('body > div').length", "6");
+shouldBe("document.body.querySelectorAll('body').length", "0");
+shouldBeNull("document.body.querySelector('#target')");
+shouldBeNull("document.body.querySelector('.target')");
+shouldBeNull("document.body.querySelector('body')");
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/selectors/querySelector-leftmost-selector-matches-rootNode-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698