Bug 1501644 - Update test to check if content sees shimmed window.controllers in beta and release r=bholley

Differential Revision: https://phabricator.services.mozilla.com/D9896

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sebastian Hengst 2018-10-26 15:57:01 +00:00
parent 3466aa268a
commit 06798ac084

View File

@ -18,8 +18,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=912322
ok(f in SpecialPowers.wrap(document), f + " should be available to chrome via Xray");
}
var {AppConstants} = SpecialPowers.Cu.import("resource://gre/modules/AppConstants.jsm", {});
// Test window.controllers.
is(typeof window.controllers, 'undefined', "controllers should not be available to content");
if (AppConstants.RELEASE_OR_BETA) {
is(typeof window.controllers, 'object', "shimmed controllers should be available to content in beta and release");
} else {
is(typeof window.controllers, 'undefined', "controllers should not be available to content in Nightly");
}
is(typeof SpecialPowers.wrap(window).controllers, 'object', "controllers should be available over Xray");
</script>