Test for bug 381746 - Make reftest 381746-1.html wait for the load events of its iframes. r=mats.

--HG--
extra : rebase_source : a92b4a01d62ae2a22230da3dfb4a6ad177abce11
This commit is contained in:
Henri Sivonen 2010-03-10 10:25:06 +02:00
Родитель a94750beaa
Коммит 9ae2d6c642
1 изменённых файлов: 13 добавлений и 5 удалений

Просмотреть файл

@ -1,9 +1,17 @@
<html><head>
<title>Testcase Bug 381746 – odd and changing border in frameset</title>
<script>
<html class="reftest-wait"><head>
<title>Testcase Bug 381746 - odd and changing border in frameset</title>
<script>
var frameOnloadCalled = false;
function frameOnload() {
if (!frameOnloadCalled) {
frameOnloadCalled = true;
return;
}
document.documentElement.removeAttribute("class");
}
function doe() {
document.getElementsByTagName('frame')[0].src = 'data:text/html;charset=utf-8,text';
document.getElementsByTagName('frame')[1].src = 'data:text/html;charset=utf-8,text';
document.getElementsByTagName('frame')[0].src = 'data:text/html;charset=utf-8,<body onload="parent.frameOnload();">text';
document.getElementsByTagName('frame')[1].src = 'data:text/html;charset=utf-8,<body onload="parent.frameOnload();">text';
}
window.onload=doe;
</script>