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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/css-cascade-slot-distributed.html

Issue 2074393002: Clean up shadow-dom layout tests so that they are well organized (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 <script src="../resources/js-test.js"></script> 2 <script src="../resources/js-test.js"></script>
3 <div id="host"> 3 <div id="host">
4 <span class="red" id="span">There should be no red</span> 4 <span class="red" id="span">There should be no red</span>
5 </div> 5 </div>
6 <script> 6 <script>
7 description('Checking if styles in the nested shadow roots apply properly to dis tributed elements.'); 7 description('Checking if styles in the nested shadow roots apply properly to dis tributed elements.');
8 var root = document.querySelector('#host').attachShadow({'mode': 'open'}); 8 var root = document.querySelector('#host').attachShadow({'mode': 'open'});
9 root.innerHTML = '<div><slot></slot></div><style>::slotted(.red) { color: green; }</style>'; 9 root.innerHTML = '<div><slot></slot></div><style>::slotted(.red) { color: green; }</style>';
10 var root2 = root.firstChild.attachShadow({'mode': 'open'}); 10 var root2 = root.firstChild.attachShadow({'mode': 'open'});
11 root2.innerHTML = '<style>::slotted(.red) { background-color: green; color: red; }</style><slot></slot>'; 11 root2.innerHTML = '<style>::slotted(.red) { background-color: green; color: red; }</style><slot></slot>';
12 var span = document.querySelector('#span'); 12 var span = document.querySelector('#span');
13 shouldBeEqualToString('getComputedStyle(span).color', 'rgb(0, 128, 0)'); 13 shouldBeEqualToString('getComputedStyle(span).color', 'rgb(0, 128, 0)');
14 shouldBeEqualToString('getComputedStyle(span).backgroundColor', 'rgb(0, 128, 0)' ); 14 shouldBeEqualToString('getComputedStyle(span).backgroundColor', 'rgb(0, 128, 0)' );
15 </script> 15 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698