Bug 792036 - Fix sandbox xpcshell tests. r=gabor

I want gabor to look at these.
This commit is contained in:
Bobby Holley 2012-09-24 14:46:28 +02:00
parent 4d82dab5b4
commit 4c9f632b1a
2 changed files with 7 additions and 1 deletions

View File

@ -41,6 +41,7 @@ function run_test() {
evalAndCatch("objMaster.prop1", sbSubset);
// Bug 777705:
sbMaster.Components = cu.getComponentsForScope(sbMaster);
Components.utils.evalInSandbox("Components.interfaces", sbMaster);
do_check_true(true);
}

View File

@ -6,6 +6,11 @@ function run_test() {
var sb4 = Cu.Sandbox("http://www.other.com");
var rv;
// Components is normally hidden from content on the XBL scope chain, but we
// expose it to content here to make sure that the security wrappers work
// regardless.
[sb1, sb2, sb4].forEach(function(x) { x.Components = Cu.getComponentsForScope(x); });
// non-chrome accessing chrome Components
sb1.C = Components;
rv = Cu.evalInSandbox("C.utils", sb1);
@ -40,4 +45,4 @@ function run_test() {
rv = Cu.evalInSandbox("C2.utils", sb1);
do_check_eq(rv, undefined);
}
}