Bug 1667455 - Part 21: Use SpecialPowers.Services in docshell/test/navigation/test_contentpolicy_block_window.html. r=kmag

Differential Revision: https://phabricator.services.mozilla.com/D150912
This commit is contained in:
Tooru Fujisawa 2022-07-11 12:41:57 +00:00
parent af81b5300a
commit 9fe5b851ea

View file

@ -24,15 +24,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1329288
* gets called with the right (a non null) 'context' for the TYPE_DOCUMENT load.
*/
// Services.jsm is disabled as ChromeUtils appears to be out of scope
/* eslint-disable mozilla/use-services */
const Cc = SpecialPowers.Cc;
const Ci = SpecialPowers.Ci;
var categoryManager = Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
var componentManager = SpecialPowers.wrap(SpecialPowers.Components).manager
.QueryInterface(Ci.nsIComponentRegistrar);
var categoryManager = SpecialPowers.Services.catMan;
var componentManager = SpecialPowers.Components.manager
.QueryInterface(Ci.nsIComponentRegistrar);
// Content policy / factory implementation for the test
var policyID = SpecialPowers.wrap(SpecialPowers.Components).ID("{b80e19d0-878f-d41b-2654-194714a4115c}");