summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/test_bug1034262.js
blob: 6bd598bd536f2274bc84c7f13258b08aeb5383b9 (plain)
1
2
3
4
5
6
7
8
function run_test() {
  var sb1 = Cu.Sandbox('http://www.example.com', { wantXrays: true });
  var sb2 = Cu.Sandbox('http://www.example.com', { wantXrays: false });
  sb2.f = Cu.evalInSandbox('x => typeof x', sb1);
  Assert.equal(Cu.evalInSandbox('f(dump)', sb2), 'function');
  Assert.equal(Cu.evalInSandbox('f.call(null, dump)', sb2), 'function');
  Assert.equal(Cu.evalInSandbox('f.apply(null, [dump])', sb2), 'function');
}