JavaScript Tests - update test to catch exception in browser tests, bug 420612

This commit is contained in:
bclary@bclary.com 2008-03-10 14:24:35 -07:00
parent 10d6312b8c
commit d914c4b13e

View File

@ -44,6 +44,18 @@ var expect = 'No Crash';
printBugNumber(BUGNUMBER);
printStatus (summary);
this.__proto__ = [];
this.unwatch("x");
try
{
this.__proto__ = [];
this.unwatch("x");
}
catch(ex)
{
print(ex + '');
if (typeof window != 'undefined')
{
expect = 'Error: invalid __proto__ value (can only be set to null)';
}
actual = ex + '';
}
reportCompare(expect, actual, summary);