зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1082843. Don't import Promise.jsm into the global scope in xpcshell tests. r=yoric
This commit is contained in:
Родитель
3daa14b33f
Коммит
427f80e0de
|
@ -8,6 +8,7 @@ Cu.import("resource://gre/modules/Services.jsm");
|
|||
Cu.import("resource://gre/modules/Http.jsm");
|
||||
Cu.import("resource://testing-common/httpd.js");
|
||||
Cu.import("resource:///modules/loop/MozLoopService.jsm");
|
||||
Cu.import("resource://gre/modules/Promise.jsm");
|
||||
const { MozLoopServiceInternal } = Cu.import("resource:///modules/loop/MozLoopService.jsm", {});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "MozLoopPushHandler",
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
const TEST_ORIGIN = "example.org";
|
||||
const TEST_ORIGIN_2 = "example.com";
|
||||
const TEST_PERMISSION = "test-permission";
|
||||
Components.utils.import("resource://gre/modules/Promise.jsm");
|
||||
|
||||
function promiseTimeout(delay) {
|
||||
let deferred = Promise.defer();
|
||||
|
|
|
@ -23,7 +23,7 @@ var _profileInitialized = false;
|
|||
// modules.
|
||||
_register_modules_protocol_handler();
|
||||
|
||||
let _Promise = Components.utils.import("resource://gre/modules/Promise.jsm", this).Promise;
|
||||
let _Promise = Components.utils.import("resource://gre/modules/Promise.jsm", {}).Promise;
|
||||
|
||||
// Support a common assertion library, Assert.jsm.
|
||||
let AssertCls = Components.utils.import("resource://testing-common/Assert.jsm", null).Assert;
|
||||
|
|
|
@ -13,6 +13,7 @@ Cu.import("resource://gre/modules/Sqlite.jsm");
|
|||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/AsyncShutdown.jsm");
|
||||
Cu.import("resource://gre/modules/Promise.jsm");
|
||||
|
||||
function getConnection(dbName, extraOptions={}) {
|
||||
let path = dbName + ".sqlite";
|
||||
|
|
Загрузка…
Ссылка в новой задаче