mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 22:15:24 +02:00
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.
This commit is contained in:
parent
4f3cbc756d
commit
d817076ddb
@ -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]
|
|||||||
|
|
||||||
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: |
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
var p = new Proxy({}, {
|
var p = new Proxy({}, {
|
||||||
ownKeys() {
|
ownKeys: function() {
|
||||||
return [
|
return [
|
||||||
[]
|
[]
|
||||||
];
|
];
|
||||||
|
@ -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: |
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
var p = new Proxy({}, {
|
var p = new Proxy({}, {
|
||||||
ownKeys() {
|
ownKeys: function() {
|
||||||
return [null];
|
return [null];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -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: |
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
var p = new Proxy({}, {
|
var p = new Proxy({}, {
|
||||||
ownKeys() {
|
ownKeys: function() {
|
||||||
return [{}];
|
return [{}];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -24,7 +24,7 @@ info: |
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
var p = new Proxy({}, {
|
var p = new Proxy({}, {
|
||||||
ownKeys() {
|
ownKeys: function() {
|
||||||
return [undefined];
|
return [undefined];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user