JavaScript Tests - disable window.onerror handler to prevent false failure, bug 340804

This commit is contained in:
bclary%bclary.com 2007-05-07 05:18:27 +00:00
Родитель 91b4395631
Коммит 8843cc7d49
1 изменённых файлов: 35 добавлений и 29 удалений

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

@ -42,9 +42,16 @@ var expect = 'No Crash';
printBugNumber (bug);
printStatus (summary);
if (typeof setTimeout != 'undefined')
if (typeof setTimeout == 'undefined')
{
reportCompare(expect, actual, 'Test Skipped.');
}
else
{
gDelayTestDriverEnd = true;
window.onerror = null;
try
{
setTimeout(eval, 0, '', null);
@ -53,24 +60,22 @@ if (typeof setTimeout != 'undefined')
{
printStatus(ex+'');
}
}
reportCompare(expect, actual, 'setTimeout(eval, 0, "", null)');
if (typeof setTimeout != 'undefined' && typeof Script != 'undefined')
{
try
{
setTimeout(Script, 0, '', null);
}
catch(ex)
{
printStatus(ex+'');
}
}
reportCompare(expect, actual, 'setTimeout(Script, 0, "", null)');
reportCompare(expect, actual, 'setTimeout(eval, 0, "", null)');
if (typeof Script != 'undefined')
{
try
{
setTimeout(Script, 0, '', null);
}
catch(ex)
{
printStatus(ex+'');
}
reportCompare(expect, actual, 'setTimeout(Script, 0, "", null)');
}
if (typeof setInterval != 'undefined')
{
try
{
setInterval(eval, 0, '', null);
@ -79,18 +84,19 @@ if (typeof setInterval != 'undefined')
{
printStatus(ex+'');
}
}
reportCompare(expect, actual, 'setInterval(eval, 0, "", null)');
reportCompare(expect, actual, 'setInterval(eval, 0, "", null)');
if (typeof setInterval != 'undefined' && typeof Script != 'undefined')
{
try
if (typeof Script != 'undefined')
{
setInterval(Script, 0, '', null);
try
{
setInterval(Script, 0, '', null);
}
catch(ex)
{
printStatus(ex+'');
}
reportCompare(expect, actual, 'setInterval(Script, 0, "", null)');
}
catch(ex)
{
printStatus(ex+'');
}
setTimeout('gDelayTestDriverEnd = false; jsTestDriverEnd();', 0);
}
reportCompare(expect, actual, 'setInterval(Script, 0, "", null)');