Backed out changeset 713114c0331a (bug 1938707) by developer request CLOSED TREE
[gecko.git] / js / xpconnect / tests / unit / test_bug742444.js
blob3b8262834fee0becaa2efeb3db5391de613f8912
1 function run_test() {
2   let sb1A = Cu.Sandbox('http://www.example.com');
3   let sb1B = Cu.Sandbox('http://www.example.com');
4   let sb2 = Cu.Sandbox('http://www.example.org');
5   let sbChrome = Cu.Sandbox(this);
6   let obj = new sb1A.Object();
7   sb1B.obj = obj;
8   sb1B.waived = Cu.waiveXrays(obj);
9   sb2.obj = obj;
10   sb2.waived = Cu.waiveXrays(obj);
11   sbChrome.obj = obj;
12   sbChrome.waived = Cu.waiveXrays(obj);
13   Assert.ok(Cu.evalInSandbox('obj === waived', sb1B));
14   Assert.ok(Cu.evalInSandbox('obj === waived', sb2));
15   Assert.ok(Cu.evalInSandbox('obj !== waived', sbChrome));