104 Commits

Author SHA1 Message Date
Aleksey Shvayka
1265a60017 Improve Proxy/construct coverage (#2159) 2019-05-29 15:49:41 -04:00
Aleksey Shvayka
6f4c0d96f7 Improve GetFunctionRealm coverage (#2155)
* Fix Function.prototype.bind test

* Simplify Proxy test

* Info tweaks

* Add Function.prototype.bind recursive test

* Add Proxy recursive test
2019-05-22 18:11:49 -04:00
Aleksey Shvayka
8c1819484e Improve Proxy/apply coverage (#2156) 2019-05-10 15:57:40 -04:00
Aleksey Shvayka
4d33170d0e Add tests for Proxy semantics change (#2143)
* Add not extensible target test for `deleteProperty`

* Add non-writable descriptor test for `defineProperty`

* Add non-writable descriptor test for `getOwnPropertyDescriptor`
2019-05-03 10:21:48 -04:00
Leo Balter
f4e60b8f20
Add a case for non extensible targets of proxies GetPrototypeOf (#2122) 2019-04-24 11:49:43 -04:00
ta7sudan
4bacf25f0d Add test that a Proxy instance with getPrototypeOf trap use instanceof operator on a function (#2107) 2019-04-03 14:14:51 -04:00
Gus Caplan
2aacb28bb9 Fix some proxy tests (#1966)
- `Proxy/getOwnPropertyDescriptor/call-parameters.js`
  Fixes a call to `Object.getOwnPropertyDescriptor` without the prop
  param. Not actually a huge problem, as the test wasn't depending on
  it.

- `Proxy/getOwnPropertyDescriptor/result-type-is-not-object-nor-undefined`
  This test asserted that `function() {}` should throw with the
  following spec step, which is incorrect, as functions are typed as
  `Object` in the spec.
  """
  1. If Type(trapResultObj) is neither Object nor Undefined, throw a
    TypeError exception.
  """
2018-11-26 13:41:13 -05:00
Rick Waldron
64f219b666 Features: run feature detector to verify newly added feature flags 2018-07-25 12:16:49 -04:00
Thomas Wood
2d4ac25fa0 Add feature flags for new.target
Additionally removed the `arrow-function` feature for
test/language/eval-code/direct/new.target-fn.js as it is not testing
arrow-functions, but they are mentioned in the preamble.
2018-07-24 20:31:35 +01:00
Rick Waldron
2d27462e70 Features: Proxy, Reflect (See pull/1643) (#1646)
Follow up to https://github.com/tc39/test262/pull/1643
2018-07-20 18:42:39 -04:00
Thomas Wood
d817076ddb Make Proxy/ownKeys tests ES5-parsable. (#1644)
All other Proxy tests use the syntax `attr: function() {...}` for
defining traps, ownKeys was unique in using the shorthand syntax. Change
to longhand syntax for back-compat for partial implementations.
2018-07-20 18:40:10 -04:00
Thomas Wood
4f3cbc756d Add a missing Reflect feature flag.
Proxy/deleteProperty/boolean-trap-result-boolean-true.js was missing a
feature flag for the Reflect library.
2018-07-20 15:04:21 -04:00
Rick Waldron
4fd36e7f1d built-ins/Proxy/*: make all indentation consistent (depth & character) (#1434) 2018-02-15 15:11:36 -05:00
André Bargull
f95b56ab28 Revert "js-beautify: make all indentation consistent (depth & character) (#1409)" (#1412)
This reverts commit a01de4a722d088055a7d84d8c691ddd7109edb34.
2018-02-09 12:09:47 -05:00
Rick Waldron
a01de4a722 js-beautify: make all indentation consistent (depth & character) (#1409) 2018-02-09 11:35:37 -05:00
Rick Waldron
92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
Leo Balter
7cbbe51216 Add cross-realm feature 2017-09-22 15:29:10 -04:00
Leo Balter
c41faf1aca Add missing Symbol features flags 2017-09-07 15:51:13 -04:00
Leo Balter
be420f34f0 Fix cross realm tests in Proxy.construct 2017-09-06 17:05:55 -04:00
Leo Balter
cf43f93284 Address feedback review 2017-09-06 16:45:26 -04:00
Aleksey Shvayka
97a04de2de improve & join undefined apply tests 2017-09-06 16:45:26 -04:00
Rick Waldron
fe7e906f4a Proxy ownKeys should throw a TypeError if returned keys are not String or Symbol. Fixes gh-1169 (#1173) 2017-08-11 12:18:06 -04:00
Rick Waldron
9e88bb9a45 Proxy, [[OwnPropertyKeys]]: If trapResult contains any duplicate entries, throw a TypeError
Ref: https://github.com/tc39/ecma262/pull/833
2017-08-04 15:06:31 -04:00
Rick Waldron
3ebd97ca9b Updates to Proxy trap: ownKeys 2017-08-04 11:58:55 -04:00
André Bargull
d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
Rick Waldron
fdd2fa9b1c Rename $ => $262. Fixes gh-802 (#823)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-03-01 16:34:15 -05:00
Dmitry Panov
ffd8039386 Replaced tabs with spaces in YAML. 2016-11-19 23:13:26 +00:00
Aleksey Shvayka
bef7f988d2 Ensure Proxy [[Get]] and [[Set]] pass correct receiver (#792)
* Ensure Proxy [[Get]] passes correct receiver

* add [[Get]] test for proxy in prototype

* diversify how traps are missing

* ensure [[Set]] passes correct receiver

* rename to match other tests

* remove extra tests

* add esid

* add description
2016-11-17 14:26:34 -08:00
jugglinmike
71e573f7da Add tests for realm interactions (#688)
* Add tests for prototype realm inference

* Add tests for miscellaneous realm concerns

* Add tests for realm of spec-created Errors

In some cases, Error objects produced by the specification are
observable from ECMAScript code. Among these cases, some are further
differentiated in that they occur outside of any built-in function and
may be triggered through syntactic production directly. The current
realm record is commonly interpreted incorrectly under these
circumstances.

Add tests asserting that the expected realm record is used when
constructing such Error objects.

* Add tests for realm use in ArraySpeciesCreate

* Add tests for function realm retrieval

* Add tests for cross-realm behaviors of Symbols

* Add tests for GetValue and PutValue

* Add tests for realm of spec-created Arrays

In some cases, Arrays produced by CreateArrayFromList are observable
from ECMAScript code. Among these cases, two occur outside of any
built-in function and may be triggered through syntactic production
directly. The current realm record is commonly interpreted incorrectly
under these circumstances.

Add tests asserting that the expected realm record is used when
constructing arrays.

* Add test for spec-created object

* fixup! Add tests for realm of spec-created Errors

* fixup! Add tests for realm of spec-created Errors

* fixup! Add tests for prototype realm inference

* fixup! Add tests for miscellaneous realm concerns
2016-10-24 10:43:17 -07:00
Henrique Ferreiro
0651a7fad1 setPrototypeOf returns 'true' if called with the target's prototype (#768) 2016-10-05 13:25:35 -04:00
Leo Balter
e8e0fb9d34 Update tests for Proxy.[[SetPrototypeOf]] (#716)
* Update tests for Proxy.[[SetPrototypeOf]]

Expand coverage for proxies' [[SetPrototypeOf]] and update tests to
verify that target's [[IsExtensible]] is not called anymore if trap
returns a falsy value.

Ref tc39/ecma262#331
2016-07-19 14:51:02 -07:00
Leonardo Balter
bf782c8421 s/id/esid
Fixes #477
2016-02-22 09:47:42 -05:00
Leonardo Balter
65241f1e93 Add test to assert Proxy enumerate trap is not triggered anymore
Ref #495
2016-02-18 16:39:41 -05:00
Leonardo Balter
e223738369 Remove tests for Proxy enumerate
Ref #495
2016-02-18 15:57:14 -05:00
Mike Pennisi
071b5f03c6 Remove unused harness file
The harness file `Test262Error.js` has not contained executable code since it
was introduced in this project [1]. The definition of the `Test262Error`
function has consistently been located in the `sta.js` harness file which test
runners are expected to inject into the test environment.

Remove the file and all references to it.

[1] See commit c33bf0e0439e6f6bf084c1524d7df8d2b41c515d
2016-02-12 13:44:18 -05:00
André Bargull
ca61d9b876 Add missing tests for "length" and "name" properties of built-in functions
Note: Already uses the updated DataView function lengths from tc39/ecma262#266 (ES2016 Draft 2015-12-20)
2016-01-15 18:12:05 +01:00
André Bargull
38c6700cbb Test built-in function requirements of Promise and Proxy helper functions 2015-11-24 20:12:55 +01:00
Leonardo Balter
fbf3b89870 Small fixes on Proxy constructor tests 2015-07-31 17:03:02 -04:00
Leonardo Balter
2c4077c17a Proxy: construct 2015-06-15 22:37:59 -04:00
Leonardo Balter
450b830026 Proxy: apply 2015-06-15 22:37:59 -04:00
Leonardo Balter
3f214e715f Proxy: ownKeys 2015-06-15 22:37:58 -04:00
Leonardo Balter
28f9d8dbd2 Proxy: enumerate 2015-06-15 22:37:58 -04:00
Leonardo Balter
d9edb3593a Proxy: deleteProperty 2015-06-15 22:37:58 -04:00
Leonardo Balter
99ca320b01 Proxy: set 2015-06-15 22:37:57 -04:00
Leonardo Balter
21a1fbe68e Proxy: get 2015-06-15 22:37:57 -04:00
Leonardo Balter
54e82687d7 Proxy: has 2015-06-15 22:37:57 -04:00
Leonardo Balter
b2d4bcfd0e Proxy: defineProperty 2015-06-15 22:37:57 -04:00
Leonardo Balter
a2f0f2888d Proxy: getOwnPropertyDescriptor 2015-06-15 22:37:57 -04:00
Leonardo Balter
79a256cd5a Proxy: preventExtensions 2015-06-15 22:37:56 -04:00
Leonardo Balter
15a9a15815 Proxy: isExtensible 2015-06-15 22:37:56 -04:00