summaryrefslogtreecommitdiffstats
path: root/dom/tests/unit/test_xhr_init.js
blob: a2eaf2b4d727f8445b1e1742ac284cd5ca8e66d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function run_test() {
  var x = new XMLHttpRequest({ mozAnon: true, mozSystem: false });
  Assert.ok(x.mozAnon);
  Assert.ok(x.mozSystem); // Because we're system principal

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

  x = new XMLHttpRequest();
  Assert.ok(!x.mozAnon);
  Assert.ok(x.mozSystem);
}