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

Unified Diff: test/mjsunit/harmony/proxies-define-property.js

Issue 1517463002: [runtime] [proxies] adding tests for uncovered branches (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: dropping mips changes Created 5 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 | « src/objects.cc ('k') | test/mjsunit/harmony/proxies-enumerate.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/proxies-define-property.js
diff --git a/test/mjsunit/harmony/proxies-define-property.js b/test/mjsunit/harmony/proxies-define-property.js
index f302db2621aa75e45c1533d2fd4169b2af9a1761..27f23be1734946a1355ad0614bae1d3376906215 100644
--- a/test/mjsunit/harmony/proxies-define-property.js
+++ b/test/mjsunit/harmony/proxies-define-property.js
@@ -23,7 +23,16 @@ assertSame(target, g_target);
assertEquals("foo", g_name);
assertEquals(desc, g_desc);
-// Check specific steps in the spec:
+// Check specific steps in the spec
+
+// Step 4: revoked handler
+var pair = Proxy.revocable(target, handler);
+Object.defineProperty(proxy, "foo2", desc);
+assertSame(target, g_target);
+assertEquals("foo2", g_name);
+assertEquals(desc, g_desc);
+pair.revoke();
+assertThrows('Object.defineProperty(pair.proxy, "bar", desc);', TypeError);
// Step 6: Trap isn't callable.
handler.defineProperty = 1;
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/harmony/proxies-enumerate.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698