summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_bug742444.js
blob: 3b8262834fee0becaa2efeb3db5391de613f8912 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function run_test() {
  let sb1A = Cu.Sandbox('http://www.example.com');
  let sb1B = Cu.Sandbox('http://www.example.com');
  let sb2 = Cu.Sandbox('http://www.example.org');
  let sbChrome = Cu.Sandbox(this);
  let obj = new sb1A.Object();
  sb1B.obj = obj;
  sb1B.waived = Cu.waiveXrays(obj);
  sb2.obj = obj;
  sb2.waived = Cu.waiveXrays(obj);
  sbChrome.obj = obj;
  sbChrome.waived = Cu.waiveXrays(obj);
  Assert.ok(Cu.evalInSandbox('obj === waived', sb1B));
  Assert.ok(Cu.evalInSandbox('obj === waived', sb2));
  Assert.ok(Cu.evalInSandbox('obj !== waived', sbChrome));
}