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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/dynamically-added-deep-combinator-and-shadow-pseudo-element.html

Issue 2843883002: Remove, or rewrite if necessary, tests which use /deep/ or ::shadow (Closed)
Patch Set: rev Created 3 years, 7 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 <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'>
9 <div id='target5' class='bar'>Should have blue background.</div>
10 </div>
11 <pre id='console'></pre>
12 </body>
13 <script>
14 var sandbox = document.getElementById('sandbox');
15 sandbox.appendChild(
16 createDOM('div', {'id': 'host'},
17 createShadowRoot(
18 createDOM('div', {'id': 'target1', 'class': 'foo'},
19 document.createTextNode('Should have green background')),
20 createDOM('div', {'id': 'target2'},
21 document.createTextNode('Should have green background')),
22 createDOM('div', {'id': 'target3', 'class': 'bar'},
23 document.createTextNode('Should have blue background')),
24 createDOM('div', {'id': 'target4'},
25 document.createTextNode('Should have blue background')))));
26 document.body.offsetLeft;
27
28 var style = document.createElement('style');
29 style.innerHTML = 'div::shadow .foo { background: green; }'
30 + 'div::shadow #target2 { background: green; }'
31 + 'div /deep/ .bar { background: blue; }'
32 + 'div /deep/ #target4 { background: blue; }';
33 document.body.appendChild(style);
34
35 backgroundColorShouldBe('host/target1', 'rgb(0, 128, 0)');
36 backgroundColorShouldBe('host/target2', 'rgb(0, 128, 0)');
37 backgroundColorShouldBe('host/target3', 'rgb(0, 0, 255)');
38 backgroundColorShouldBe('host/target4', 'rgb(0, 0, 255)');
39 backgroundColorShouldBe('target5', 'rgb(0, 0, 255)');
40 </script>
41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698