1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 add_task(async function testShared() {
6 const ns1 = ChromeUtils.importESModule("resource://test/esmified-1.sys.mjs");
8 const ns2 = ChromeUtils.importESModule("resource://test/esmified-1.sys.mjs", {
12 Assert.equal(ns1, ns2);
13 Assert.equal(ns1.obj, ns2.obj);
16 add_task(async function testDevTools() {
17 const ns1 = ChromeUtils.importESModule("resource://test/esmified-1.sys.mjs");
19 const ns2 = ChromeUtils.importESModule("resource://test/esmified-1.sys.mjs", {
23 Assert.notEqual(ns1, ns2);
24 Assert.notEqual(ns1.obj, ns2.obj);
27 add_task(async function testInvalidOptions() {
28 // Unknown value is rejected.
30 ChromeUtils.importESModule("resource://test/esmified-1.sys.mjs", {
36 ChromeUtils.importESModule("resource://test/esmified-1.sys.mjs", {
41 // Unknown name is ignored.
42 ChromeUtils.importESModule("resource://test/esmified-1.sys.mjs", {