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: Basic shadow root</title> | 13 <title>Shadow DOM Test: Basic shadow root</title> |
14 <link rel="match" href="shadow-root-001-ref.html"> | 14 <link rel="match" href="shadow-root-001-ref.html"> |
15 <link rel="author" title="Hayato Ito" href="mailto:hayato@google.com"> | 15 <link rel="author" title="Hayato Ito" href="mailto:hayato@google.com"> |
16 <link rel="author" title="Yuta Kitamura" href="mailto:yutak@google.com"> | 16 <link rel="author" title="Yuta Kitamura" href="mailto:yutak@google.com"> |
17 <link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#shadow-
trees"> | 17 <link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#shadow-
trees"> |
18 <meta name="assert" content="When a shadow root is attached, the shadow tree is
rendered."> | 18 <meta name="assert" content="When a shadow root is attached, the shadow tree is
rendered."> |
19 <script src="../../../html/resources/common.js"></script> | 19 <script src="../../../html/resources/common.js"></script> |
20 <style> | 20 <style> |
21 p { color: black; } | 21 p { color: black; } |
22 * { color: red; } | 22 * { color: red; } |
23 </style> | 23 </style> |
24 </head> | 24 </head> |
25 <body> | 25 <body> |
26 <p>You should see green text saying "PASS" below.</p> | 26 <p>You should see green text saying "PASS" below.</p> |
27 <div id="host">FAIL</div> | 27 <div id="host">FAIL</div> |
28 <script> | 28 <script> |
29 var shadowRoot = window.host.attachShadow({mode: 'open'}); | 29 var shadowRoot = window.host.attachShadow({mode: 'open'}); |
30 shadowRoot.innerHTML = | 30 shadowRoot.innerHTML = |
31 '<style>#pass { color: green; }</style>\n' + | 31 '<style>#pass { color: green; }</style>\n' + |
32 '<div id="pass">PASS</div>'; | 32 '<div id="pass">PASS</div>'; |
33 </script> | 33 </script> |
34 </body> | 34 </body> |
35 </html> | 35 </html> |
OLD | NEW |