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

Side by Side Diff: LayoutTests/fast/dom/shadow/content-pseudo-element-with-deep-combinator-and-host-pseudo-class.html

Issue 450533007: Remove children of <shadow> element added by JS (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="resources/shadow-dom.js"></script> 4 <script src="resources/shadow-dom.js"></script>
5 <script src="../../../resources/js-test.js"></script> 5 <script src="../../../resources/js-test.js"></script>
6 </head> 6 </head>
7 <body class="bodyClass"> 7 <body class="bodyClass">
8 <div id="sandbox"></div> 8 <div id="sandbox"></div>
9 <pre id="console"></pre> 9 <pre id="console"></pre>
10 </body> 10 </body>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 document.createTextNode( 63 document.createTextNode(
64 ':host /deep/ #content2::content > #parentOfShadow1 > #shado w1::content > .content { color: green; }' + 64 ':host /deep/ #content2::content > #parentOfShadow1 > #shado w1::content > .content { color: green; }' +
65 ':host /deep/ #content2::content > #shadow1::content > #cont ent1::content > .content { color: red; }')), 65 ':host /deep/ #content2::content > #shadow1::content > #cont ent1::content > .content { color: red; }')),
66 createDOM('content', {'id': 'content1'})), 66 createDOM('content', {'id': 'content1'})),
67 createShadowRoot( 67 createShadowRoot(
68 createDOM('div', {}, 68 createDOM('div', {},
69 createDOM('div', {'id': 'host2'}, 69 createDOM('div', {'id': 'host2'},
70 createShadowRoot( 70 createShadowRoot(
71 createDOM('content', {'id': 'content2'})), 71 createDOM('content', {'id': 'content2'})),
72 createDOM('div', {'id': 'parentOfShadow1'}, 72 createDOM('div', {'id': 'parentOfShadow1'},
73 createDOM('shadow', {'id': 'shadow1'}, 73 createDOM('shadow', {'id': 'shadow1'}))))),
74 createDOM('content', {})))))),
75 createDOM('div', {'class': 'content'}, 74 createDOM('div', {'class': 'content'},
76 document.createTextNode('content')))); 75 document.createTextNode('content'))));
77 76
78 shouldBe('window.getComputedStyle(document.querySelector("#host1 > .content")).c olor', '"rgb(0, 128, 0)"'); 77 shouldBe('window.getComputedStyle(document.querySelector("#host1 > .content")).c olor', '"rgb(0, 128, 0)"');
79 78
80 cleanUp(); 79 cleanUp();
81 80
82 sandbox.appendChild( 81 sandbox.appendChild(
83 createDOM('div', {'id': 'host1'}, 82 createDOM('div', {'id': 'host1'},
84 createShadowRoot( 83 createShadowRoot(
85 createDOM('style', {}, 84 createDOM('style', {},
86 document.createTextNode( 85 document.createTextNode(
87 ':host /deep/ :host > #content2::content > #shadow1::content > #content1::content > .content { color: red; }')), 86 ':host /deep/ :host > #content2::content > #shadow1::content > #content1::content > .content { color: red; }')),
88 createDOM('content', {'id': 'content1'})), 87 createDOM('content', {'id': 'content1'})),
89 createShadowRoot( 88 createShadowRoot(
90 createDOM('div', {}, 89 createDOM('div', {},
91 createDOM('div', {'id': 'host2'}, 90 createDOM('div', {'id': 'host2'},
92 createShadowRoot( 91 createShadowRoot(
93 createDOM('content', {'id': 'content2'})), 92 createDOM('content', {'id': 'content2'})),
94 createDOM('div', {'id': 'parentOfShadow1'}, 93 createDOM('div', {'id': 'parentOfShadow1'},
95 createDOM('shadow', {'id': 'shadow1'}, 94 createDOM('shadow', {'id': 'shadow1'}))))),
96 createDOM('content', {})))))),
97 createDOM('div', {'class': 'content'}, 95 createDOM('div', {'class': 'content'},
98 document.createTextNode('content')))); 96 document.createTextNode('content'))));
99 97
100 shouldNotBe('window.getComputedStyle(document.querySelector("#host1 > .content") ).color', '"rgb(255, 0, 0)"'); 98 shouldNotBe('window.getComputedStyle(document.querySelector("#host1 > .content") ).color', '"rgb(255, 0, 0)"');
101 99
102 cleanUp(); 100 cleanUp();
103 101
104 sandbox.appendChild( 102 sandbox.appendChild(
105 createDOM('div', {'id': 'host1'}, 103 createDOM('div', {'id': 'host1'},
106 createShadowRoot( 104 createShadowRoot(
107 createDOM('style', {}, 105 createDOM('style', {},
108 document.createTextNode( 106 document.createTextNode(
109 ':host /deep/ #content2::content > #parentOfContent1 > #cont ent1::content > .content { color: green; }')), 107 ':host /deep/ #content2::content > #parentOfContent1 > #cont ent1::content > .content { color: green; }')),
110 createDOM('div', {}, 108 createDOM('div', {},
111 createDOM('div', {'id': 'host2'}, 109 createDOM('div', {'id': 'host2'},
112 createShadowRoot( 110 createShadowRoot(
113 createDOM('content', {'id': 'content2'})), 111 createDOM('content', {'id': 'content2'})),
114 createDOM('div', {'id': 'parentOfContent1'}, 112 createDOM('div', {'id': 'parentOfContent1'},
115 createDOM('content', {'id': 'content1'}))))), 113 createDOM('content', {'id': 'content1'}))))),
116 createDOM('div', {'class': 'content'}, 114 createDOM('div', {'class': 'content'},
117 document.createTextNode('content')))); 115 document.createTextNode('content'))));
118 116
119 shouldBe('window.getComputedStyle(document.querySelector("#host1 > .content")).c olor', '"rgb(0, 128, 0)"'); 117 shouldBe('window.getComputedStyle(document.querySelector("#host1 > .content")).c olor', '"rgb(0, 128, 0)"');
120 118
121 cleanUp(); 119 cleanUp();
122 120
123 </script> 121 </script>
124 </html> 122 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698