6d4b85ad36abadd27b3550a7591f457a27eca374
[WebKit-https.git] / LayoutTests / fast / html / marquee-reparent-check.html
1 <!DOCTYPE HTML><!-- webkit-test-runner [ enableKeygenElement=true ] -->
2 <html>
3 <head>
4 <script src="../../resources/js-test-pre.js"></script>
5 <script>
6 if (window.testRunner)
7     testRunner.dumpAsText();
8
9 description("The test passes if it does not ASSERT in debug builds.");
10
11 var innerMarquee;
12 var outerMarquee;
13
14 function runTest() {
15     innerMarquee = document.getElementById("innerMarquee");
16     outerMarquee = document.getElementById("outerMarquee");
17
18     document.execCommand("createLink", false, "#foo");
19     document.getElementById("htmlTableHeader").innerHTML = "TEST";
20 }
21
22 function blurHandler() {
23     document.getElementById("htmlTextArea").setSelectionRange(0, 0, "foo");
24 }
25
26 function focusHandler() {
27     document.getElementById("htmlTextArea").click();
28     innerMarquee.appendChild(outerMarquee);
29 }
30 </script>
31 </head>
32 <body>
33     <div id="divElement">
34     </div>
35     <marquee id="outerMarquee">
36         <output>
37             <base target="divElement"></base>
38         </output>
39     </marquee>
40     <a href="">
41         <textarea id="htmlTextArea" onfocus="focusHandler()" onblur="blurHandler()" autofocus="autofocus">Test Text Area</textarea>
42     </a>
43     <table id="testTable">
44         <tbody>
45             <tr>
46                 <th id="htmlTableHeader">
47                     <marquee id="innerMarquee">
48                         <svg>
49                             <mesh onload="runTest()">
50                             </mesh>
51                         </svg>
52                     </marquee>
53                 </th>
54             </tr>
55         </tbody>
56     </table>
57     <keygen autofocus="autofocus">
58     <iframe>Test Frame</iframe>
59     <script src="../../resources/js-test-post.js"></script>
60 </body>
61 </html>