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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/selectors/querySelector-pseudo-slotted.html

Issue 1523843004: Add support for new CSS ::slotted() pseudo element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase / fix comments for tests (FYI) Created 4 years, 11 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../dom/shadow/resources/shadow-dom.js"></script>
6 <body>
7 <div id="host1">
8 <template data-mode="open">
9 <slot name="slot1"></slot>
10 </template>
11 <span slot="slot1" id="span1"></span>
12 <span slot="slot1" id="span2"></span>
13 </div>
14 <script>
15 convertTemplatesToShadowRootsWithin(host1);
16 document.body.offsetLeft;
17
18 test(() => {
19 assert_equals(document.querySelector('::slotted(span)'), null);
20 assert_equals(host1.shadowRoot.querySelector('::slotted(span)'), null);
21 }, "querySelector for ::slotted pseudo element");
22
23 test(() => {
24 assert_equals(document.querySelectorAll('::slotted(span)').length, 0);
25 assert_equals(host1.shadowRoot.querySelectorAll('::slotted(span)').length, 0);
26 }, "querySelectorAll for ::slotted pseudo element");
27 </script>
28 </body>
29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698