summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_bug742444.js
blob: 8d8b5643ae30e31fa7225b990932a91e2dbc8ee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const Cu = Components.utils;
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);
  do_check_true(Cu.evalInSandbox('obj === waived', sb1B));
  do_check_true(Cu.evalInSandbox('obj === waived', sb2));
  do_check_true(Cu.evalInSandbox('obj !== waived', sbChrome));
}