Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1738)

Unified Diff: test/mjsunit/harmony/proxies-with-unscopables.js

Issue 807893002: ES6: Update unscopables to match spec (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/unscopables.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/proxies-with-unscopables.js
diff --git a/test/mjsunit/harmony/proxies-with-unscopables.js b/test/mjsunit/harmony/proxies-with-unscopables.js
index 191bad301e3105b16d8cfa0b9c30439e3aaf265f..8a03ef481eeb2a074d07b24c92c17a6b74291f4a 100644
--- a/test/mjsunit/harmony/proxies-with-unscopables.js
+++ b/test/mjsunit/harmony/proxies-with-unscopables.js
@@ -74,12 +74,17 @@ function TestUseProxyAsUnscopables() {
var calls = 0;
var proxy = Proxy.create({
has: function(key) {
- calls++;
- assertEquals('x', key);
- return calls === 2;
+ assertUnreachable();
},
getPropertyDescriptor: function(key) {
- assertUnreachable();
+ calls++;
+ assertEquals('x', key);
+ return {
+ value: calls === 2 ? true : undefined,
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ };
}
});
@@ -107,12 +112,12 @@ function TestThrowInHasUnscopables() {
var calls = 0;
var proxy = Proxy.create({
has: function(key) {
- if (calls++ === 0) {
- throw new CustomError();
- }
assertUnreachable();
},
getPropertyDescriptor: function(key) {
+ if (calls++ === 0) {
+ throw new CustomError();
+ }
assertUnreachable();
}
});
« no previous file with comments | « test/mjsunit/es6/unscopables.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698