forked from mirrors/gecko-dev
Bug 1766238 - Stop using the target argument for ChromeUtils.import in OSFile tests. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D144556
This commit is contained in:
parent
83a6b29109
commit
7da4eba9e8
2 changed files with 8 additions and 5 deletions
|
|
@ -20,8 +20,11 @@ SpecialPowers.pushPrefEnv({"set": [["security.allow_eval_with_system_principal",
|
|||
true]]});
|
||||
let test = function test() {
|
||||
SimpleTest.info("test_osfile_comms.xhtml: Starting test");
|
||||
ChromeUtils.import("resource://gre/modules/ctypes.jsm", window);
|
||||
ChromeUtils.import("resource://gre/modules/osfile.jsm", window);
|
||||
// These are used in the worker.
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
let { ctypes } = ChromeUtils.import("resource://gre/modules/ctypes.jsm");
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
let { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||
worker = new ChromeWorker("worker_test_osfile_comms.js");
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -178,11 +178,11 @@ function run_test() {
|
|||
);
|
||||
|
||||
info("Testing the presence of ospath.jsm");
|
||||
let Scope = {};
|
||||
let scope;
|
||||
try {
|
||||
ChromeUtils.import("resource://gre/modules/osfile/ospath.jsm", Scope);
|
||||
scope = ChromeUtils.import("resource://gre/modules/osfile/ospath.jsm");
|
||||
} catch (ex) {
|
||||
// Can't load ospath
|
||||
}
|
||||
Assert.ok(!!Scope.basename);
|
||||
Assert.ok(!!scope.basename);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue