mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
JavaScript Test - attempt to deal with alert dismissal, bug 341815
This commit is contained in:
parent
65d5bbc344
commit
142964427e
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user