summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/cacheir/typeof-proxy.js
blob: 0f97da9e2db209be4e06b1b9b9184a7aadef5e2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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();