Backed out 6 changesets (bug 1857866) for causing mochitest failures in test_bug403852.html CLOSED TREE

Backed out changeset d3a20047a9d3 (bug 1857866)
Backed out changeset ac8e95c253a9 (bug 1857866)
Backed out changeset c2d4c9575248 (bug 1857866)
Backed out changeset 521a5e8cb17e (bug 1857866)
Backed out changeset 8d812ea48f5c (bug 1857866)
Backed out changeset de9146469632 (bug 1857866)
This commit is contained in:
Noemi Erli 2023-10-13 00:27:57 +03:00
parent 8276d87978
commit e5c9fdc125
30 changed files with 120 additions and 87 deletions

View File

@ -433,7 +433,9 @@ module.exports = {
"consistent-return": "off",
"mozilla/avoid-removeChild": "off",
"mozilla/consistent-if-bracing": "off",
"mozilla/no-arbitrary-setTimeout": "off",
"mozilla/no-compare-against-boolean-literals": "off",
"mozilla/reject-importGlobalProperties": "off",
"mozilla/use-includes-instead-of-indexOf": "off",
"mozilla/use-ownerGlobal": "off",
"mozilla/use-services": "off",
@ -457,6 +459,7 @@ module.exports = {
"no-self-compare": "off",
"no-sequences": "off",
"no-shadow": "off",
"no-shadow-restricted-names": "off",
"no-sparse-arrays": "off",
"no-throw-literal": "off",
"no-unreachable": "off",
@ -515,27 +518,52 @@ module.exports = {
},
{
files: [
"dom/base/test/chrome/file_bug1139964.xhtml",
"dom/base/test/chrome/file_bug549682.xhtml",
"dom/base/test/chrome/file_bug616841.xhtml",
"dom/base/test/chrome/file_bug990812-1.xhtml",
"dom/base/test/chrome/file_bug990812-2.xhtml",
"dom/base/test/chrome/file_bug990812-3.xhtml",
"dom/base/test/chrome/file_bug990812-4.xhtml",
"dom/base/test/chrome/file_bug990812-5.xhtml",
"dom/base/test/chrome/file_bug990812.xhtml",
"dom/base/test/chrome/test_bug1098074_throw_from_ReceiveMessage.xhtml",
"dom/base/test/chrome/test_bug339494.xhtml",
"dom/base/test/chrome/test_bug429785.xhtml",
"dom/base/test/chrome/test_bug467123.xhtml",
"dom/base/test/chrome/test_bug683852.xhtml",
"dom/base/test/chrome/test_bug780529.xhtml",
"dom/base/test/chrome/test_bug800386.xhtml",
"dom/base/test/chrome/test_bug884693.xhtml",
"dom/base/test/chrome/test_document-element-inserted.xhtml",
"dom/base/test/chrome/test_domparsing.xhtml",
"dom/base/test/chrome/title_window.xhtml",
"dom/base/test/chrome/window_nsITextInputProcessor.xhtml",
"dom/base/test/chrome/window_swapFrameLoaders.xhtml",
"dom/base/test/test_domrequesthelper.xhtml",
"dom/bindings/test/test_bug1123516_maplikesetlikechrome.xhtml",
"dom/console/tests/test_jsm.xhtml",
"dom/events/test/test_bug1412775.xhtml",
"dom/events/test/test_bug336682_2.xhtml",
"dom/events/test/test_bug415498.xhtml",
"dom/events/test/test_bug602962.xhtml",
"dom/events/test/test_bug617528.xhtml",
"dom/events/test/test_bug679494.xhtml",
"dom/indexedDB/test/test_globalObjects_chrome.xhtml",
"dom/indexedDB/test/test_wrappedArray.xhtml",
"dom/ipc/tests/test_process_error.xhtml",
"dom/notification/test/chrome/test_notification_system_principal.xhtml",
"dom/security/test/general/test_bug1277803.xhtml",
"dom/serviceworkers/test/test_serviceworkerinfo.xhtml",
"dom/serviceworkers/test/test_serviceworkermanager.xhtml",
"dom/system/tests/test_constants.xhtml",
"dom/tests/mochitest/chrome/DOMWindowCreated_chrome.xhtml",
"dom/tests/mochitest/chrome/MozDomFullscreen_chrome.xhtml",
"dom/tests/mochitest/chrome/sizemode_attribute.xhtml",
"dom/tests/mochitest/chrome/test_cyclecollector.xhtml",
"dom/tests/mochitest/chrome/test_docshell_swap.xhtml",
"dom/tests/mochitest/chrome/window_focus.xhtml",
"dom/url/tests/test_bug883784.xhtml",
"dom/workers/test/test_WorkerDebugger.xhtml",
"dom/workers/test/test_WorkerDebugger_console.xhtml",
"dom/workers/test/test_fileReadSlice.xhtml",
@ -543,8 +571,13 @@ module.exports = {
"dom/workers/test/test_fileSlice.xhtml",
],
rules: {
"mozilla/no-useless-parameters": "off",
"mozilla/no-useless-removeEventListener": "off",
"mozilla/use-services": "off",
complexity: "off",
"no-array-constructor": "off",
"no-caller": "off",
"no-empty": "off",
"no-lone-blocks": "off",
"no-redeclare": "off",
"no-shadow": "off",

View File

@ -1,5 +1,7 @@
/* eslint-env mozilla/chrome-script */
Cu.importGlobalProperties(["File"]);
var testFile = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIDirectoryService)
.QueryInterface(Ci.nsIProperties)

View File

@ -1,7 +1,6 @@
/* eslint-env mozilla/chrome-script */
var file;
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
addMessageListener("file.create", function (message) {

View File

@ -69,9 +69,9 @@
function listener3(ev) {
inProgressWin[description] = false;
}
frame.addEventListener("DOMTitleChanged", listener);
frame.contentDocument.addEventListener("DOMTitleChanged", listener2);
frame.contentWindow.addEventListener("DOMTitleChanged", listener3);
frame.addEventListener("DOMTitleChanged", listener, false);
frame.contentDocument.addEventListener("DOMTitleChanged", listener2, false);
frame.contentWindow.addEventListener("DOMTitleChanged", listener3, false);
op(frame.contentDocument);
}

View File

@ -207,10 +207,10 @@ function runBeginInputTransactionMethodTests()
var events = [];
input.addEventListener("compositionstart", function (aEvent) {
events.push(aEvent);
input.removeEventListener(aEvent.type, arguments.callee);
input.removeEventListener(aEvent.type, arguments.callee, false);
ok(!TIP2.beginInputTransaction(window, simpleCallback),
description + "TIP2 shouldn't be able to begin input transaction from compositionstart event handler during TIP1.startComposition();");
});
}, false);
TIP1.beginInputTransaction(window, simpleCallback);
TIP1.startComposition();
is(events.length, 1,
@ -452,10 +452,10 @@ function runBeginInputTransactionMethodTests()
var events = [];
input.addEventListener("compositionstart", function (aEvent) {
events.push(aEvent);
input.removeEventListener(aEvent.type, arguments.callee);
input.removeEventListener(aEvent.type, arguments.callee, false);
ok(!TIP2.beginInputTransactionForTests(window),
description + "TIP2 shouldn't be able to begin input transaction for tests from compositionstart event handler during TIP1.startComposition();");
});
}, false);
TIP1.beginInputTransactionForTests(window);
TIP1.startComposition();
is(events.length, 1,
@ -1671,9 +1671,9 @@ function runCompositionTests()
events.push({ "type": aEvent.type, "data": aEvent.data });
}
window.addEventListener("compositionstart", handler);
window.addEventListener("compositionupdate", handler);
window.addEventListener("compositionend", handler);
window.addEventListener("compositionstart", handler, false);
window.addEventListener("compositionupdate", handler, false);
window.addEventListener("compositionend", handler, false);
input.value = "";
input.focus();
@ -1890,9 +1890,9 @@ function runCompositionTests()
is(input.value, "FOobarbuzzboo!",
description + "committing text directly should append the committing text to the focused editor");
window.removeEventListener("compositionstart", handler);
window.removeEventListener("compositionupdate", handler);
window.removeEventListener("compositionend", handler);
window.removeEventListener("compositionstart", handler, false);
window.removeEventListener("compositionupdate", handler, false);
window.removeEventListener("compositionend", handler, false);
}
function runCompositionWithKeyEventTests()
@ -1915,12 +1915,12 @@ function runCompositionWithKeyEventTests()
events.push(aEvent);
}
window.addEventListener("compositionstart", handler);
window.addEventListener("compositionupdate", handler);
window.addEventListener("compositionend", handler);
window.addEventListener("keydown", handler);
window.addEventListener("keypress", handler);
window.addEventListener("keyup", handler);
window.addEventListener("compositionstart", handler, false);
window.addEventListener("compositionupdate", handler, false);
window.addEventListener("compositionend", handler, false);
window.addEventListener("keydown", handler, false);
window.addEventListener("keypress", handler, false);
window.addEventListener("keyup", handler, false);
input.value = "";
input.focus();
@ -2271,12 +2271,12 @@ function runCompositionWithKeyEventTests()
Services.prefs.clearUserPref("dom.keyboardevent.dispatch_during_composition");
window.removeEventListener("compositionstart", handler);
window.removeEventListener("compositionupdate", handler);
window.removeEventListener("compositionend", handler);
window.removeEventListener("keydown", handler);
window.removeEventListener("keypress", handler);
window.removeEventListener("keyup", handler);
window.removeEventListener("compositionstart", handler, false);
window.removeEventListener("compositionupdate", handler, false);
window.removeEventListener("compositionend", handler, false);
window.removeEventListener("keydown", handler, false);
window.removeEventListener("keypress", handler, false);
window.removeEventListener("keyup", handler, false);
}
function runConsumingKeydownBeforeCompositionTests()
@ -2302,12 +2302,12 @@ function runConsumingKeydownBeforeCompositionTests()
}
}
window.addEventListener("compositionstart", handler);
window.addEventListener("compositionupdate", handler);
window.addEventListener("compositionend", handler);
window.addEventListener("keydown", handler);
window.addEventListener("keypress", handler);
window.addEventListener("keyup", handler);
window.addEventListener("compositionstart", handler, false);
window.addEventListener("compositionupdate", handler, false);
window.addEventListener("compositionend", handler, false);
window.addEventListener("keydown", handler, false);
window.addEventListener("keypress", handler, false);
window.addEventListener("keyup", handler, false);
input.value = "";
input.focus();
@ -2436,12 +2436,12 @@ function runConsumingKeydownBeforeCompositionTests()
Services.prefs.clearUserPref("dom.keyboardevent.dispatch_during_composition");
window.removeEventListener("compositionstart", handler);
window.removeEventListener("compositionupdate", handler);
window.removeEventListener("compositionend", handler);
window.removeEventListener("keydown", handler);
window.removeEventListener("keypress", handler);
window.removeEventListener("keyup", handler);
window.removeEventListener("compositionstart", handler, false);
window.removeEventListener("compositionupdate", handler, false);
window.removeEventListener("compositionend", handler, false);
window.removeEventListener("keydown", handler, false);
window.removeEventListener("keypress", handler, false);
window.removeEventListener("keyup", handler, false);
}
async function runKeyTests()
@ -2520,9 +2520,9 @@ async function runKeyTests()
}
}
window.addEventListener("keydown", handler);
window.addEventListener("keypress", handler);
window.addEventListener("keyup", handler);
window.addEventListener("keydown", handler, false);
window.addEventListener("keypress", handler, false);
window.addEventListener("keyup", handler, false);
input.value = "";
input.focus();
@ -3641,9 +3641,9 @@ async function runKeyTests()
TIP.keyup(shiftVirtual);
checkTIPModifiers("TIP should keep modifier's physical key state", TIP, [ ]);
window.removeEventListener("keydown", handler);
window.removeEventListener("keypress", handler);
window.removeEventListener("keyup", handler);
window.removeEventListener("keydown", handler, false);
window.removeEventListener("keypress", handler, false);
window.removeEventListener("keyup", handler, false);
}
function runErrorTests()

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
function createFileWithData(message) {

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
var tmpFile;

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
addMessageListener("file.open", function () {

View File

@ -44,7 +44,8 @@ addLoadEvent(function() {
window.addEventListener(
event,
makeHandler("window.addEventListener('%1', ..., false)",
event, [2]));
event, [2]),
false);
}
doTest();

View File

@ -61,7 +61,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
var browser = $("browser");
browser.addEventListener("load", function() {
setTimeout(nextTest, 0)
});
}, false);
// 1) This document uses addEventListener to register a method throwing an exception
var chromeDir = getRootDirectory(window.location.href);

View File

@ -34,11 +34,13 @@ function doTest() {
content.style.width = 400 + "px";
win.addEventListener("resize", function() {
win.removeEventListener("resize", arguments.callee, false);
setTimeout(function(){
scrollbox.scrollBy(200,0);
resize();
},0);
}, { once: true });
}, false);
oldWidth = win.outerWidth;
oldHeight = win.outerHeight;

View File

@ -24,14 +24,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=617528
function start() {
_window = window.browsingContext.topChromeWindow.open("window_bug617528.xhtml", "_new", "chrome");
_window.addEventListener("load", onLoad);
_window.addEventListener("load", onLoad, false);
}
function onLoad() {
_window.removeEventListener("load", onLoad);
_window.removeEventListener("load", onLoad, false);
browser = _window.document.getElementById("browser");
browser.addEventListener("pageshow", onPageShow);
browser.addEventListener("pageshow", onPageShow, false);
var uri='data:text/html,\
<html>\
@ -77,14 +77,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=617528
var wu = win.windowUtils;
browser.addEventListener("contextmenu", onContextMenu1);
browser.addEventListener("contextmenu", onContextMenu1, false);
wu.sendMouseEvent("contextmenu", left, top, 2, 1, 0);
browser.removeEventListener("contextmenu", onContextMenu1);
browser.removeEventListener("contextmenu", onContextMenu1, false);
browser.addEventListener("contextmenu", onContextMenu2);
browser.addEventListener("contextmenu", onContextMenu2, false);
var shiftMask = Event.SHIFT_MASK;
wu.sendMouseEvent("contextmenu", left, top, 2, 1, shiftMask);
browser.removeEventListener("contextmenu", onContextMenu2);
browser.removeEventListener("contextmenu", onContextMenu2, false);
_window.close();
SimpleTest.finish();

View File

@ -27,7 +27,7 @@ function doTest() {
w.addEventListener("message", function(e) {
is("test", e.data, "We got the data without a compartment mismatch assertion!");
SimpleTest.finish();
});
}, false);
w.postMessage("test", "*");
}

View File

@ -10,6 +10,7 @@ add_task(async function test_CtoPtoC_big() {
let browser1 = gBrowser.getBrowserForTab(tab1);
let blob = await SpecialPowers.spawn(browser1, [], function () {
Cu.importGlobalProperties(["Blob"]);
let blob = new Blob([new Array(1024 * 1024).join("123456789ABCDEF")]);
return blob;
});
@ -46,6 +47,7 @@ add_task(async function test_CtoPtoC_small() {
let browser1 = gBrowser.getBrowserForTab(tab1);
let blob = await SpecialPowers.spawn(browser1, [], function () {
Cu.importGlobalProperties(["Blob"]);
let blob = new Blob(["hello world!"]);
return blob;
});
@ -78,6 +80,7 @@ add_task(async function test_CtoPtoC_bc_big() {
let browser1 = gBrowser.getBrowserForTab(tab1);
await SpecialPowers.spawn(browser1, [], function () {
Cu.importGlobalProperties(["Blob"]);
var bc = new content.BroadcastChannel("test");
bc.onmessage = function () {
bc.postMessage(
@ -116,6 +119,7 @@ add_task(async function test_CtoPtoC_bc_small() {
let browser1 = gBrowser.getBrowserForTab(tab1);
await SpecialPowers.spawn(browser1, [], function () {
Cu.importGlobalProperties(["Blob"]);
var bc = new content.BroadcastChannel("test");
bc.onmessage = function () {
bc.postMessage(new Blob(["hello world!"]));
@ -152,6 +156,7 @@ add_task(async function test_CtoPtoC_bc_small() {
let browser1 = gBrowser.getBrowserForTab(tab1);
let blobURL = await SpecialPowers.spawn(browser1, [], function () {
Cu.importGlobalProperties(["Blob"]);
return content.URL.createObjectURL(new content.Blob(["hello world!"]));
});
@ -186,6 +191,7 @@ add_task(async function test_CtoPtoC_multipart() {
let browser1 = gBrowser.getBrowserForTab(tab1);
let blob = await SpecialPowers.spawn(browser1, [], function () {
Cu.importGlobalProperties(["Blob"]);
return new Blob(["!"]);
});
@ -198,6 +204,7 @@ add_task(async function test_CtoPtoC_multipart() {
let browser2 = gBrowser.getBrowserForTab(tab2);
let status = await SpecialPowers.spawn(browser2, [newBlob], function (blob) {
Cu.importGlobalProperties(["Blob"]);
return new Promise(resolve => {
let fr = new content.FileReader();
fr.readAsText(new Blob(["hello ", blob]));
@ -219,6 +226,8 @@ add_task(async function test_CtoPsize_multipart() {
let browser = gBrowser.getBrowserForTab(tab);
let blob = await SpecialPowers.spawn(browser, [], function () {
Cu.importGlobalProperties(["Blob"]);
let data = new Array(1024 * 512).join("A");
let blob1 = new Blob([data]);
let blob2 = new Blob([data]);

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
addMessageListener("file.open", function (e) {

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
addMessageListener("create-file-objects", function (message) {

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
function createFileWithData(fileData) {

View File

@ -43,7 +43,6 @@ async function runTest(doNewTab) {
fileBrowser,
[TEST_HTTP_POST, filePaths, doNewTab],
(actionUri, filePaths, doNewTab) => {
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
let doc = content.document;

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
addMessageListener("files.open", function (message) {

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
addMessageListener("file.open", function (e) {

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
var file;

View File

@ -43,6 +43,8 @@ if (!this.runTest) {
enableStorageTesting();
enableTesting();
Cu.importGlobalProperties(["indexedDB", "File", "Blob", "FileReader"]);
// In order to support converting tests to using async functions from using
// generator functions, we detect async functions by checking the name of
// function's constructor.

View File

@ -102,7 +102,6 @@ function createNetObserver(test) {
const finished = new Promise(resolver => {
finishedTest = resolver;
});
// eslint-disable-next-line mozilla/no-arbitrary-setTimeout
const timeoutId = setTimeout(() => {
if (!success) {
test.run("This test timed out.");

View File

@ -4,7 +4,6 @@ const { NetUtil } = ChromeUtils.importESModule(
"resource://gre/modules/NetUtil.sys.mjs"
);
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["TextDecoder"]);
const reportURI = "http://mochi.test:8888/foo.sjs";

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
addMessageListener("file.open", function (e) {

View File

@ -22,7 +22,7 @@ document.addEventListener("DOMWindowCreated", function(e) {
SimpleTest.finish();
window.close();
};
});
}, false);
var root = getRootDirectory(window.location.href);
var el = document.createXULElement("iframe");

View File

@ -56,8 +56,9 @@ function nextStep() {
function listen(event, fn) {
window.addEventListener(event, function listener() {
window.removeEventListener(event, listener, false);
fn();
}, { once: true });
}, false);
}
function checkAndContinue(sizemode) {

View File

@ -64,8 +64,8 @@
mm1.sendAsyncMessage("ping");
}
win1.addEventListener("load", loadHandler);
win2.addEventListener("load", loadHandler);
win1.addEventListener("load", loadHandler, false);
win2.addEventListener("load", loadHandler, false);
]]>
</script>
</window>

View File

@ -94,7 +94,6 @@ function eventOccured(event)
gEvents += event.type + ": " + id;
}
// eslint-disable-next-line complexity
function expectFocusShift(callback, expectedWindow, expectedElement, focusChanged, testid)
{
if (expectedWindow == null)
@ -359,7 +358,6 @@ function getById(id)
return element;
}
// eslint-disable-next-line complexity
function startTest()
{
if (gTestStarted)
@ -439,10 +437,10 @@ function startTest()
gLastFocusMethod = 0;
var selectFired = false;
function selectListener() { selectFired = true; }
t19.addEventListener("select", selectListener);
t19.addEventListener("select", selectListener, false);
expectFocusShift(() => t19.select(),
null, getById("t" + 19), true, "input.select()");
t19.removeEventListener("select", selectListener);
t19.removeEventListener("select", selectListener, false);
ok(!selectFired, "select event does not fire asynchronously for input");
// mouse clicking
@ -626,9 +624,9 @@ function startTest()
{
element.focus();
gEvents = "";
element.addEventListener("blur", eventListener);
element.addEventListener("blur", eventListener, false);
blurFunction();
element.removeEventListener("blur", eventListener);
element.removeEventListener("blur", eventListener, false);
}
var functions = [
@ -705,9 +703,9 @@ function startTest()
var trapFocus = function (element, eventListener)
{
element.addEventListener("focus", eventListener);
element.addEventListener("focus", eventListener, false);
element.focus();
element.removeEventListener("focus", eventListener);
element.removeEventListener("focus", eventListener, false);
}
fm.clearFocus(window);
@ -1554,14 +1552,14 @@ function doFrameHistoryTests()
function addFrameSwitchingListeners(frame)
{
frame.contentWindow.addEventListener("focus", frameSwitchingEventOccured);
frame.contentWindow.addEventListener("blur", frameSwitchingEventOccured);
frame.contentDocument.addEventListener("focus", frameSwitchingEventOccured);
frame.contentDocument.addEventListener("blur", frameSwitchingEventOccured);
frame.contentWindow.addEventListener("focus", frameSwitchingEventOccured, false);
frame.contentWindow.addEventListener("blur", frameSwitchingEventOccured, false);
frame.contentDocument.addEventListener("focus", frameSwitchingEventOccured, false);
frame.contentDocument.addEventListener("blur", frameSwitchingEventOccured, false);
var node = frame.contentDocument.body.firstChild;
node.addEventListener("focus", frameSwitchingEventOccured);
node.addEventListener("blur", frameSwitchingEventOccured);
node.addEventListener("focus", frameSwitchingEventOccured, false);
node.addEventListener("blur", frameSwitchingEventOccured, false);
}
function frameSwitchingEventOccured(event)

View File

@ -1,6 +1,5 @@
/* eslint-env mozilla/chrome-script */
// eslint-disable-next-line mozilla/reject-importGlobalProperties
Cu.importGlobalProperties(["File"]);
addMessageListener("file.open", function (e) {