layout/generic/crashtests/309322-1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/generic/crashtests/309322-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,56 @@
     1.4 +<html><head>
     1.5 +<title>Testcase1 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 +if ((i)<xl) 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 +function doe2(){
    1.45 +var x=document.links[0].cloneNode(true);
    1.46 +document.links[0].appendChild(x);
    1.47 +}
    1.48 +</script>
    1.49 +</head>
    1.50 +<body onload="doe(1)">
    1.51 +<button onclick="doe(1)">Clicking on this button should not crash Mozilla</button>
    1.52 +<table><tbody><tr><td> 
    1.53 +
    1.54 +<span><br></span>
    1.55 +<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></a>
    1.56 +
    1.57 +</td></tr></tbody></table>
    1.58 +
    1.59 +</body></html>

mercurial