blob: a9936bc002a2df67404929bcc9acf47f9c94c847 [file] [log] [blame]
description("Test for correct properties on Error objects.");
function enumerableProperties(object)
{
var result = [];
for (var i in object)
result.push(i);
return result;
}
try {
// generate a RangeError.
[].length = -1;
} catch (rangeError) {
var nativeError = rangeError;
var error = new Error("message");
shouldBe('enumerableProperties(error).sort()', '["column", "line", "sourceURL"]');
shouldBe('enumerableProperties(nativeError).sort()', '["column", "line", "sourceURL"]');
shouldBe('Object.getPrototypeOf(nativeError).name', '"RangeError"');
shouldBe('Object.getPrototypeOf(nativeError).message', '""');
}