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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/link-title.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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="resources/shadow-dom.js"></script> 4 <script src="resources/shadow-dom.js"></script>
5 <body> 5 <body>
6 <div id="host"> 6 <div id="host">
7 <template mode-data="open"> 7 <template mode-data="open">
8 <link rel="stylesheet" title="preferred1" href="data:text/css,#shadowChild 1 { color: green }"> 8 <link rel="stylesheet" title="preferred1" href="data:text/css,#shadowChild 1 { color: green }">
9 <link rel="stylesheet" title="title1" href="data:text/css,#shadowChild2 { color: green }"> 9 <link rel="stylesheet" title="title1" href="data:text/css,#shadowChild2 { color: green }">
10 <link rel="alternate stylesheet" title="prefered1" href="data:text/css,#sh adowChild3 { color: green }"> 10 <link rel="alternate stylesheet" title="prefered1" href="data:text/css,#sh adowChild3 { color: green }">
(...skipping 23 matching lines...) Expand all
34 test(() => { 34 test(() => {
35 assert_equals(colorFor(host.shadowRoot.querySelector('#shadowChild1')), 'rgb(0 , 128, 0)'); 35 assert_equals(colorFor(host.shadowRoot.querySelector('#shadowChild1')), 'rgb(0 , 128, 0)');
36 assert_equals(colorFor(host.shadowRoot.querySelector('#shadowChild2')), 'rgb(0 , 128, 0)'); 36 assert_equals(colorFor(host.shadowRoot.querySelector('#shadowChild2')), 'rgb(0 , 128, 0)');
37 }, '<link rel="stylesheet" title="xxx"> shoule behave as <link rel="stylesheet"> (always enabled because title is ignored) in a connected shadow tree.'); 37 }, '<link rel="stylesheet" title="xxx"> shoule behave as <link rel="stylesheet"> (always enabled because title is ignored) in a connected shadow tree.');
38 38
39 test(() => { 39 test(() => {
40 assert_equals(colorFor(host.shadowRoot.querySelector('#shadowChild3')), 'rgb(0 , 0, 0)'); 40 assert_equals(colorFor(host.shadowRoot.querySelector('#shadowChild3')), 'rgb(0 , 0, 0)');
41 assert_equals(colorFor(host.shadowRoot.querySelector('#shadowChild4')), 'rgb(0 , 0, 0)'); 41 assert_equals(colorFor(host.shadowRoot.querySelector('#shadowChild4')), 'rgb(0 , 0, 0)');
42 }, '<link rel="alternate stylesheet" title="xxx"> shoule behave as <link rel="al ternate stylesheet"> (never enabled because title is ignored) in a connected sha dow tree.'); 42 }, '<link rel="alternate stylesheet" title="xxx"> shoule behave as <link rel="al ternate stylesheet"> (never enabled because title is ignored) in a connected sha dow tree.');
43 43
44 test(() => {
45 assert_equals(host.shadowRoot.styleSheets.length, 4);
46 assert_equals(host.shadowRoot.styleSheets[0].title, null);
47 assert_equals(host.shadowRoot.styleSheets[1].title, null);
48 assert_equals(host.shadowRoot.styleSheets[2].title, null);
49 assert_equals(host.shadowRoot.styleSheets[3].title, null);
50 }, 'StyleSheet.title should always be null in shadow trees.');
44 </script> 51 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698