tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / css / continuationCrash.html
1 <html>
2 <head>
3
4 <script language="JavaScript">
5 function setBlock() {
6         var el = document.getElementById("block");
7         el.style.display="block";
8 }
9 function setOutline() {
10         var el = document.getElementById("outline");
11         el.style.outline="2px solid red";
12 }
13 function setSpan() {
14         var newChild = document.createElement("span");
15         newChild.setAttribute("id", "outline");
16         var aSpan = document.createElement("span");
17         aSpan.setAttribute("id", "block");
18         newChild.appendChild(aSpan);
19         var oldChild = document.body.firstChild;
20         document.body.replaceChild(newChild, oldChild);
21 }
22 </script>
23
24 </head>
25
26 <body><span id="outline">
27         <span id="block">A span-element</span>
28 </span>
29
30 <h4>Instructions</h4>
31 <p>Click the following buttons.</p>
32 <ol>
33 <li>Start with the outmost left one.</id>
34 <li>Click the middle one.</li>
35 <li>(The ouline will not be updated correctly.)
36 <li>Click the right button.</li>
37 <li>This will crash Safari 1.3 (v176 and v170, no other configurations tested).</li>
38 <li>The combination 2. 1. 3. will also crash Safari.</li>
39 <li>1. 3. will not crash Safari. (But the outline should vanish. Shouldn't it?)</li>
40 <li>2. 3. will not crash Safari either.</li>
41
42 <script>
43     setOutline();
44 </script>
45 <script>
46     setBlock();
47 </script>
48 <script>
49     setSpan();
50 </script>
51
52 <input type="button" value="1. Set outline property" onclick="setOutline()" />
53 <input type="button" value="2. Set display property" onclick="setBlock()" />
54 <input type="button" value="3. Replace span-element" onclick="setSpan()" />
55 </body>
56
57 </html>