Merge pull request #673 from bocoup/relax-test

Relax test for forbidden extension
This commit is contained in:
Tom Care 2016-06-22 15:41:46 -07:00 committed by GitHub
commit 149cd4ae9a

View File

@ -5,16 +5,14 @@
description: > description: >
ECMAScript Function objects defined using syntactic constructors ECMAScript Function objects defined using syntactic constructors
in strict mode code do not have own properties "caller" or in strict mode code do not have own properties "caller" or
"arguments", but inherit them from %FunctionPrototype%. "arguments" other than those that are created by applying the
AddRestrictedFunctionProperties abstract operation to the function.
flags: [onlyStrict] flags: [onlyStrict]
es6id: 16.1 es6id: 16.1
---*/ ---*/
function func() {} function func() {}
assert.sameValue(func.hasOwnProperty('caller'), false, 'Functions defined using syntactic constructors in strict mode code do not have own property "caller"');
assert.sameValue(func.hasOwnProperty('arguments'), false, 'Functions defined using syntactic constructors in strict mode code do not have own property "arguments"');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
return func.caller; return func.caller;
}); });