Index: test/mjsunit/harmony/proxies.js |
diff --git a/test/mjsunit/harmony/proxies.js b/test/mjsunit/harmony/proxies.js |
index 50c8613b6390c15f15b1245b5e33a9f65fd46c4b..8d8f83996e255832168fa0c3c5a2d3f117888cb8 100644 |
--- a/test/mjsunit/harmony/proxies.js |
+++ b/test/mjsunit/harmony/proxies.js |
@@ -2257,3 +2257,22 @@ TestIsEnumerableThrow(Proxy.create({ |
return function(k) { throw "myexn" } |
} |
})) |
+ |
+ |
+ |
+// Constructor functions with proxy prototypes. |
+ |
+function TestConstructorWithProxyPrototype() { |
+ TestWithProxies(TestConstructorWithProxyPrototype2, {}) |
+} |
+ |
+function TestConstructorWithProxyPrototype2(create, handler) { |
+ function C() {}; |
+ C.prototype = create(handler); |
+ |
+ var o = new C; |
+ assertSame(C.prototype, o.__proto__); |
+ assertSame(C.prototype, Object.getPrototypeOf(o)); |
+} |
+ |
+TestConstructorWithProxyPrototype(); |