JavaScript Test - attempt to deal with alert dismissal, bug 341815

This commit is contained in:
bclary%bclary.com 2006-09-03 00:28:36 +00:00
parent 65d5bbc344
commit 142964427e

View File

@ -40,9 +40,9 @@ var summary = 'Close hook crash';
var actual = 'No Crash';
var expect = 'No Crash';
var ialert = 0;
//-----------------------------------------------------------------------------
test();
//test();
//-----------------------------------------------------------------------------
function test()
@ -66,7 +66,7 @@ function test()
globalToPokeGC = {};
if (typeof alert != 'undefined')
{
alert(1);
alert(++ialert);
}
}
@ -82,3 +82,29 @@ function test()
exitFunc ('test');
}
function init()
{
// give the dialog closer time to register
setTimeout('runtest()', 5000);
}
function runtest()
{
test();
reportCompare(expect, actual, summary);
gDelayTestDriverEnd = false;
jsTestDriverEnd();
}
if (typeof window != 'undefined')
{
// delay test driver end
gDelayTestDriverEnd = true;
window.addEventListener("load", init, false);
}
else
{
reportCompare(expect, actual, summary);
}