2 "This test checks that functions on the array prototype correctly handle exceptions from property getters when called on non-array objects."
10 var propertyGetter = {
11 get: (function() { throw true; })
13 Object.defineProperty(testObj, 0, propertyGetter);
14 Object.defineProperty(testObj, 1, propertyGetter);
15 Object.defineProperty(testObj, 2, propertyGetter);
18 f.call(testObj, function(){});
25 // This test makes sense for these functions: (they should get all properties on the array)
26 shouldBeTrue("test(Array.prototype.sort)");
27 shouldBeTrue("test(Array.prototype.every)");
28 shouldBeTrue("test(Array.prototype.some)");
29 shouldBeTrue("test(Array.prototype.forEach)");
30 shouldBeTrue("test(Array.prototype.map)");
31 shouldBeTrue("test(Array.prototype.filter)");
32 shouldBeTrue("test(Array.prototype.reduce)");
33 shouldBeTrue("test(Array.prototype.reduceRight)");
35 // Probably not testing much of anything in these cases, but make sure they don't crash!
36 shouldBeTrue("test(Array.prototype.join)");
37 shouldBeTrue("test(Array.prototype.pop)");
38 shouldBeFalse("test(Array.prototype.push)");
39 shouldBeTrue("test(Array.prototype.reverse)");
40 shouldBeTrue("test(Array.prototype.shift)");
41 shouldBeTrue("test(Array.prototype.slice)");
42 shouldBeTrue("test(Array.prototype.splice)");
43 shouldBeTrue("test(Array.prototype.unshift)");
44 shouldBeTrue("test(Array.prototype.indexOf)");
45 shouldBeTrue("test(Array.prototype.lastIndexOf)");