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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/link-in-shadow-tree.html

Issue 2177163002: Allow <link rel=stylesheet> in a connected shadow tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split tests Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/shadow/link-in-shadow-tree-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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 </head>
5 <body>
6 <div id="container"><span id="in-host-children" class="kotori" href="/">tehepero </span></div>
7 <div><span id="outside-of-shadow" class="kotori" href="/">tehepero</span></div>
8
9 <script src="../../../resources/js-test.js"></script>
10 <script>
11 function computedBackgroundColor(elem) {
12 var style = document.defaultView.getComputedStyle(elem, '');
13 return style.backgroundColor;
14 }
15
16 var container = document.getElementById('container');
17
18 var shadowRoot = container.createShadowRoot();
19
20 var link = document.createElement('link');
21 link.setAttribute('rel', 'stylesheet');
22 link.setAttribute('href', 'resources/link-in-shadow-style.css');
23
24 var spanInShadow = document.createElement('span');
25 spanInShadow.innerHTML = 'tehepero';
26 spanInShadow.className = 'kotori';
27
28 shadowRoot.appendChild(link);
29 shadowRoot.appendChild(spanInShadow);
30 shadowRoot.appendChild(document.createElement('content'));
31
32 var spanInHostChildren = document.getElementById('in-host-children');
33 var spanOutsideOfShadow = document.getElementById('outside-of-shadow');
34
35 shouldBe('computedBackgroundColor(spanInShadow)', '"rgba(0, 0, 0, 0)"');
36 shouldBe('computedBackgroundColor(spanInHostChildren)', '"rgba(0, 0, 0, 0)"');
37 shouldBe('computedBackgroundColor(spanOutsideOfShadow)', '"rgba(0, 0, 0, 0)"');
38
39 var successfullyParsed = true;
40 </script>
41 </body>
42 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/shadow/link-in-shadow-tree-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698