method-called-on-incompatible.js (759B)
1 load(libdir + "asserts.js"); 2 3 assertTypeErrorMessage(() => Set.prototype.forEach.call({}), "forEach method called on incompatible Object"); 4 assertTypeErrorMessage(() => newGlobal({newCompartment: true}).Set.prototype.forEach.call({}), "forEach method called on incompatible Object"); 5 assertTypeErrorMessage(() => Set.prototype.forEach.call(15), "forEach method called on incompatible number"); 6 7 assertTypeErrorMessage(() => Int8Array.prototype.find.call({}), "find method called on incompatible Object"); 8 assertTypeErrorMessage(() => newGlobal({newCompartment: true}).Int8Array.prototype.find.call({}), "find method called on incompatible Object"); 9 assertTypeErrorMessage(() => Int8Array.prototype.find.call(15), "find method called on incompatible number");