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..28178cf4cfb58f4fefc2518b814df0adbc831673 |
--- /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"); |
kochi
2016/04/15 05:31:25
style nit: consistent usage of single and double q
hayato
2016/04/15 05:34:06
Done. Made it consistent.
|
+</script> |