From 3ebd97ca9b05c7d4b9eec72c80490976bc8a5ec7 Mon Sep 17 00:00:00 2001
From: Rick Waldron <waldron.rick@gmail.com>
Date: Fri, 4 Aug 2017 11:56:15 -0400
Subject: [PATCH] Updates to Proxy trap: ownKeys

---
 ...call-parameters-object-getownpropertynames.js |  4 ++--
 ...ll-parameters-object-getownpropertysymbols.js |  5 +++--
 .../Proxy/ownKeys/call-parameters-object-keys.js |  2 +-
 ...n-trap-result-absent-not-configurable-keys.js |  4 ++--
 .../ownKeys/extensible-return-trap-result.js     |  4 ++--
 .../not-extensible-missing-keys-throws.js        |  4 ++--
 .../ownKeys/not-extensible-new-keys-throws.js    |  4 ++--
 .../Proxy/ownKeys/not-extensible-return-keys.js  |  4 ++--
 test/built-ins/Proxy/ownKeys/null-handler.js     |  2 +-
 .../ownKeys/return-all-non-configurable-keys.js  |  5 +++--
 test/built-ins/Proxy/ownKeys/return-is-abrupt.js |  9 +++------
 .../return-not-list-object-throws-realm.js       |  6 +++---
 .../ownKeys/return-not-list-object-throws.js     | 16 ++++++++++------
 .../Proxy/ownKeys/trap-is-not-callable-realm.js  |  4 ++--
 .../Proxy/ownKeys/trap-is-not-callable.js        |  7 ++++---
 .../built-ins/Proxy/ownKeys/trap-is-undefined.js |  4 ++--
 16 files changed, 44 insertions(+), 40 deletions(-)

diff --git a/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertynames.js b/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertynames.js
index b7bde1412e..9ddf4c8652 100644
--- a/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertynames.js
+++ b/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertynames.js
@@ -1,11 +1,11 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     [[OwnPropertyKeys]] ( )
 
-    8. Let trapResultArray be Call(trap, handler, «target»).
+    7. Let trapResultArray be ? Call(trap, handler, « target »).
 ---*/
 
 var _target, _handler;
diff --git a/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertysymbols.js b/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertysymbols.js
index 39f3c7bd75..ea802c424d 100644
--- a/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertysymbols.js
+++ b/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertysymbols.js
@@ -1,11 +1,12 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     [[OwnPropertyKeys]] ( )
 
-    8. Let trapResultArray be Call(trap, handler, «target»).
+    7. Let trapResultArray be ? Call(trap, handler, « target »).
+
 features: [Symbol]
 ---*/
 
diff --git a/test/built-ins/Proxy/ownKeys/call-parameters-object-keys.js b/test/built-ins/Proxy/ownKeys/call-parameters-object-keys.js
index 0db31999b9..9ea0cdf6c4 100644
--- a/test/built-ins/Proxy/ownKeys/call-parameters-object-keys.js
+++ b/test/built-ins/Proxy/ownKeys/call-parameters-object-keys.js
@@ -1,7 +1,7 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     [[OwnPropertyKeys]] ( )
 
diff --git a/test/built-ins/Proxy/ownKeys/extensible-return-trap-result-absent-not-configurable-keys.js b/test/built-ins/Proxy/ownKeys/extensible-return-trap-result-absent-not-configurable-keys.js
index c17002ebb0..b7a11e4cbc 100644
--- a/test/built-ins/Proxy/ownKeys/extensible-return-trap-result-absent-not-configurable-keys.js
+++ b/test/built-ins/Proxy/ownKeys/extensible-return-trap-result-absent-not-configurable-keys.js
@@ -1,7 +1,7 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     If target is extensible, return the non-falsy trap result if target doesn't
     contain any non-configurable keys.
@@ -9,7 +9,7 @@ info: >
     [[OwnPropertyKeys]] ( )
 
     ...
-    19. If extensibleTarget is true and targetNonconfigurableKeys is empty, then
+    15. If extensibleTarget is true and targetNonconfigurableKeys is empty, then
         a. Return trapResult.
 ---*/
 
diff --git a/test/built-ins/Proxy/ownKeys/extensible-return-trap-result.js b/test/built-ins/Proxy/ownKeys/extensible-return-trap-result.js
index b99a3ad13d..f69b394e39 100644
--- a/test/built-ins/Proxy/ownKeys/extensible-return-trap-result.js
+++ b/test/built-ins/Proxy/ownKeys/extensible-return-trap-result.js
@@ -1,7 +1,7 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     If target is extensible, return the non-falsy trap result if it contains all
     of target's non-configurable keys.
@@ -9,7 +9,7 @@ info: >
     [[OwnPropertyKeys]] ( )
 
     ...
-    22. If extensibleTarget is true, return trapResult.
+    18. If extensibleTarget is true, return trapResult.
 ---*/
 
 var target = {};
diff --git a/test/built-ins/Proxy/ownKeys/not-extensible-missing-keys-throws.js b/test/built-ins/Proxy/ownKeys/not-extensible-missing-keys-throws.js
index 6da38c0d8b..469c9502a9 100644
--- a/test/built-ins/Proxy/ownKeys/not-extensible-missing-keys-throws.js
+++ b/test/built-ins/Proxy/ownKeys/not-extensible-missing-keys-throws.js
@@ -1,7 +1,7 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     If target is not extensible, the result must contain all the keys of the own
     properties of the target object.
@@ -9,7 +9,7 @@ info: >
     [[OwnPropertyKeys]] ( )
 
     ...
-    23. Repeat, for each key that is an element of targetConfigurableKeys,
+    19. For each key that is an element of targetConfigurableKeys, do
         a. If key is not an element of uncheckedResultKeys, throw a TypeError
         exception.
 ---*/
diff --git a/test/built-ins/Proxy/ownKeys/not-extensible-new-keys-throws.js b/test/built-ins/Proxy/ownKeys/not-extensible-new-keys-throws.js
index d00c536f66..880745712d 100644
--- a/test/built-ins/Proxy/ownKeys/not-extensible-new-keys-throws.js
+++ b/test/built-ins/Proxy/ownKeys/not-extensible-new-keys-throws.js
@@ -1,7 +1,7 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     If target is not extensible, the result can't contain keys names not
     contained in the target object.
@@ -9,7 +9,7 @@ info: >
     [[OwnPropertyKeys]] ( )
 
     ...
-    24. If uncheckedResultKeys is not empty, throw a TypeError exception.
+    20. If uncheckedResultKeys is not empty, throw a TypeError exception.
 ---*/
 
 var target = {
diff --git a/test/built-ins/Proxy/ownKeys/not-extensible-return-keys.js b/test/built-ins/Proxy/ownKeys/not-extensible-return-keys.js
index c1ad2af7de..00c8a3208e 100644
--- a/test/built-ins/Proxy/ownKeys/not-extensible-return-keys.js
+++ b/test/built-ins/Proxy/ownKeys/not-extensible-return-keys.js
@@ -1,7 +1,7 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     If target is not extensible, the result must contain all the keys of the own
     properties of the target object and no other values
@@ -9,7 +9,7 @@ info: >
     [[OwnPropertyKeys]] ( )
 
     ...
-    25. Return trapResult.
+    21. Return trapResult.
 ---*/
 
 var target = {
diff --git a/test/built-ins/Proxy/ownKeys/null-handler.js b/test/built-ins/Proxy/ownKeys/null-handler.js
index 91e1b224ac..e703ece13a 100644
--- a/test/built-ins/Proxy/ownKeys/null-handler.js
+++ b/test/built-ins/Proxy/ownKeys/null-handler.js
@@ -1,7 +1,7 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     [[OwnPropertyKeys]] ( )
 
diff --git a/test/built-ins/Proxy/ownKeys/return-all-non-configurable-keys.js b/test/built-ins/Proxy/ownKeys/return-all-non-configurable-keys.js
index a8e4e9958a..7b7fb11cdb 100644
--- a/test/built-ins/Proxy/ownKeys/return-all-non-configurable-keys.js
+++ b/test/built-ins/Proxy/ownKeys/return-all-non-configurable-keys.js
@@ -1,7 +1,7 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     The result List must contain the keys of all non-configurable own properties
     of the target object.
@@ -9,9 +9,10 @@ info: >
     [[OwnPropertyKeys]] ( )
 
     ...
-    21. Repeat, for each key that is an element of targetNonconfigurableKeys,
+    17. For each key that is an element of targetNonconfigurableKeys, do
         a. If key is not an element of uncheckedResultKeys, throw a TypeError
         exception.
+
 ---*/
 
 var target = {
diff --git a/test/built-ins/Proxy/ownKeys/return-is-abrupt.js b/test/built-ins/Proxy/ownKeys/return-is-abrupt.js
index 5e56c98e0c..fffaca5f21 100644
--- a/test/built-ins/Proxy/ownKeys/return-is-abrupt.js
+++ b/test/built-ins/Proxy/ownKeys/return-is-abrupt.js
@@ -1,19 +1,16 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     Trap returns abrupt.
 info: >
     [[OwnPropertyKeys]] ( )
 
     ...
-    8. Let trapResultArray be Call(trap, handler, «target»).
-    9. Let trapResult be CreateListFromArrayLike(trapResultArray, «‍String, Symbol»).
-        7.3.17 CreateListFromArrayLike (obj [, elementTypes] )
+    7. Let trapResultArray be ? Call(trap, handler, « target »).
+    8. Let trapResult be ? CreateListFromArrayLike(trapResultArray, « String, Symbol »).
 
-        1. ReturnIfAbrupt(obj).
-    ...
 ---*/
 
 var p = new Proxy({}, {
diff --git a/test/built-ins/Proxy/ownKeys/return-not-list-object-throws-realm.js b/test/built-ins/Proxy/ownKeys/return-not-list-object-throws-realm.js
index 20d7931d73..ba45959711 100644
--- a/test/built-ins/Proxy/ownKeys/return-not-list-object-throws-realm.js
+++ b/test/built-ins/Proxy/ownKeys/return-not-list-object-throws-realm.js
@@ -2,7 +2,6 @@
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
-es6id: 9.5.12
 description: >
     If return is not a list object, throw a TypeError exception  (honoring
     the Realm of the current execution context)
@@ -13,10 +12,11 @@ info: |
        Symbol »).
     ...
 
+    #sec-createlistfromarraylike
     7.3.17 CreateListFromArrayLike (obj [, elementTypes] )
 
-    ...
-    3. If Type(obj) is not Object, throw a TypeError exception.
+    2. If Type(obj) is not Object, throw a TypeError exception.
+
 features: [Symbol]
 ---*/
 
diff --git a/test/built-ins/Proxy/ownKeys/return-not-list-object-throws.js b/test/built-ins/Proxy/ownKeys/return-not-list-object-throws.js
index 147b0b05d6..7303625980 100644
--- a/test/built-ins/Proxy/ownKeys/return-not-list-object-throws.js
+++ b/test/built-ins/Proxy/ownKeys/return-not-list-object-throws.js
@@ -1,18 +1,22 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     If return is not a list object, throw a TypeError exception
 info: >
     [[OwnPropertyKeys]] ( )
 
-    8. Let trapResultArray be Call(trap, handler, «target»).
-    9. Let trapResult be CreateListFromArrayLike(trapResultArray, «‍String,
-    Symbol»).
+    7. Let trapResultArray be ? Call(trap, handler, « target »).
+    8. Let trapResult be ? CreateListFromArrayLike(trapResultArray, « String,
+        Symbol »).
     ...
-        7.3.17 CreateListFromArrayLike (obj [, elementTypes] )
-            3. If Type(obj) is not Object, throw a TypeError exception.
+
+    #sec-createlistfromarraylike
+    7.3.17 CreateListFromArrayLike (obj [, elementTypes] )
+
+    2. If Type(obj) is not Object, throw a TypeError exception.
+
 features: [Symbol]
 ---*/
 
diff --git a/test/built-ins/Proxy/ownKeys/trap-is-not-callable-realm.js b/test/built-ins/Proxy/ownKeys/trap-is-not-callable-realm.js
index 6db03b0f35..1cc6c5d6e5 100644
--- a/test/built-ins/Proxy/ownKeys/trap-is-not-callable-realm.js
+++ b/test/built-ins/Proxy/ownKeys/trap-is-not-callable-realm.js
@@ -2,7 +2,6 @@
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
-es6id: 9.5.12
 description: >
   Throws if trap is not callable (honoring the Realm of the current execution
   context)
@@ -12,9 +11,10 @@ info: |
     5. Let trap be GetMethod(handler, "ownKeys").
     ...
 
+    #sec-getmethod
     7.3.9 GetMethod (O, P)
 
-    5. If IsCallable(func) is false, throw a TypeError exception.
+    4. If IsCallable(func) is false, throw a TypeError exception.
 ---*/
 
 var OProxy = $262.createRealm().global.Proxy;
diff --git a/test/built-ins/Proxy/ownKeys/trap-is-not-callable.js b/test/built-ins/Proxy/ownKeys/trap-is-not-callable.js
index 417b675d1b..1cb7fdb646 100644
--- a/test/built-ins/Proxy/ownKeys/trap-is-not-callable.js
+++ b/test/built-ins/Proxy/ownKeys/trap-is-not-callable.js
@@ -1,18 +1,19 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     Trap is not callable.
 info: >
     [[OwnPropertyKeys]] ( )
 
-    5. Let trap be GetMethod(handler, "ownKeys").
+    5. Let trap be ? GetMethod(handler, "ownKeys").
     ...
 
+    #sec-getmethod
     7.3.9 GetMethod (O, P)
 
-    5. If IsCallable(func) is false, throw a TypeError exception.
+    4. If IsCallable(func) is false, throw a TypeError exception.
 ---*/
 
 var p = new Proxy({attr:1}, {
diff --git a/test/built-ins/Proxy/ownKeys/trap-is-undefined.js b/test/built-ins/Proxy/ownKeys/trap-is-undefined.js
index ec95ac21b8..2b98302621 100644
--- a/test/built-ins/Proxy/ownKeys/trap-is-undefined.js
+++ b/test/built-ins/Proxy/ownKeys/trap-is-undefined.js
@@ -1,11 +1,11 @@
 // Copyright (C) 2015 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-es6id: 9.5.12
+esid: sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
 description: >
     [[OwnPropertyKeys]] ( )
 
-    7. If trap is undefined, then Return target.[[OwnPropertyKeys]]()
+    6. If trap is undefined, then Return target.[[OwnPropertyKeys]]()
 ---*/
 
 var target = {
-- 
GitLab