4 function check_wrapper(ok
, wrapper
, expected
, note
) {
5 let { getClassName
} = SpecialPowers
.unwrap(
6 SpecialPowers
.wrap(window
).ChromeUtils
8 ok(getClassName(wrapper
, false) === expected
, note
);
10 function run_test(ok
, xpcnw
, sjow
) {
11 // both wrappers should point to our window: XOW
12 check_wrapper(ok
, ok
, "Proxy", "functions are wrapped properly");
13 check_wrapper(ok
, xpcnw
, "Proxy", "XPCNWs are transformed correctly");
14 check_wrapper(ok
, sjow
, "Proxy", "SJOWs are transformed correctly");
16 check_wrapper(ok
, window
.location
, "Location",
17 "same-compartment security wrappers are gone");
19 ok(defprop1
=== 1, "defprop1 exists");
21 ok(defprop1
=== 2, "defprop1 is properly writable");
23 // defprop2 = {}; disabled because the test doesn't work