mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
JavaScript Test - catch indirect eval exception on trunk, bug 361571
This commit is contained in:
parent
045ac58126
commit
66d51ee069
@ -51,12 +51,20 @@ function test()
|
||||
enterFunc ('test');
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
o = {};
|
||||
o.__defineSetter__('y', eval);
|
||||
o.watch('y', function () { return "";});
|
||||
o.y = 1;
|
||||
|
||||
try
|
||||
{
|
||||
o = {};
|
||||
o.__defineSetter__('y', eval);
|
||||
o.watch('y', function () { return "";});
|
||||
o.y = 1;
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
printStatus('Note eval can no longer be called directly');
|
||||
expect = 'EvalError: function eval must be called directly, and not by way of a function of another name';
|
||||
actual = ex + '';
|
||||
}
|
||||
reportCompare(expect, actual, summary);
|
||||
|
||||
exitFunc ('test');
|
||||
|
Loading…
Reference in New Issue
Block a user