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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/shadow-piercing-descendant-combinator-in-static-profile.html

Issue 2532813002: Matching part for >>> (shadow-piercing descendant combinator). (Closed)
Patch Set: Created 4 years 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 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script src="resources/shadow-dom.js"></script>
5 <style>
6 body >>> #x { color: red; }
7 </style>
8 <div id="host">
9 <template data-mode="open">
10 <div><span id="x">In the shadow tree.</span></div>
11 </template>
12 </div>
13 <script>
14 convertTemplatesToShadowRootsWithin(host);
15 test(() => {
16 var span = document.querySelector('body >>> #x');
17 assert_equals(span.textContent, 'In the shadow tree.',
18 '>>> should work in static profile.');
19
20 var stylesheet = document.styleSheets[0];
21 assert_equals(stylesheet.cssRules.length, 0,
22 'A selector containing >>> should be discarded in dynamic profile.');
23 assert_equals(window.getComputedStyle(span).color, 'rgb(0, 0, 0)',
24 '>>> in dynamic profile should not match.');
25 }, 'deep descendant combinator >>> should work only in static profile.');
26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698