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

Side by Side Diff: LayoutTests/fast/css/style-scoped/style-scoped-apply-author-styles.html

Issue 102953007: Selectors in styles in shadowRoots should match in all of the host's shadowRoots. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/css/style-scoped/style-scoped-apply-author-styles-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../dom/shadow/resources/shadow-dom.js"></script> 5 <script src="../../dom/shadow/resources/shadow-dom.js"></script>
6 <script> 6 <script>
7 shouldBeDefined("window.internals"); 7 shouldBeDefined("window.internals");
8 8
9 var borderColor; 9 var borderColor;
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 createDOM('style', {'scoped': 'scoped'}, 152 createDOM('style', {'scoped': 'scoped'},
153 document.createTextNode('div { border: 1px solid red; }')), 153 document.createTextNode('div { border: 1px solid red; }')),
154 createDOM('div', {}))); 154 createDOM('div', {})));
155 155
156 getNodeInTreeOfTrees('host/').applyAuthorStyles = false; 156 getNodeInTreeOfTrees('host/').applyAuthorStyles = false;
157 getNodeInTreeOfTrees('host//').applyAuthorStyles = false; 157 getNodeInTreeOfTrees('host//').applyAuthorStyles = false;
158 getNodeInTreeOfTrees('host///').applyAuthorStyles = false; 158 getNodeInTreeOfTrees('host///').applyAuthorStyles = false;
159 159
160 // before 160 // before
161 borderColorShouldBe(getNodeInTreeOfTrees('host/oldestShadow'), 'rgb(0, 0, 0) '); 161 borderColorShouldBe(getNodeInTreeOfTrees('host/oldestShadow'), 'rgb(0, 0, 25 5)');
162 borderColorShouldBe(getNodeInTreeOfTrees('host//olderShadow'), 'rgb(0, 0, 25 5)'); 162 borderColorShouldBe(getNodeInTreeOfTrees('host//olderShadow'), 'rgb(0, 0, 25 5)');
163 borderColorShouldBe(getNodeInTreeOfTrees('host///target'), 'rgb(0, 0, 0)'); 163 borderColorShouldBe(getNodeInTreeOfTrees('host///target'), 'rgb(0, 0, 255)') ;
164 164
165 // document ---+--- oldestShadow 165 // document ---+--- oldestShadow
166 // | 166 // |
167 // +--- olderShadow 167 // +--- olderShadow
168 // | 168 // |
169 // +--- shadow 169 // +--- shadow
170 170
171 // apply-author-styles affects between shadow and document. 171 // apply-author-styles affects between shadow and document.
172 getNodeInTreeOfTrees('host///').applyAuthorStyles = true; 172 getNodeInTreeOfTrees('host///').applyAuthorStyles = true;
173 borderColorShouldBe(getNodeInTreeOfTrees('host/oldestShadow'), 'rgb(0, 0, 0) '); 173 borderColorShouldBe(getNodeInTreeOfTrees('host/oldestShadow'), 'rgb(0, 0, 25 5)');
174 borderColorShouldBe(getNodeInTreeOfTrees('host//olderShadow'), 'rgb(0, 0, 25 5)'); 174 borderColorShouldBe(getNodeInTreeOfTrees('host//olderShadow'), 'rgb(0, 0, 25 5)');
175 borderColorShouldBe(getNodeInTreeOfTrees('host///target'), 'rgb(255, 0, 0)') ; 175 borderColorShouldBe(getNodeInTreeOfTrees('host///target'), 'rgb(0, 0, 255)') ;
176 176
177 // apply-author-styles affects between older shadow and document. 177 // apply-author-styles affects between older shadow and document.
178 getNodeInTreeOfTrees('host///').applyAuthorStyles = false; 178 getNodeInTreeOfTrees('host///').applyAuthorStyles = false;
179 getNodeInTreeOfTrees('host//').applyAuthorStyles = true; 179 getNodeInTreeOfTrees('host//').applyAuthorStyles = true;
180 borderColorShouldBe(getNodeInTreeOfTrees('host/oldestShadow'), 'rgb(0, 0, 0) '); 180 borderColorShouldBe(getNodeInTreeOfTrees('host/oldestShadow'), 'rgb(0, 0, 25 5)');
181 borderColorShouldBe(getNodeInTreeOfTrees('host//olderShadow'), 'rgb(0, 0, 25 5)'); 181 borderColorShouldBe(getNodeInTreeOfTrees('host//olderShadow'), 'rgb(0, 0, 25 5)');
182 borderColorShouldBe(getNodeInTreeOfTrees('host///target'), 'rgb(0, 0, 0)'); 182 borderColorShouldBe(getNodeInTreeOfTrees('host///target'), 'rgb(0, 0, 255)') ;
183 183
184 // apply-author-styles affects between oldest shadow and document. 184 // apply-author-styles affects between oldest shadow and document.
185 getNodeInTreeOfTrees('host//').applyAuthorStyles = false; 185 getNodeInTreeOfTrees('host//').applyAuthorStyles = false;
186 getNodeInTreeOfTrees('host/').applyAuthorStyles = true; 186 getNodeInTreeOfTrees('host/').applyAuthorStyles = true;
187 borderColorShouldBe(getNodeInTreeOfTrees('host/oldestShadow'), 'rgb(255, 0, 0)'); 187 borderColorShouldBe(getNodeInTreeOfTrees('host/oldestShadow'), 'rgb(0, 0, 25 5)');
188 borderColorShouldBe(getNodeInTreeOfTrees('host//olderShadow'), 'rgb(0, 0, 25 5)'); 188 borderColorShouldBe(getNodeInTreeOfTrees('host//olderShadow'), 'rgb(0, 0, 25 5)');
189 borderColorShouldBe(getNodeInTreeOfTrees('host///target'), 'rgb(0, 0, 0)'); 189 borderColorShouldBe(getNodeInTreeOfTrees('host///target'), 'rgb(0, 0, 255)') ;
190 190
191 cleanUp(); 191 cleanUp();
192 } 192 }
193 193
194 function testOrderOfApplyStyle() 194 function testOrderOfApplyStyle()
195 { 195 {
196 debug('test a style is applied in document order.'); 196 debug('test a style is applied in document order.');
197 197
198 document.getElementById('sandbox').appendChild( 198 document.getElementById('sandbox').appendChild(
199 createDOM('div', {}, 199 createDOM('div', {},
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 testNestedShadow(); 234 testNestedShadow();
235 testMultipleShadow(); 235 testMultipleShadow();
236 testOrderOfApplyStyle(); 236 testOrderOfApplyStyle();
237 } 237 }
238 </script> 238 </script>
239 </head> 239 </head>
240 <body onload="runTests()"> 240 <body onload="runTests()">
241 <div id='sandbox'></div> 241 <div id='sandbox'></div>
242 </body> 242 </body>
243 </html> 243 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/style-scoped/style-scoped-apply-author-styles-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698