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

Unified Diff: test/mjsunit/harmony/proxies-set-prototype-of.js

Issue 1680133002: [proxies] Implement spec change to consistency check in [[SetPrototypeOf]]. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months 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 | « src/objects.cc ('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-set-prototype-of.js
diff --git a/test/mjsunit/harmony/proxies-set-prototype-of.js b/test/mjsunit/harmony/proxies-set-prototype-of.js
index bc60ff492c45ea126f911e27fb35ffffe81cf0ee..810c219533996fd6ab6e324f8e7072bd27a1deaf 100644
--- a/test/mjsunit/harmony/proxies-set-prototype-of.js
+++ b/test/mjsunit/harmony/proxies-set-prototype-of.js
@@ -120,3 +120,11 @@ assertEquals({a:5}, seen_prototype);
prototype = [5];
assertThrows(() => {Reflect.setPrototypeOf(proxy2, prototype)}, TypeError);
})();
+
+(function testProxyTrapReturnsFalse() {
+ var handler = {};
+ handler.setPrototypeOf = () => false;
+ var target = new Proxy({}, {isExtensible: () => assertUnreachable()});
+ var object = new Proxy(target, handler);
+ assertFalse(Reflect.setPrototypeOf(object, {}));
+})();
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698