diff options
Diffstat (limited to 'js/src/jit-test/tests/cacheir/typeof-proxy.js')
-rw-r--r-- | js/src/jit-test/tests/cacheir/typeof-proxy.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/cacheir/typeof-proxy.js b/js/src/jit-test/tests/cacheir/typeof-proxy.js new file mode 100644 index 0000000000..0f97da9e2d --- /dev/null +++ b/js/src/jit-test/tests/cacheir/typeof-proxy.js @@ -0,0 +1,19 @@ +function test() { + var funs = [function() {}, new Proxy(function() {}, {}), wrapWithProto(function() {}, null), new Proxy(createIsHTMLDDA(), {})]; + var objects = [{}, new Proxy({}, {}), wrapWithProto({}, null)]; + var undefs = [createIsHTMLDDA(), wrapWithProto(createIsHTMLDDA(), null)]; + + for (var fun of funs) { + assertEq(typeof fun, "function") + } + + for (var obj of objects) { + assertEq(typeof obj, "object"); + } + + for (var undef of undefs) { + assertEq(typeof undef, "undefined"); + } +} + +test(); |