From d817076ddb3a015b831b5e2481f164c950b9e7b3 Mon Sep 17 00:00:00 2001
From: Thomas Wood <98555+IgnoredAmbience@users.noreply.github.com>
Date: Fri, 20 Jul 2018 23:40:10 +0100
Subject: [PATCH] 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.
---
 test/built-ins/Proxy/ownKeys/return-duplicate-entries-throws.js | 2 +-
 .../Proxy/ownKeys/return-duplicate-symbol-entries-throws.js     | 2 +-
 test/built-ins/Proxy/ownKeys/return-type-throws-array.js        | 2 +-
 test/built-ins/Proxy/ownKeys/return-type-throws-boolean.js      | 2 +-
 test/built-ins/Proxy/ownKeys/return-type-throws-null.js         | 2 +-
 test/built-ins/Proxy/ownKeys/return-type-throws-number.js       | 2 +-
 test/built-ins/Proxy/ownKeys/return-type-throws-object.js       | 2 +-
 test/built-ins/Proxy/ownKeys/return-type-throws-undefined.js    | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/built-ins/Proxy/ownKeys/return-duplicate-entries-throws.js b/test/built-ins/Proxy/ownKeys/return-duplicate-entries-throws.js
index 60ea647aa9..0585a0a405 100644
--- a/test/built-ins/Proxy/ownKeys/return-duplicate-entries-throws.js
+++ b/test/built-ins/Proxy/ownKeys/return-duplicate-entries-throws.js
@@ -12,7 +12,7 @@ info: |
 ---*/
 
 var p = new Proxy({}, {
-  ownKeys() {
+  ownKeys: function() {
     return ["a", "a"];
   }
 });
diff --git a/test/built-ins/Proxy/ownKeys/return-duplicate-symbol-entries-throws.js b/test/built-ins/Proxy/ownKeys/return-duplicate-symbol-entries-throws.js
index b3cddcc078..d264c94520 100644
--- a/test/built-ins/Proxy/ownKeys/return-duplicate-symbol-entries-throws.js
+++ b/test/built-ins/Proxy/ownKeys/return-duplicate-symbol-entries-throws.js
@@ -14,7 +14,7 @@ features: [Symbol]
 
 var s = Symbol();
 var p = new Proxy({}, {
-  ownKeys() {
+  ownKeys: function() {
     return [s, s];
   }
 });
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 78cc7335f9..1e74a418cc 100644
--- a/test/built-ins/Proxy/ownKeys/return-type-throws-array.js
+++ b/test/built-ins/Proxy/ownKeys/return-type-throws-array.js
@@ -24,7 +24,7 @@ info: |
 ---*/
 
 var p = new Proxy({}, {
-  ownKeys() {
+  ownKeys: function() {
     return [
       []
     ];
diff --git a/test/built-ins/Proxy/ownKeys/return-type-throws-boolean.js b/test/built-ins/Proxy/ownKeys/return-type-throws-boolean.js
index bf1aaa859f..bdc89b941e 100644
--- a/test/built-ins/Proxy/ownKeys/return-type-throws-boolean.js
+++ b/test/built-ins/Proxy/ownKeys/return-type-throws-boolean.js
@@ -24,7 +24,7 @@ info: |
 ---*/
 
 var p = new Proxy({}, {
-  ownKeys() {
+  ownKeys: function() {
     return [true];
   }
 });
diff --git a/test/built-ins/Proxy/ownKeys/return-type-throws-null.js b/test/built-ins/Proxy/ownKeys/return-type-throws-null.js
index c458d1590c..34abf804cb 100644
--- a/test/built-ins/Proxy/ownKeys/return-type-throws-null.js
+++ b/test/built-ins/Proxy/ownKeys/return-type-throws-null.js
@@ -24,7 +24,7 @@ info: |
 ---*/
 
 var p = new Proxy({}, {
-  ownKeys() {
+  ownKeys: function() {
     return [null];
   }
 });
diff --git a/test/built-ins/Proxy/ownKeys/return-type-throws-number.js b/test/built-ins/Proxy/ownKeys/return-type-throws-number.js
index 499da844c0..ffc6440f81 100644
--- a/test/built-ins/Proxy/ownKeys/return-type-throws-number.js
+++ b/test/built-ins/Proxy/ownKeys/return-type-throws-number.js
@@ -24,7 +24,7 @@ info: |
 ---*/
 
 var p = new Proxy({}, {
-  ownKeys() {
+  ownKeys: function() {
     return [1];
   }
 });
diff --git a/test/built-ins/Proxy/ownKeys/return-type-throws-object.js b/test/built-ins/Proxy/ownKeys/return-type-throws-object.js
index f7e9ca8486..221d777df3 100644
--- a/test/built-ins/Proxy/ownKeys/return-type-throws-object.js
+++ b/test/built-ins/Proxy/ownKeys/return-type-throws-object.js
@@ -24,7 +24,7 @@ info: |
 ---*/
 
 var p = new Proxy({}, {
-  ownKeys() {
+  ownKeys: function() {
     return [{}];
   }
 });
diff --git a/test/built-ins/Proxy/ownKeys/return-type-throws-undefined.js b/test/built-ins/Proxy/ownKeys/return-type-throws-undefined.js
index 3d24ae1294..aa3924d529 100644
--- a/test/built-ins/Proxy/ownKeys/return-type-throws-undefined.js
+++ b/test/built-ins/Proxy/ownKeys/return-type-throws-undefined.js
@@ -24,7 +24,7 @@ info: |
 ---*/
 
 var p = new Proxy({}, {
-  ownKeys() {
+  ownKeys: function() {
     return [undefined];
   }
 });
-- 
GitLab