blob: 9b9b6a5bbf5c3c4de140968258971e0fa6eb0f39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<html><head>
<title>Testcase4 bug 309322 - Evil testcase using multiple display:table-caption causes crash</title>
<style>
*[toggle_style],*[toggle_style1],*[toggle_style2],*[toggle_style3],*[toggle_style4]{
display:table-caption;
}
</style>
<script>
function doe(i){
var x=document.body.getElementsByTagName('*');
var xl=x.length;i=i+1;
x[i-1].removeAttribute('toggle_style');
x[i].setAttribute('toggle_style','toggle_style');
if ((i+1)<xl) {x[i+1].setAttribute('toggle_style1','toggle_style');
x[i].removeAttribute('toggle_style1');
}
if ((i+2)<xl) {x[i+2].setAttribute('toggle_style2','toggle_style');
x[i+1].removeAttribute('toggle_style2');
}
if ((i+3)<xl) {x[i+3].setAttribute('toggle_style3','toggle_style');
x[i+2].removeAttribute('toggle_style3');
}
if ((i+4)<xl) {x[i+4].setAttribute('toggle_style4','toggle_style');
x[i+3].removeAttribute('toggle_style4');
}
if ((i+4)==xl) {
x[i+3].removeAttribute('toggle_style4');
}
if ((i+3)==xl) {
x[i+2].removeAttribute('toggle_style3');
}
if ((i+2)==xl) {
x[i+1].removeAttribute('toggle_style2');
}
if ((i+1)==xl) {
x[i].removeAttribute('toggle_style1');
}
setTimeout(doe,20,i);
}
</script></head><body onload="doe(3)">
<button onclick="doe(3)">Clicking on this button and then closing this tab/window should not crash Mozilla</button>
<table><tbody><tr><td>
<span><br></span>
<a href="#"><img src="data:image/gif;base64,R0lGODlhAQABAIABAAD/AP///ywAAAAAAQABAAACAkQBADs="></a>
</td></tr></tbody></table>
</body></html>
|