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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/alternate-stylesheets.html

Issue 1717303002: Ignore title attribute for style elements in shadow trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <div id="host"></div>
4 <script>
5 var root = host.createShadowRoot();
6 root.innerHTML = '<style title="not-preferred">div { color: red }</style><st yle title="ignored">div { color: green }</style><div>Should be green</div>';
7 </script>
8 <style>#alternate { color: green }</style>
9 <link rel="alternate stylesheet" title="not-preferred" href="data:text/css,#alte rnate { color: red }">
10 </style>
11 <div id="alternate">Should be green</div>
12 <script>
13 description("Title attribute should be ignored for style elements in shadow trees.");
14
15 shouldBeEqualToString("getComputedStyle(root.querySelector('div')).color", " rgb(0, 128, 0)");
16 shouldBeEqualToString("getComputedStyle(alternate).color", "rgb(0, 128, 0)") ;
17 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698