зеркало из https://github.com/mozilla/gecko-dev.git
Bug 309322 - Add crashtests.
This commit is contained in:
Родитель
ec9c915cfa
Коммит
994b7bce59
|
@ -0,0 +1,56 @@
|
|||
<html><head>
|
||||
<title>Testcase1 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');
|
||||
if ((i)<xl) 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);
|
||||
}
|
||||
|
||||
function doe2(){
|
||||
var x=document.links[0].cloneNode(true);
|
||||
document.links[0].appendChild(x);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="doe(1)">
|
||||
<button onclick="doe(1)">Clicking on this button should not crash Mozilla</button>
|
||||
<table><tbody><tr><td>
|
||||
|
||||
<span><br></span>
|
||||
<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>
|
||||
|
||||
</td></tr></tbody></table>
|
||||
|
||||
</body></html>
|
|
@ -0,0 +1,56 @@
|
|||
<html><head>
|
||||
<title>Testcase2 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');
|
||||
if ((i)<xl) 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);
|
||||
}
|
||||
|
||||
function doe2(){
|
||||
var x=document.links[0].cloneNode(true);
|
||||
document.links[0].appendChild(x);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="doe(1)">
|
||||
<button onclick="doe(1)">Clicking on this button should not crash Mozilla</button>
|
||||
<table><tbody><tr><td>
|
||||
|
||||
<span><br></span>
|
||||
<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>
|
||||
|
||||
</td></tr></tbody></table>
|
||||
|
||||
</body></html>
|
|
@ -0,0 +1,48 @@
|
|||
<html><head>
|
||||
<title>Testcase3 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 should not create extra "Galloway" text</button>
|
||||
<table><tbody><tr><td>
|
||||
<span><br></span>
|
||||
<a href="#">Galloway</a>
|
||||
</td></tr></tbody></table>
|
||||
</body></html>
|
|
@ -0,0 +1,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="https://bugzilla.mozilla.org/attachment.cgi?id=165273"></a>
|
||||
</td></tr></tbody></table>
|
||||
</body></html>
|
|
@ -15,6 +15,10 @@ load 295292-1.html
|
|||
load 295292-2.html
|
||||
load 302260-1.html
|
||||
load 307979-1.html
|
||||
load 309322-1.html
|
||||
load 309322-2.html
|
||||
load 309322-3.html
|
||||
load 309322-4.html
|
||||
load 310556-1.xhtml
|
||||
load 322780-1.xul
|
||||
load 323381-1.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче