diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/proxy/function-toString.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/proxy/function-toString.js b/js/src/jit-test/tests/proxy/function-toString.js new file mode 100644 index 0000000000..4aca5c907e --- /dev/null +++ b/js/src/jit-test/tests/proxy/function-toString.js @@ -0,0 +1,10 @@ +load(libdir + 'asserts.js'); + +var nativeCode = "function () {\n [native code]\n}"; + +var proxy = new Proxy(function() {}, {}); +assertEq(Function.prototype.toString.call(proxy), nativeCode); +var o = Proxy.revocable(function() {}, {}); +assertEq(Function.prototype.toString.call(o.proxy), nativeCode); +o.revoke(); +assertEq(Function.prototype.toString.call(o.proxy), nativeCode); |