A shadow element in ShadowDOM of a button element does not work.
[WebKit-https.git] / LayoutTests / fast / dom / shadow / shadowdom-for-form-associated-element-useragent.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="resources/polyfill.js"></script>
5 <script src="../../js/resources/js-test-pre.js"></script>
6
7 <p>When a AuthorShadowRoot is added, UserAgentShadowRoot should exists as the oldest Shadow Root.</p>
8 <div id='container'>
9     <form>
10         <select id='select'><option>hoge</option></select>
11         <output id='output'></output>
12         <keygen id='keygen'></keygen>
13         <fieldset id='fieldset'>
14             <input type="text">
15             <legend>hogehoge</legend>
16         </fieldset>
17     </form>
18 </div>
19 <pre id='console'></pre>
20
21 <script>
22 var elems = [
23     "select", "keygen", "fieldset"
24 ];
25
26 var shadowRoot;
27 var oldestShadowRoot;
28 var youngerShadowRoot;
29 function test()
30 {
31     if (window.testRunner)
32         testRunner.dumpAsText();
33
34     for (var i = 0; i < elems.length; ++i) {
35         var host = document.getElementById(elems[i]);
36         shadowRoot = new WebKitShadowRoot(host);
37         shadowRoot.innerHTML = "<shadow></shadow>";
38
39         oldestShadowRoot = internals.oldestShadowRoot(host);
40         youngerShadowRoot = internals.youngerShadowRoot(oldestShadowRoot);
41         shouldNotBe('oldestShadowRoot', 'shadowRoot');
42         shouldBe('youngerShadowRoot', 'shadowRoot');
43     }
44
45     container.innerHTML = "";
46 }
47
48 test();
49 var successfullyParsed = true;
50 </script>
51 <script src="../../js/resources/js-test-post.js"></script>
52 </body>
53 </html>