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

Side by Side Diff: LayoutTests/fast/dom/shadow/ancestor-pseudo-class.html

Issue 208933006: Only :host and :ancestor should ever match the host in a ShadowRoot (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a test for :first-child too 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/ancestor-pseudo-class-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="resources/shadow-dom.js"></script> 5 <script src="resources/shadow-dom.js"></script>
6 <style> 6 <style>
7 :ancestor { 7 :ancestor {
8 background-color: red; 8 background-color: red;
9 } 9 }
10 </style> 10 </style>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 debug(':ancestor with * should not match any shadow hosts.'); 46 debug(':ancestor with * should not match any shadow hosts.');
47 47
48 sandbox.appendChild( 48 sandbox.appendChild(
49 createDOM('div', {'id': 'host'}, 49 createDOM('div', {'id': 'host'},
50 createShadowRoot( 50 createShadowRoot(
51 createDOM('style', {}, 51 createDOM('style', {},
52 document.createTextNode('*:ancestor { background-color: green; } ')), 52 document.createTextNode('*:ancestor { background-color: green; } ')),
53 createDOM('div', {}, 53 createDOM('div', {},
54 document.createTextNode('Hello'))))); 54 document.createTextNode('Hello')))));
55 55
56 backgroundColorShouldBe('host', 'rgb(0, 128, 0)'); 56 backgroundColorShouldBe('host', 'rgba(0, 0, 0, 0)');
57 57
58 cleanUp(); 58 cleanUp();
59 59
60 debug(':ancestor with tag selector should not match any shadow hosts.'); 60 debug(':ancestor with tag selector should not match any shadow hosts.');
61 61
62 sandbox.appendChild( 62 sandbox.appendChild(
63 createDOM('div', {'id': 'host'}, 63 createDOM('div', {'id': 'host'},
64 createShadowRoot( 64 createShadowRoot(
65 createDOM('style', {}, 65 createDOM('style', {},
66 document.createTextNode('div:ancestor { background-color: green; }')), 66 document.createTextNode('div:ancestor { background-color: green; }')),
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 document.createTextNode(':ancestor(div) > div { background-color : red; }')), 327 document.createTextNode(':ancestor(div) > div { background-color : red; }')),
328 createDOM('div', {'id': 'target'}, 328 createDOM('div', {'id': 'target'},
329 document.createTextNode('Hello'))))); 329 document.createTextNode('Hello')))));
330 330
331 backgroundColorShouldBe('host/target', 'rgb(0, 128, 0)'); 331 backgroundColorShouldBe('host/target', 'rgb(0, 128, 0)');
332 332
333 cleanUp(); 333 cleanUp();
334 334
335 </script> 335 </script>
336 </body> 336 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/ancestor-pseudo-class-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698