blob: d60d23a5baf8f159afa1a22cdc7cd16265541084 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
const Cu = Components.utils;
function run_test() {
var chromeSB = new Cu.Sandbox(this);
var contentSB = new Cu.Sandbox('http://www.example.com');
Cu.evalInSandbox('this.foo = {a: 2}', chromeSB);
contentSB.foo = chromeSB.foo;
do_check_eq(Cu.evalInSandbox('foo.a', contentSB), undefined, "Default deny with no __exposedProps__");
Cu.evalInSandbox('this.foo.__exposedProps__ = {a: "r"}', chromeSB);
do_check_eq(Cu.evalInSandbox('foo.a', contentSB), 2, "works with __exposedProps__");
}
|