JavaScript Test - attempt to deal with alert dismissal, bug 341821
git-svn-id: svn://10.0.0.236/trunk@209088 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
445faccd49
commit
aec91df802
@ -40,9 +40,10 @@ var summary = 'Close hook crash';
|
||||
var actual = 'No Crash';
|
||||
var expect = 'No Crash';
|
||||
|
||||
var ialert = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
test();
|
||||
//test();
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function test()
|
||||
@ -67,7 +68,7 @@ function test()
|
||||
iter = null;
|
||||
if (typeof alert != 'undefined')
|
||||
{
|
||||
alert(1);
|
||||
alert(++ialert);
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,3 +85,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…
x
Reference in New Issue
Block a user