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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/query-selector.html

Issue 1892743002: Fix querySelectorAll for multiple Ids in a shadow tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: done Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/shadow-dom/query-selector.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/query-selector.html b/third_party/WebKit/LayoutTests/shadow-dom/query-selector.html
new file mode 100644
index 0000000000000000000000000000000000000000..f67bd66521f8e45374e8e851a8bf20ffe0b28f0f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/shadow-dom/query-selector.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="resources/shadow-dom.js"></script>
+<div id="x"><span></span></div>
+<div id="x"><span></span></div>
+<div id="host">
+ <template data-mode="open">
+ <div id="y"><span></span></div>
+ <div id="y"><span></span></div>
+ </template>
+</div>
+<script>
+convertTemplatesToShadowRootsWithin(host);
+test(() => {
+ assert_equals(document.querySelectorAll('#x').length, 2);
+ assert_equals(document.querySelectorAll('#x span').length, 2);
+}, 'querySelectorAll for multiple #Ids in a document tree');
+
+test(() => {
+ assert_equals(host.shadowRoot.querySelectorAll('#y').length, 2);
+ assert_equals(host.shadowRoot.querySelectorAll('#y span').length, 2);
+}, 'querySelectorAll for multiple #Ids in a shadow tree');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698