Skip to content
Snippets Groups Projects
Commit d817076d authored by Thomas Wood's avatar Thomas Wood Committed by Leo Balter
Browse files

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.
parent 4f3cbc75
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ info: | ...@@ -12,7 +12,7 @@ info: |
---*/ ---*/
var p = new Proxy({}, { var p = new Proxy({}, {
ownKeys() { ownKeys: function() {
return ["a", "a"]; return ["a", "a"];
} }
}); });
......
...@@ -14,7 +14,7 @@ features: [Symbol] ...@@ -14,7 +14,7 @@ features: [Symbol]
var s = Symbol(); var s = Symbol();
var p = new Proxy({}, { var p = new Proxy({}, {
ownKeys() { ownKeys: function() {
return [s, s]; return [s, s];
} }
}); });
......
...@@ -24,7 +24,7 @@ info: | ...@@ -24,7 +24,7 @@ info: |
---*/ ---*/
var p = new Proxy({}, { var p = new Proxy({}, {
ownKeys() { ownKeys: function() {
return [ return [
[] []
]; ];
......
...@@ -24,7 +24,7 @@ info: | ...@@ -24,7 +24,7 @@ info: |
---*/ ---*/
var p = new Proxy({}, { var p = new Proxy({}, {
ownKeys() { ownKeys: function() {
return [true]; return [true];
} }
}); });
......
...@@ -24,7 +24,7 @@ info: | ...@@ -24,7 +24,7 @@ info: |
---*/ ---*/
var p = new Proxy({}, { var p = new Proxy({}, {
ownKeys() { ownKeys: function() {
return [null]; return [null];
} }
}); });
......
...@@ -24,7 +24,7 @@ info: | ...@@ -24,7 +24,7 @@ info: |
---*/ ---*/
var p = new Proxy({}, { var p = new Proxy({}, {
ownKeys() { ownKeys: function() {
return [1]; return [1];
} }
}); });
......
...@@ -24,7 +24,7 @@ info: | ...@@ -24,7 +24,7 @@ info: |
---*/ ---*/
var p = new Proxy({}, { var p = new Proxy({}, {
ownKeys() { ownKeys: function() {
return [{}]; return [{}];
} }
}); });
......
...@@ -24,7 +24,7 @@ info: | ...@@ -24,7 +24,7 @@ info: |
---*/ ---*/
var p = new Proxy({}, { var p = new Proxy({}, {
ownKeys() { ownKeys: function() {
return [undefined]; return [undefined];
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment