1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/generic/crashtests/309322-3.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +<html><head> 1.5 +<title>Testcase3 bug 309322 - Evil testcase using multiple display:table-caption causes crash</title> 1.6 +<style> 1.7 +*[toggle_style],*[toggle_style1],*[toggle_style2],*[toggle_style3],*[toggle_style4]{ 1.8 +display:table-caption; 1.9 +} 1.10 +</style> 1.11 +<script> 1.12 +function doe(i){ 1.13 +var x=document.body.getElementsByTagName('*'); 1.14 +var xl=x.length;i=i+1; 1.15 +x[i-1].removeAttribute('toggle_style'); 1.16 +x[i].setAttribute('toggle_style','toggle_style'); 1.17 +if ((i+1)<xl) {x[i+1].setAttribute('toggle_style1','toggle_style'); 1.18 +x[i].removeAttribute('toggle_style1'); 1.19 +} 1.20 +if ((i+2)<xl) {x[i+2].setAttribute('toggle_style2','toggle_style'); 1.21 +x[i+1].removeAttribute('toggle_style2'); 1.22 +} 1.23 +if ((i+3)<xl) {x[i+3].setAttribute('toggle_style3','toggle_style'); 1.24 +x[i+2].removeAttribute('toggle_style3'); 1.25 +} 1.26 +if ((i+4)<xl) {x[i+4].setAttribute('toggle_style4','toggle_style'); 1.27 +x[i+3].removeAttribute('toggle_style4'); 1.28 +} 1.29 +if ((i+4)==xl) { 1.30 +x[i+3].removeAttribute('toggle_style4'); 1.31 +} 1.32 +if ((i+3)==xl) { 1.33 +x[i+2].removeAttribute('toggle_style3'); 1.34 +} 1.35 +if ((i+2)==xl) { 1.36 +x[i+1].removeAttribute('toggle_style2'); 1.37 +} 1.38 +if ((i+1)==xl) { 1.39 +x[i].removeAttribute('toggle_style1'); 1.40 +} 1.41 +setTimeout(doe,20,i); 1.42 +} 1.43 + 1.44 + 1.45 +</script></head><body onload="doe(3)"> 1.46 +<button onclick="doe(3)">Clicking on this button should not create extra "Galloway" text</button> 1.47 +<table><tbody><tr><td> 1.48 +<span><br></span> 1.49 +<a href="#">Galloway</a> 1.50 +</td></tr></tbody></table> 1.51 +</body></html>