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

Side by Side Diff: LayoutTests/fast/dom/shadow/querySelector-with-shadow-all-and-shadow-deep.html

Issue 1329523002: Revert of document.querySelector[All]() should check selector context (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/querySelector-with-shadow-all-and-shadow-deep-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="resources/shadow-dom.js"></script> 2 <script src="resources/shadow-dom.js"></script>
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 <body></body> 4 <body></body>
5 <script> 5 <script>
6 document.body.appendChild( 6 document.body.appendChild(
7 createDOM('div', {'id': 'foo-host'}, 7 createDOM('div', {'id': 'foo-host'},
8 createShadowRoot( 8 createShadowRoot(
9 createDOM('div', {}, 9 createDOM('div', {},
10 createDOM('span', {'id': 'not-top'})), 10 createDOM('span', {'id': 'not-top'})),
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 shouldBe('barShadowRoot.querySelectorAll(":host-context(div#foo-host)::shadow sp an")[0].id', '"nested"'); 75 shouldBe('barShadowRoot.querySelectorAll(":host-context(div#foo-host)::shadow sp an")[0].id', '"nested"');
76 shouldBe('barShadowRoot.querySelectorAll(":host-context(div#foo-host) /deep/ spa n").length', '1'); 76 shouldBe('barShadowRoot.querySelectorAll(":host-context(div#foo-host) /deep/ spa n").length', '1');
77 shouldBe('barShadowRoot.querySelectorAll(":host-context(div#foo-host) /deep/ spa n")[0].id', '"nested"'); 77 shouldBe('barShadowRoot.querySelectorAll(":host-context(div#foo-host) /deep/ spa n")[0].id', '"nested"');
78 78
79 // crbug.com/390301 79 // crbug.com/390301
80 var fooHost = document.getElementById("foo-host"); 80 var fooHost = document.getElementById("foo-host");
81 shouldBe('fooHost.querySelectorAll("::shadow span").length', '3'); 81 shouldBe('fooHost.querySelectorAll("::shadow span").length', '3');
82 shouldBe('fooHost.querySelectorAll("::shadow span")[0].id', '"not-top"'); 82 shouldBe('fooHost.querySelectorAll("::shadow span")[0].id', '"not-top"');
83 shouldBe('fooHost.querySelectorAll("::shadow span")[1].id', '"top"'); 83 shouldBe('fooHost.querySelectorAll("::shadow span")[1].id', '"top"');
84 shouldBe('fooHost.querySelectorAll("::shadow span")[2].id', '"inner-host"'); 84 shouldBe('fooHost.querySelectorAll("::shadow span")[2].id', '"inner-host"');
85
86 // crbug.com/511486
87 shouldBe('document.querySelectorAll("::shadow span").length', '3');
88 shouldBe('document.querySelectorAll("::shadow span")[0].id', '"not-top"');
89 shouldBe('document.querySelectorAll("::shadow span")[1].id', '"top"');
90 shouldBe('document.querySelectorAll("::shadow span")[2].id', '"inner-host"');
91 </script> 85 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/querySelector-with-shadow-all-and-shadow-deep-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698