Bug 1667455 - Part 18: Always use SpecialPowers.Services. r=kmag

Differential Revision: https://phabricator.services.mozilla.com/D150907
This commit is contained in:
Tooru Fujisawa 2022-07-11 12:41:56 +00:00
Родитель 5e5a4576f6
Коммит 84a0cb6874
6 изменённых файлов: 5 добавлений и 19 удалений

Просмотреть файл

@ -35,9 +35,7 @@ var gStringBundle;
W3CTest.runner.requestLongerTimeout(2);
const { Services } = SpecialPowers.ChromeUtils.import(
"resource://gre/modules/Services.jsm"
);
const Services = SpecialPowers.Services;
Services.locale.requestedLocales = ["en-US"];
SpecialPowers.pushPrefEnv({ "set": [

Просмотреть файл

@ -9,9 +9,7 @@
createHTML({title: "Detect screensharing sources that are firefox", bug: "1311048"});
const { Services } = SpecialPowers.ChromeUtils.import(
'resource://gre/modules/Services.jsm'
);
const Services = SpecialPowers.Services;
let observe = topic => new Promise(r => Services.obs.addObserver(function o(...args) {
Services.obs.removeObserver(o, topic);

Просмотреть файл

@ -16,9 +16,7 @@ var errorCodes = {
LANGUAGE_NOT_SUPPORTED: "language-not-supported",
};
var { Services } = SpecialPowers.ChromeUtils.import(
"resource://gre/modules/Services.jsm"
);
var Services = SpecialPowers.Services;
function EventManager(sr) {
var self = this;

Просмотреть файл

@ -7,9 +7,7 @@
const { LoginTestUtils } = SpecialPowers.ChromeUtils.import(
"resource://testing-common/LoginTestUtils.jsm"
);
const { Services } = SpecialPowers.ChromeUtils.import(
"resource://gre/modules/Services.jsm"
);
const Services = SpecialPowers.Services;
// Setup LoginTestUtils to report assertions to the mochitest harness.
LoginTestUtils.setAssertReporter(

Просмотреть файл

@ -15,10 +15,6 @@ Prompter tests: modal prompts
<pre id="test">
<script class="testbody" type="text/javascript">
const { Services } = SpecialPowers.ChromeUtils.import(
"resource://gre/modules/Services.jsm"
);
function checkPromptState(promptState, expectedState) {
// XXX check title? OS X has title in content
// XXX check focused element

Просмотреть файл

@ -16,9 +16,7 @@
SimpleTest.waitForExplicitFinish();
const { Services } = SpecialPowers.ChromeUtils.import(
"resource://gre/modules/Services.jsm"
);
const Services = SpecialPowers.Services;
const { AppConstants } = SpecialPowers.ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);