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

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

Issue 2239353002: Ignored title in shadow should cause StyleSheet.title = null. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/alternate-stylesheets-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 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <div id="host"></div> 3 <div id="host"></div>
4 <script> 4 <script>
5 var root = host.createShadowRoot(); 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>'; 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> 7 </script>
8 <style>#alternate { color: green }</style> 8 <style>#alternate { color: green }</style>
9 <link rel="alternate stylesheet" title="not-preferred" href="data:text/css,#alte rnate { color: red }"> 9 <link rel="alternate stylesheet" title="not-preferred" href="data:text/css,#alte rnate { color: red }">
10 </style> 10 </style>
11 <div id="alternate">Should be green</div> 11 <div id="alternate">Should be green</div>
12 <script> 12 <script>
13 description("Title attribute should be ignored for style elements in shadow trees."); 13 description("Title attribute should be ignored for style elements in shadow trees.");
14 14
15 shouldBeEqualToString("getComputedStyle(root.querySelector('div')).color", " rgb(0, 128, 0)"); 15 shouldBeEqualToString("getComputedStyle(root.querySelector('div')).color", " rgb(0, 128, 0)");
16 shouldBeEqualToString("getComputedStyle(alternate).color", "rgb(0, 128, 0)") ; 16 shouldBeEqualToString("getComputedStyle(alternate).color", "rgb(0, 128, 0)") ;
17 shouldBeNull("host.shadowRoot.styleSheets[0].title");
17 </script> 18 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/shadow/alternate-stylesheets-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698