blob: a77df56a98b175a5f7318ff04c52e0e678b93f46 (
plain)
1
2
3
4
5
6
7
8
9
|
const Cu = Components.utils;
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);
do_check_eq(Cu.evalInSandbox('f(dump)', sb2), 'function');
do_check_eq(Cu.evalInSandbox('f.call(null, dump)', sb2), 'function');
do_check_eq(Cu.evalInSandbox('f.apply(null, [dump])', sb2), 'function');
}
|