summaryrefslogtreecommitdiffstats
path: root/dom/tests/unit/test_xhr_init.js
blob: e3f860bdfcf8e35de39f5fe8bcfafdc03b46755f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function run_test()
{
    Components.utils.importGlobalProperties(["XMLHttpRequest"]);

    var x = new XMLHttpRequest({mozAnon: true, mozSystem: false});
    do_check_true(x.mozAnon);
    do_check_true(x.mozSystem); // Because we're system principal

    x = new XMLHttpRequest({mozAnon: true});
    do_check_true(x.mozAnon);
    do_check_true(x.mozSystem);

    x = new XMLHttpRequest();
    do_check_false(x.mozAnon);
    do_check_true(x.mozSystem);
}