diff options
Diffstat (limited to 'test/built-ins/Proxy/ownKeys')
17 files changed, 81 insertions, 73 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 9ddf4c865..112a31da8 100644 --- a/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertynames.js +++ b/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertynames.js @@ -10,16 +10,16 @@ description: > var _target, _handler; var target = { - foo: 1, - bar: 2 + foo: 1, + bar: 2 }; var handler = { - ownKeys: function(t) { - _handler = this; - _target = t; - return Object.getOwnPropertyNames(t); - } + ownKeys: function(t) { + _handler = this; + _target = t; + return Object.getOwnPropertyNames(t); + } } var p = new Proxy(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 ea802c424..f788aa291 100644 --- a/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertysymbols.js +++ b/test/built-ins/Proxy/ownKeys/call-parameters-object-getownpropertysymbols.js @@ -19,11 +19,11 @@ target[a] = 1; target[b] = 2; var handler = { - ownKeys: function(t) { - _handler = this; - _target = t; - return Object.getOwnPropertySymbols(t); - } + ownKeys: function(t) { + _handler = this; + _target = t; + return Object.getOwnPropertySymbols(t); + } } var p = new Proxy(target, handler); 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 9ea0cdf6c..6723d9104 100644 --- a/test/built-ins/Proxy/ownKeys/call-parameters-object-keys.js +++ b/test/built-ins/Proxy/ownKeys/call-parameters-object-keys.js @@ -10,15 +10,15 @@ description: > var _target, _handler; var target = { - foo: 1, - bar: 2 + foo: 1, + bar: 2 }; var handler = { - ownKeys: function(t) { - _handler = this; - _target = t; - return Object.keys(t); - } + ownKeys: function(t) { + _handler = this; + _target = t; + return Object.keys(t); + } }; var p = new Proxy(target, handler); 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 3fc49524d..6c3cc745e 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 @@ -13,10 +13,12 @@ info: | a. Return trapResult. ---*/ -var p = new Proxy({attr: 42}, { - ownKeys: function() { - return ["foo", "bar"]; - } +var p = new Proxy({ + attr: 42 +}, { + ownKeys: function() { + return ["foo", "bar"]; + } }); var keys = Object.getOwnPropertyNames(p); 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 ad4073ac0..63b06910a 100644 --- a/test/built-ins/Proxy/ownKeys/extensible-return-trap-result.js +++ b/test/built-ins/Proxy/ownKeys/extensible-return-trap-result.js @@ -15,15 +15,15 @@ info: | var target = {}; Object.defineProperty(target, "foo", { - configurable: false, - enumerable: true, - value: true + configurable: false, + enumerable: true, + value: true }); var p = new Proxy(target, { - ownKeys: function() { - return ["foo", "bar"]; - } + ownKeys: function() { + return ["foo", "bar"]; + } }); var keys = Object.getOwnPropertyNames(p); 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 88b7b88a1..cb256baca 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 @@ -15,18 +15,18 @@ info: | ---*/ var target = { - foo: 1, - bar: 2 + foo: 1, + bar: 2 }; var p = new Proxy(target, { - ownKeys: function() { - return ["foo"]; - } + ownKeys: function() { + return ["foo"]; + } }); Object.preventExtensions(target); assert.throws(TypeError, function() { - Object.keys(p); + Object.keys(p); }); 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 22cc02791..fb6eddf5f 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 @@ -13,17 +13,17 @@ info: | ---*/ var target = { - foo: 1 + foo: 1 }; var p = new Proxy(target, { - ownKeys: function() { - return ["foo", "bar"]; - } + ownKeys: function() { + return ["foo", "bar"]; + } }); Object.preventExtensions(target); assert.throws(TypeError, function() { - Object.keys(p); + Object.keys(p); }); 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 f7d6832df..a491ffb6d 100644 --- a/test/built-ins/Proxy/ownKeys/not-extensible-return-keys.js +++ b/test/built-ins/Proxy/ownKeys/not-extensible-return-keys.js @@ -13,14 +13,14 @@ info: | ---*/ var target = { - foo: 1, - bar: 2 + foo: 1, + bar: 2 }; var p = new Proxy(target, { - ownKeys: function() { - return ["foo", "bar"]; - } + ownKeys: function() { + return ["foo", "bar"]; + } }); Object.preventExtensions(target); diff --git a/test/built-ins/Proxy/ownKeys/null-handler.js b/test/built-ins/Proxy/ownKeys/null-handler.js index e703ece13..653e1fc86 100644 --- a/test/built-ins/Proxy/ownKeys/null-handler.js +++ b/test/built-ins/Proxy/ownKeys/null-handler.js @@ -13,5 +13,5 @@ var p = Proxy.revocable({}, {}); p.revoke(); assert.throws(TypeError, function() { - Object.keys(p.proxy); + Object.keys(p.proxy); }); 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 70a898d5d..9cd1c90b4 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 @@ -16,21 +16,21 @@ info: | ---*/ var target = { - foo: 1 + foo: 1 }; Object.defineProperty(target, "attr", { - configurable: false, - enumerable: true, - value: true + configurable: false, + enumerable: true, + value: true }); var p = new Proxy(target, { - ownKeys: function() { - return ["foo"]; - } + ownKeys: function() { + return ["foo"]; + } }); assert.throws(TypeError, function() { - Object.keys(p); + Object.keys(p); }); diff --git a/test/built-ins/Proxy/ownKeys/return-is-abrupt.js b/test/built-ins/Proxy/ownKeys/return-is-abrupt.js index fd48e0f9c..405fbbfba 100644 --- a/test/built-ins/Proxy/ownKeys/return-is-abrupt.js +++ b/test/built-ins/Proxy/ownKeys/return-is-abrupt.js @@ -14,11 +14,11 @@ info: | ---*/ var p = new Proxy({}, { - ownKeys: function() { - throw new Test262Error(); - } + ownKeys: function() { + throw new Test262Error(); + } }); assert.throws(Test262Error, function() { - Object.keys(p); + Object.keys(p); }); 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 58d211c2f..45e22b3a0 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 @@ -22,11 +22,11 @@ features: [cross-realm, Symbol] var other = $262.createRealm().global; var p = new other.Proxy({}, { - ownKeys: function() { - return undefined; - } + ownKeys: function() { + return undefined; + } }); assert.throws(TypeError, function() { - Object.keys(p); + Object.keys(p); }); 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 2f0896491..c3bd07242 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 @@ -22,11 +22,11 @@ features: [Symbol] var target = {}; var p = new Proxy(target, { - ownKeys: function() { - return undefined; - } + ownKeys: function() { + return undefined; + } }); assert.throws(TypeError, function() { - Object.keys(p); + Object.keys(p); }); diff --git a/test/built-ins/Proxy/ownKeys/return-type-throws-array.js b/test/built-ins/Proxy/ownKeys/return-type-throws-array.js index e6f3a3aa2..78cc7335f 100644 --- a/test/built-ins/Proxy/ownKeys/return-type-throws-array.js +++ b/test/built-ins/Proxy/ownKeys/return-type-throws-array.js @@ -25,7 +25,9 @@ info: | var p = new Proxy({}, { ownKeys() { - return [[]]; + return [ + [] + ]; } }); 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 030d6b5e8..0eb431e7d 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 @@ -19,7 +19,9 @@ features: [cross-realm] ---*/ var OProxy = $262.createRealm().global.Proxy; -var p = new OProxy({attr:1}, { +var p = new OProxy({ + attr: 1 +}, { ownKeys: {} }); 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 6b95478ae..20ed2a8fd 100644 --- a/test/built-ins/Proxy/ownKeys/trap-is-not-callable.js +++ b/test/built-ins/Proxy/ownKeys/trap-is-not-callable.js @@ -16,10 +16,12 @@ info: | 4. If IsCallable(func) is false, throw a TypeError exception. ---*/ -var p = new Proxy({attr:1}, { - ownKeys: {} +var p = new Proxy({ + attr: 1 +}, { + ownKeys: {} }); assert.throws(TypeError, function() { - Object.keys(p); + Object.keys(p); }); diff --git a/test/built-ins/Proxy/ownKeys/trap-is-undefined.js b/test/built-ins/Proxy/ownKeys/trap-is-undefined.js index 2b9830262..3b42a49e1 100644 --- a/test/built-ins/Proxy/ownKeys/trap-is-undefined.js +++ b/test/built-ins/Proxy/ownKeys/trap-is-undefined.js @@ -9,8 +9,8 @@ description: > ---*/ var target = { - foo: 1, - bar: 2 + foo: 1, + bar: 2 }; var p = new Proxy(target, {}); |