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

Side by Side Diff: LayoutTests/fast/dom/shadow/content-combinator-scoped.html

Issue 205563004: Revert of Implement /content/ combinator. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed patch conflict Created 6 years, 9 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="resources/shadow-dom.js"></script>
5 <script src="../../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <div id="sandbox"></div>
9 <pre id="console"></pre>
10 <script>
11
12 function colorOf(node)
13 {
14 return document.defaultView.getComputedStyle(node, null).getPropertyValue('c olor');
15 }
16
17 function cleanUp()
18 {
19 document.getElementById('sandbox').innerHTML = '';
20 }
21
22 var sandbox = document.getElementById('sandbox');
23 sandbox.appendChild(
24 createDOM('div', {'id': 'host'},
25 createShadowRoot(
26 createDOM('content', {'select': '#host-child1'}),
27 createDOM('div', {},
28 createDOM('content', {'select': '#host-child2'}),
29 createDOM('style', {'scoped': 'scoped'},
30 document.createTextNode('content /content/ div { color: gree n; }')))),
31 createDOM('div', {'id': 'host-child1'},
32 document.createTextNode('normal')),
33 createDOM('div', {'id': 'host-child2'},
34 document.createTextNode('green'))));
35
36 shouldNotBe('colorOf(document.querySelector("#host > div#host-child1"))', '"rgb( 0, 128, 0)"');
37 shouldBe('colorOf(document.querySelector("#host > div#host-child2"))', '"rgb(0, 128, 0)"');
38
39 cleanUp();
40 </script>
41 </body>
42 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698