зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1667455 - Part 18: Always use SpecialPowers.Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D150907
This commit is contained in:
Родитель
5e5a4576f6
Коммит
84a0cb6874
|
@ -35,9 +35,7 @@ var gStringBundle;
|
||||||
|
|
||||||
W3CTest.runner.requestLongerTimeout(2);
|
W3CTest.runner.requestLongerTimeout(2);
|
||||||
|
|
||||||
const { Services } = SpecialPowers.ChromeUtils.import(
|
const Services = SpecialPowers.Services;
|
||||||
"resource://gre/modules/Services.jsm"
|
|
||||||
);
|
|
||||||
Services.locale.requestedLocales = ["en-US"];
|
Services.locale.requestedLocales = ["en-US"];
|
||||||
|
|
||||||
SpecialPowers.pushPrefEnv({ "set": [
|
SpecialPowers.pushPrefEnv({ "set": [
|
||||||
|
|
|
@ -9,9 +9,7 @@
|
||||||
|
|
||||||
createHTML({title: "Detect screensharing sources that are firefox", bug: "1311048"});
|
createHTML({title: "Detect screensharing sources that are firefox", bug: "1311048"});
|
||||||
|
|
||||||
const { Services } = SpecialPowers.ChromeUtils.import(
|
const Services = SpecialPowers.Services;
|
||||||
'resource://gre/modules/Services.jsm'
|
|
||||||
);
|
|
||||||
|
|
||||||
let observe = topic => new Promise(r => Services.obs.addObserver(function o(...args) {
|
let observe = topic => new Promise(r => Services.obs.addObserver(function o(...args) {
|
||||||
Services.obs.removeObserver(o, topic);
|
Services.obs.removeObserver(o, topic);
|
||||||
|
|
|
@ -16,9 +16,7 @@ var errorCodes = {
|
||||||
LANGUAGE_NOT_SUPPORTED: "language-not-supported",
|
LANGUAGE_NOT_SUPPORTED: "language-not-supported",
|
||||||
};
|
};
|
||||||
|
|
||||||
var { Services } = SpecialPowers.ChromeUtils.import(
|
var Services = SpecialPowers.Services;
|
||||||
"resource://gre/modules/Services.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
function EventManager(sr) {
|
function EventManager(sr) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
const { LoginTestUtils } = SpecialPowers.ChromeUtils.import(
|
const { LoginTestUtils } = SpecialPowers.ChromeUtils.import(
|
||||||
"resource://testing-common/LoginTestUtils.jsm"
|
"resource://testing-common/LoginTestUtils.jsm"
|
||||||
);
|
);
|
||||||
const { Services } = SpecialPowers.ChromeUtils.import(
|
const Services = SpecialPowers.Services;
|
||||||
"resource://gre/modules/Services.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
// Setup LoginTestUtils to report assertions to the mochitest harness.
|
// Setup LoginTestUtils to report assertions to the mochitest harness.
|
||||||
LoginTestUtils.setAssertReporter(
|
LoginTestUtils.setAssertReporter(
|
||||||
|
|
|
@ -15,10 +15,6 @@ Prompter tests: modal prompts
|
||||||
|
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script class="testbody" type="text/javascript">
|
<script class="testbody" type="text/javascript">
|
||||||
const { Services } = SpecialPowers.ChromeUtils.import(
|
|
||||||
"resource://gre/modules/Services.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
function checkPromptState(promptState, expectedState) {
|
function checkPromptState(promptState, expectedState) {
|
||||||
// XXX check title? OS X has title in content
|
// XXX check title? OS X has title in content
|
||||||
// XXX check focused element
|
// XXX check focused element
|
||||||
|
|
|
@ -16,9 +16,7 @@
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
const { Services } = SpecialPowers.ChromeUtils.import(
|
const Services = SpecialPowers.Services;
|
||||||
"resource://gre/modules/Services.jsm"
|
|
||||||
);
|
|
||||||
const { AppConstants } = SpecialPowers.ChromeUtils.import(
|
const { AppConstants } = SpecialPowers.ChromeUtils.import(
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
"resource://gre/modules/AppConstants.jsm"
|
||||||
);
|
);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче