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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/slotted-pseudo-element-shared-style.html

Issue 1774113002: Move Shadow DOM V1 tests from fast/dom/shadow to shadow-dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="resources/shadow-dom.js"></script> 2 <script src="../fast/dom/shadow/resources/shadow-dom.js"></script>
3 <div id="sandbox"></div> 3 <div id="sandbox"></div>
4 <script> 4 <script>
5 var shadowStyle = document.createElement('style'); 5 var shadowStyle = document.createElement('style');
6 shadowStyle.innerHTML = 'slot::slotted([data-color=red]) { color: red; }'; 6 shadowStyle.innerHTML = 'slot::slotted([data-color=red]) { color: red; }';
7 7
8 var sandbox = document.getElementById('sandbox'); 8 var sandbox = document.getElementById('sandbox');
9 sandbox.appendChild( 9 sandbox.appendChild(
10 createDOM('div', {}, 10 createDOM('div', {},
11 attachShadow( 11 attachShadow(
12 {'mode': 'open'}, 12 {'mode': 'open'},
13 shadowStyle, 13 shadowStyle,
14 createDOM('slot')), 14 createDOM('slot')),
15 createDOM('div', {}, 15 createDOM('div', {},
16 document.createTextNode('normal')), 16 document.createTextNode('normal')),
17 // If the style is falsely shared with the <div> above, this won't turn red. 17 // If the style is falsely shared with the <div> above, this won't turn red.
18 createDOM('div', {'data-color': 'red'}, 18 createDOM('div', {'data-color': 'red'},
19 document.createTextNode('red')))); 19 document.createTextNode('red'))));
20 </script> 20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698