OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Distributed under both the W3C Test Suite License [1] and the W3C | 3 Distributed under both the W3C Test Suite License [1] and the W3C |
4 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the | 4 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the |
5 policies and contribution forms [3]. | 5 policies and contribution forms [3]. |
6 | 6 |
7 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license | 7 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license |
8 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license | 8 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license |
9 [3] http://www.w3.org/2004/10/27-testcases | 9 [3] http://www.w3.org/2004/10/27-testcases |
10 --> | 10 --> |
11 <html> | 11 <html> |
12 <head> | 12 <head> |
13 <title>Shadow DOM Test - Tests CSS rules must not apply in a shadow root</title> | 13 <title>Shadow DOM Test - Tests CSS rules must not apply in a shadow root</title> |
14 <link rel="match" href="not-apply-in-shadow-root-001-ref.html"> | 14 <link rel="match" href="not-apply-in-shadow-root-001-ref.html"> |
15 <link rel="author" title="Kazuhito Hokamura" href="mailto:k.hokamura@gmail.com"> | 15 <link rel="author" title="Kazuhito Hokamura" href="mailto:k.hokamura@gmail.com"> |
16 <link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#styles"
> | 16 <link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#styles"
> |
17 <meta name="assert" content="Styles: CSS rules declared in an enclosing tree mus
t not apply in a shadow tree if apply-author-styles flag is not set."> | 17 <meta name="assert" content="Styles: CSS rules declared in an enclosing tree mus
t not apply in a shadow tree if apply-author-styles flag is not set."> |
18 <script src="../../../html/resources/common.js"></script> | 18 <script src="../../../html/resources/common.js"></script> |
19 <style> | 19 <style> |
20 div { | 20 div { |
21 width: 100px; | 21 width: 100px; |
22 height: 100px; | 22 height: 100px; |
23 background: green; | 23 background: green; |
24 } | 24 } |
25 </style> | 25 </style> |
26 </head> | 26 </head> |
27 <body> | 27 <body> |
28 <p>Test passes if following box is green.</p> | 28 <p>Test passes if following box is green.</p> |
29 <div id="shadow-host"></div> | 29 <div id="shadow-host"></div> |
30 <script> | 30 <script> |
31 var shadowHost = document.getElementById('shadow-host'); | 31 var shadowHost = document.getElementById('shadow-host'); |
32 var shadowRoot = shadowHost.attachShadow({mode: 'open'}); | 32 var shadowRoot = shadowHost.attachShadow({mode: 'open'}); |
33 var style = document.createElement('style'); | 33 var style = document.createElement('style'); |
34 style.innerHTML = 'div { background: red }'; | 34 style.innerHTML = 'div { background: red }'; |
35 | 35 |
36 shadowRoot.appendChild(style); | 36 shadowRoot.appendChild(style); |
37 </script> | 37 </script> |
38 </body> | 38 </body> |
39 </html> | 39 </html> |
OLD | NEW |