309322-2.html (1853B)
1 <html><head> 2 <title>Testcase2 bug 309322 - Evil testcase using multiple display:table-caption causes crash</title> 3 <style> 4 *[toggle_style],*[toggle_style1],*[toggle_style2],*[toggle_style3],*[toggle_style4]{ 5 display:table-caption; 6 } 7 </style> 8 <script> 9 function doe(i){ 10 var x=document.body.getElementsByTagName('*'); 11 var xl=x.length;i=i+1; 12 x[i-1].removeAttribute('toggle_style'); 13 if ((i)<xl) x[i].setAttribute('toggle_style','toggle_style'); 14 if ((i+1)<xl) {x[i+1].setAttribute('toggle_style1','toggle_style'); 15 x[i].removeAttribute('toggle_style1'); 16 } 17 if ((i+2)<xl) {x[i+2].setAttribute('toggle_style2','toggle_style'); 18 x[i+1].removeAttribute('toggle_style2'); 19 } 20 if ((i+3)<xl) {x[i+3].setAttribute('toggle_style3','toggle_style'); 21 x[i+2].removeAttribute('toggle_style3'); 22 } 23 if ((i+4)<xl) {x[i+4].setAttribute('toggle_style4','toggle_style'); 24 x[i+3].removeAttribute('toggle_style4'); 25 } 26 if ((i+4)==xl) { 27 x[i+3].removeAttribute('toggle_style4'); 28 } 29 if ((i+3)==xl) { 30 x[i+2].removeAttribute('toggle_style3'); 31 } 32 if ((i+2)==xl) { 33 x[i+1].removeAttribute('toggle_style2'); 34 } 35 if ((i+1)==xl) { 36 x[i].removeAttribute('toggle_style1'); 37 } 38 setTimeout(doe,20,i); 39 } 40 41 function doe2(){ 42 var x=document.links[0].cloneNode(true); 43 document.links[0].appendChild(x); 44 } 45 </script> 46 </head> 47 <body onload="doe(1)"> 48 <button onclick="doe(1)">Clicking on this button should not crash Mozilla</button> 49 <table><tbody><tr><td> 50 51 <span><br></span> 52 <a href="#">Galloway<span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span><span>Galloway</span></a> 53 54 </td></tr></tbody></table> 55 56 </body></html>