Chromium Code Reviews| 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 |
| index f67bd66521f8e45374e8e851a8bf20ffe0b28f0f..e9baa4acf9607cb43cc1645176041962eca83523 100644 |
| --- a/third_party/WebKit/LayoutTests/shadow-dom/query-selector.html |
| +++ b/third_party/WebKit/LayoutTests/shadow-dom/query-selector.html |
| @@ -2,12 +2,13 @@ |
| <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="x"><span>test1</span></div> |
| +<div id="x"><span>test2</span></div> |
|
rune
2016/11/18 09:16:02
You didn't introduce this, but using the same id m
kochi
2016/11/18 09:30:38
Looks weird to me as well, but the test comment
('
|
| <div id="host"> |
| <template data-mode="open"> |
| <div id="y"><span></span></div> |
| <div id="y"><span></span></div> |
| + <div><span id="x" class="y">Can you find this?</span></div> |
| </template> |
| </div> |
| <script> |
| @@ -21,4 +22,17 @@ 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'); |
| + |
| +test(() => { |
| + var spans = document.querySelectorAll('body >>> #x'); |
| + assert_equals(spans.length, 3); |
| + assert_equals(spans[0].textContent, 'test1'); |
| + assert_equals(spans[1].textContent, 'test2'); |
| + assert_equals(spans[2].textContent, 'Can you find this?'); |
| +}, 'deep combinator >>> should work for querySelectorAll.'); |
| + |
| +test(() => { |
| + var span = document.querySelector('body >>> .y'); |
| + assert_equals(span.textContent, 'Can you find this?'); |
| +}, 'deep combinator >>> should work for querySelector'); |
| </script> |