Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / mochitest / chrome_wrappers_helper.html
bloba0c1ec87e37594b50f622d4d1ba164e9077117c9
1 <html>
2 <head>
3 <script>
4 function check_wrapper(ok, wrapper, expected, note) {
5 let { getClassName } = SpecialPowers.unwrap(
6 SpecialPowers.wrap(window).ChromeUtils
7 );
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");
20 window.defprop1 = 2;
21 ok(defprop1 === 2, "defprop1 is properly writable");
23 // defprop2 = {}; disabled because the test doesn't work
25 </script>
26 </head>
27 <body>
28 </body>
29 </html>