Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Reflect / ownKeys / return-abrupt-from-result.js
blob1f289fc732554d15f0e2e765ce4b540d94416068
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 26.1.11
5 description: >
6   Return abrupt result from target.[[OwnPropertyKeys]]()
7 info: |
8   26.1.11 Reflect.ownKeys ( target )
10   ...
11   2. Let keys be target.[[OwnPropertyKeys]]().
12   3. ReturnIfAbrupt(keys).
13   ...
14 features: [Proxy, Reflect]
15 ---*/
17 var o = {};
18 var p = new Proxy(o, {
19   ownKeys: function() {
20     throw new Test262Error();
21   }
22 });
24 assert.throws(Test262Error, function() {
25   Reflect.ownKeys(p);
26 });
28 reportCompare(0, 0);