forked from mirrors/gecko-dev
Bug 1864896: Autofix unused function arguments (toolkit). r=mconley,translations-reviewers,omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D203002
This commit is contained in:
parent
0391afb5dc
commit
6b484b48f8
235 changed files with 570 additions and 631 deletions
|
|
@ -4,7 +4,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
export class AutoplayChild extends JSWindowActorChild {
|
||||
handleEvent(event) {
|
||||
handleEvent() {
|
||||
this.sendAsyncMessage("GloballyAutoplayBlocked", {});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
export class AutoplayParent extends JSWindowActorParent {
|
||||
receiveMessage(aMessage) {
|
||||
receiveMessage() {
|
||||
let topBrowsingContext = this.manager.browsingContext.top;
|
||||
let browser = topBrowsingContext.embedderElement;
|
||||
let document = browser.ownerDocument;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export class ControllersParent extends JSWindowActorParent {
|
|||
this.sendAsyncMessage("ControllerCommands:Do", aCommand);
|
||||
}
|
||||
|
||||
getCommandStateWithParams(aCommand, aCommandParams) {
|
||||
getCommandStateWithParams() {
|
||||
throw Components.Exception("Not implemented", Cr.NS_ERROR_NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class CaptivePortalObserver {
|
|||
Services.obs.removeObserver(this, "captive-portal-login-success");
|
||||
}
|
||||
|
||||
observe(aSubject, aTopic, aData) {
|
||||
observe(aSubject, aTopic) {
|
||||
switch (aTopic) {
|
||||
case "captive-portal-login-abort":
|
||||
case "captive-portal-login-success":
|
||||
|
|
@ -172,7 +172,7 @@ export class NetErrorParent extends JSWindowActorParent {
|
|||
request.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
|
||||
request.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
|
||||
|
||||
request.addEventListener("error", event => {
|
||||
request.addEventListener("error", () => {
|
||||
// Make sure the user is still on the cert error page.
|
||||
if (!browser.documentURI.spec.startsWith("about:certerror")) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -947,11 +947,8 @@ export class PictureInPictureToggleChild extends JSWindowActorChild {
|
|||
* tear out or in. If we happened to be tracking videos before the tear
|
||||
* occurred, we re-add the mouse event listeners so that they're attached to
|
||||
* the right WindowRoot.
|
||||
*
|
||||
* @param {Event} event The pageshow event fired when completing a tab tear
|
||||
* out or in.
|
||||
*/
|
||||
onPageShow(event) {
|
||||
onPageShow() {
|
||||
let state = this.docState;
|
||||
if (state.isTrackingVideos) {
|
||||
this.addMouseButtonListeners();
|
||||
|
|
@ -963,11 +960,8 @@ export class PictureInPictureToggleChild extends JSWindowActorChild {
|
|||
* tear out or in. If we happened to be tracking videos before the tear
|
||||
* occurred, we remove the mouse event listeners. We'll re-add them when the
|
||||
* pageshow event fires.
|
||||
*
|
||||
* @param {Event} event The pagehide event fired when starting a tab tear
|
||||
* out or in.
|
||||
*/
|
||||
onPageHide(event) {
|
||||
onPageHide() {
|
||||
let state = this.docState;
|
||||
if (state.isTrackingVideos) {
|
||||
this.removeMouseButtonListeners();
|
||||
|
|
@ -1049,7 +1043,7 @@ export class PictureInPictureToggleChild extends JSWindowActorChild {
|
|||
}
|
||||
}
|
||||
|
||||
startPictureInPicture(event, video, toggle) {
|
||||
startPictureInPicture(event, video) {
|
||||
Services.telemetry.keyedScalarAdd(
|
||||
"pictureinpicture.opened_method",
|
||||
"toggle",
|
||||
|
|
@ -2445,7 +2439,7 @@ export class PictureInPictureChild extends JSWindowActorChild {
|
|||
}
|
||||
}
|
||||
|
||||
onCueChange(e) {
|
||||
onCueChange() {
|
||||
if (!lazy.DISPLAY_TEXT_TRACKS_PREF) {
|
||||
this.updateWebVTTTextTracksDisplay(null);
|
||||
} else {
|
||||
|
|
@ -3110,10 +3104,10 @@ class PictureInPictureChildVideoWrapper {
|
|||
* a cue change is triggered {@see updatePiPTextTracks()}.
|
||||
* @param {HTMLVideoElement} video
|
||||
* The originating video source element
|
||||
* @param {Function} callback
|
||||
* @param {Function} _callback
|
||||
* The callback function to be executed when cue changes are detected
|
||||
*/
|
||||
setCaptionContainerObserver(video, callback) {
|
||||
setCaptionContainerObserver(video, _callback) {
|
||||
return this.#callWrapperMethod({
|
||||
name: "setCaptionContainerObserver",
|
||||
args: [
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ export class PrintingChild extends JSWindowActorChild {
|
|||
// will wait for MozAfterPaint event to be fired.
|
||||
let actor = thisWindow.windowGlobalChild.getActor("Printing");
|
||||
let webProgressListener = {
|
||||
onStateChange(webProgress, req, flags, status) {
|
||||
onStateChange(webProgress, req, flags) {
|
||||
if (flags & Ci.nsIWebProgressListener.STATE_STOP) {
|
||||
webProgress.removeProgressListener(webProgressListener);
|
||||
let domUtils = contentWindow.windowUtils;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ SelectContentHelper.prototype = {
|
|||
mozSystemGroup: true,
|
||||
});
|
||||
let MutationObserver = this.element.ownerGlobal.MutationObserver;
|
||||
this.mut = new MutationObserver(mutations => {
|
||||
this.mut = new MutationObserver(() => {
|
||||
// Something changed the <select> while it was open, so
|
||||
// we'll poke a DeferredTask to update the parent sometime
|
||||
// in the very near future.
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ export class ViewSourcePageChild extends JSWindowActorChild {
|
|||
* @param event
|
||||
* The pageshow event being handled.
|
||||
*/
|
||||
onPageShow(event) {
|
||||
onPageShow() {
|
||||
// If we need to draw the selection, wait until an actual view source page
|
||||
// has loaded, instead of about:blank.
|
||||
if (
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ function loadPrefs() {
|
|||
});
|
||||
});
|
||||
|
||||
showAll.addEventListener("click", event => {
|
||||
showAll.addEventListener("click", () => {
|
||||
search.focus();
|
||||
search.value = "";
|
||||
gFilterPrefsTask.disarm();
|
||||
|
|
|
|||
|
|
@ -608,7 +608,7 @@ function dumpGCLogAndCCLog(aVerbose) {
|
|||
);
|
||||
let section = appendElement(gMain, "div", "section");
|
||||
|
||||
function displayInfo(aGCLog, aCCLog, aIsParent) {
|
||||
function displayInfo(aGCLog, aCCLog) {
|
||||
appendElementWithText(section, "div", "", "Saved GC log to " + aGCLog.path);
|
||||
|
||||
let ccLogType = aVerbose ? "verbose" : "concise";
|
||||
|
|
@ -824,7 +824,7 @@ function loadMemoryReportsFromFile(aFilename, aTitleNote, aFn) {
|
|||
"uncompressed",
|
||||
{
|
||||
data: [],
|
||||
onStartRequest(aR, aC) {},
|
||||
onStartRequest() {},
|
||||
onDataAvailable(aR, aStream, aO, aCount) {
|
||||
let bi = new nsBinaryStream(aStream);
|
||||
this.data.push(bi.readBytes(aCount));
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
const PERCENTAGE = Ci.nsIMemoryReporter.UNITS_PERCENTAGE;
|
||||
|
||||
let fakeReporters = [
|
||||
{ collectReports(aCbObj, aClosure, aAnonymize) {
|
||||
{ collectReports(aCbObj, aClosure) {
|
||||
function f(aP, aK, aU, aA) {
|
||||
aCbObj.callback("Main Process", aP, aK, aU, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
f("compartments/system/foo", OTHER, COUNT, 1);
|
||||
}
|
||||
},
|
||||
{ collectReports(aCbObj, aClosure, aAnonymize) {
|
||||
{ collectReports(aCbObj, aClosure) {
|
||||
function f(aP, aK, aU, aA) {
|
||||
aCbObj.callback("Main Process", aP, aK, aU, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
f("explicit/f/g/h/j", HEAP, BYTES, 10 * MB);
|
||||
}
|
||||
},
|
||||
{ collectReports(aCbObj, aClosure, aAnonymize) {
|
||||
{ collectReports(aCbObj, aClosure) {
|
||||
function f(aP, aK, aU, aA) {
|
||||
aCbObj.callback("Main Process", aP, aK, aU, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
f("compartments/user/https:\\\\very-long-url.com\\very-long\\oh-so-long\\really-quite-long.html?a=2&b=3&c=4&d=5&e=abcdefghijklmnopqrstuvwxyz&f=123456789123456789123456789", OTHER, COUNT, 1);
|
||||
}
|
||||
},
|
||||
{ collectReports(aCbObj, aClosure, aAnonymize) {
|
||||
{ collectReports(aCbObj, aClosure) {
|
||||
function f(aP) {
|
||||
aCbObj.callback("Main Process", aP, OTHER, COUNT, 1, "Desc.", aClosure);
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
// the largest). Processes without a |resident| memory reporter are saved
|
||||
// for the end.
|
||||
let fakeReporters2 = [
|
||||
{ collectReports(aCbObj, aClosure, aAnonymize) {
|
||||
{ collectReports(aCbObj, aClosure) {
|
||||
function f(aP1, aP2, aK, aU, aA) {
|
||||
aCbObj.callback(aP1, aP2, aK, aU, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
let jk2Path = "explicit/j/k2";
|
||||
|
||||
let fakeReporters = [
|
||||
{ collectReports(aCbObj, aClosure, aAnonymize) {
|
||||
{ collectReports(aCbObj, aClosure) {
|
||||
function f(aP, aK, aA) {
|
||||
aCbObj.callback("Main Process ABC", aP, aK, BYTES, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
const BYTES = Ci.nsIMemoryReporter.UNITS_BYTES;
|
||||
|
||||
let fakeReporters = [
|
||||
{ collectReports(aCbObj, aClosure, aAnonymize) {
|
||||
{ collectReports(aCbObj, aClosure) {
|
||||
function f(aP, aK, aA, aD) {
|
||||
aCbObj.callback("", aP, aK, BYTES, aA, aD, aClosure);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
frame.height = 300;
|
||||
frame.src = "about:memory?file=" + makePathname(aFilename);
|
||||
document.documentElement.appendChild(frame);
|
||||
frame.addEventListener("load", function onFrameLoad(e) {
|
||||
frame.addEventListener("load", function onFrameLoad() {
|
||||
frame.focus();
|
||||
|
||||
// Initialize the clipboard contents.
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
const BYTES = Ci.nsIMemoryReporter.UNITS_BYTES;
|
||||
|
||||
let fakeReporters = [
|
||||
{ collectReports(aCbObj, aClosure, aAnonymize) {
|
||||
{ collectReports(aCbObj, aClosure) {
|
||||
function f(aP, aK, aA) {
|
||||
aCbObj.callback("Main Process", aP, aK, BYTES, aA, "Desc.", aClosure);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,8 +77,7 @@
|
|||
let mySandbox = Cu.Sandbox(document.nodePrincipal,
|
||||
{ sandboxName: "this-is-a-sandbox-name" });
|
||||
|
||||
function handleReportNormal(aProcess, aPath, aKind, aUnits, aAmount,
|
||||
aDescription)
|
||||
function handleReportNormal(aProcess, aPath, aKind, aUnits, aAmount)
|
||||
{
|
||||
if (aProcess.startsWith(`Utility `)) {
|
||||
// The Utility process that runs the ORB JavaScript validator starts on first
|
||||
|
|
@ -128,8 +127,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
function handleReportAnonymized(aProcess, aPath, aKind, aUnits, aAmount,
|
||||
aDescription)
|
||||
function handleReportAnonymized(aProcess, aPath)
|
||||
{
|
||||
// Path might include an xmlns using http, which is safe to ignore.
|
||||
let reducedPath = aPath.replace(XUL_NS, "");
|
||||
|
|
@ -331,7 +329,7 @@
|
|||
}
|
||||
},
|
||||
// nsIMemoryReporter
|
||||
collectReports(callback, data, anonymize) {
|
||||
collectReports(callback, data) {
|
||||
for (let path of Object.keys(this.tests)) {
|
||||
try {
|
||||
let test = this.tests[path];
|
||||
|
|
@ -350,7 +348,7 @@
|
|||
}
|
||||
},
|
||||
// nsIHandleReportCallback
|
||||
callback(process, path, kind, units, amount, data) {
|
||||
callback(process, path, kind, units, amount) {
|
||||
if (path in this.tests) {
|
||||
this.seen++;
|
||||
let test = this.tests[path];
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
{
|
||||
let residents = {};
|
||||
|
||||
let handleReport = function(aProcess, aPath, aKind, aUnits, aAmount, aDesc) {
|
||||
let handleReport = function(aProcess, aPath, aKind, aUnits, aAmount) {
|
||||
if (aProcess.startsWith(`Utility `)) {
|
||||
// The Utility process that runs the ORB JavaScript validator starts on first
|
||||
// idle in the parent process. This makes it notoriously hard to know _if_ it
|
||||
|
|
|
|||
|
|
@ -17,14 +17,7 @@ function run_test() {
|
|||
};
|
||||
|
||||
let foundGPUProcess = false;
|
||||
let onHandleReport = function (
|
||||
aProcess,
|
||||
aPath,
|
||||
aKind,
|
||||
aUnits,
|
||||
aAmount,
|
||||
aDescription
|
||||
) {
|
||||
let onHandleReport = function (aProcess) {
|
||||
if (/GPU \(pid \d+\)/.test(aProcess)) {
|
||||
foundGPUProcess = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -787,7 +787,7 @@ var View = {
|
|||
return isOpen;
|
||||
},
|
||||
|
||||
displayDOMWindowRow(data, parent) {
|
||||
displayDOMWindowRow(data) {
|
||||
const cellCount = 2;
|
||||
let rowId = "w:" + data.outerWindowId;
|
||||
let row = this._getOrCreateRow(rowId, cellCount);
|
||||
|
|
@ -1124,7 +1124,7 @@ var Control = {
|
|||
// Visibility change:
|
||||
// - stop updating while the user isn't looking;
|
||||
// - resume updating when the user returns.
|
||||
window.addEventListener("visibilitychange", event => {
|
||||
window.addEventListener("visibilitychange", () => {
|
||||
if (!document.hidden) {
|
||||
this._updateDisplay(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ add_task(async () => {
|
|||
"after system info was collected."
|
||||
);
|
||||
|
||||
await BrowserTestUtils.withNewTab("about:third-party", async browser => {
|
||||
await BrowserTestUtils.withNewTab("about:third-party", async () => {
|
||||
if (!content.fetchDataDone) {
|
||||
const mainDiv = content.document.getElementById("main");
|
||||
await BrowserTestUtils.waitForMutationCondition(
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ function sidebar_set_disabled(disabled) {
|
|||
});
|
||||
}
|
||||
|
||||
function check_pin_repeat_is_correct(button) {
|
||||
function check_pin_repeat_is_correct() {
|
||||
let pin = document.getElementById("new-pin");
|
||||
let pin_repeat = document.getElementById("new-pin-repeat");
|
||||
let has_current_pin = !document.getElementById("current-pin-div").hidden;
|
||||
|
|
@ -853,7 +853,7 @@ try {
|
|||
Ci.nsIWebAuthnService
|
||||
);
|
||||
document.addEventListener("DOMContentLoaded", onLoad);
|
||||
window.addEventListener("beforeunload", event => {
|
||||
window.addEventListener("beforeunload", () => {
|
||||
AboutWebauthnManagerJS.uninit();
|
||||
if (AboutWebauthnService) {
|
||||
AboutWebauthnService.cancel(0);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ registerCleanupFunction(async function () {
|
|||
function send_credential_list(credlist) {
|
||||
let num_of_creds = 0;
|
||||
credlist.forEach(domain => {
|
||||
domain.credentials.forEach(c => {
|
||||
domain.credentials.forEach(() => {
|
||||
num_of_creds += 1;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ add_task(async () => {
|
|||
});
|
||||
await BrowserTestUtils.withNewTab(
|
||||
{ gBrowser: originalBrowser, url: "about:windows-messages" },
|
||||
async browser => {
|
||||
async () => {
|
||||
let messagesList = content.document.getElementById("windows-div");
|
||||
// This is tricky because the test framework has its own windows
|
||||
Assert.greaterOrEqual(
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ const chromeScript = SpecialPowers.loadChromeScript(_ => {
|
|||
sendAsyncMessage("waitForXULAlert", false);
|
||||
}, 2000);
|
||||
|
||||
var windowObserver = function(win, aTopic, aData) {
|
||||
var windowObserver = function(win, aTopic) {
|
||||
if (aTopic != "domwindowopened") {
|
||||
return;
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ add_task(async function test_require_interaction() {
|
|||
var actualSequence = [];
|
||||
|
||||
function createAlertListener(name, showCallback, finishCallback) {
|
||||
return (subject, topic, data) => {
|
||||
return (subject, topic) => {
|
||||
if (topic == "alertshow") {
|
||||
actualSequence.push(name + " show");
|
||||
if (showCallback) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
let promise = new Promise((res, rej) => {resolve = res; reject = rej});
|
||||
|
||||
let success = false;
|
||||
function observe(aSubject, aTopic, aData) {
|
||||
function observe(aSubject, aTopic) {
|
||||
if (aTopic == "alertshow") {
|
||||
success = true;
|
||||
notifier.closeAlert(alertName);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const chromeScript = SpecialPowers.loadChromeScript(_ => {
|
|||
sendAsyncMessage("waitedForPosition", null);
|
||||
}, 2000);
|
||||
|
||||
var windowObserver = function(win, aTopic, aData) {
|
||||
var windowObserver = function(win, aTopic) {
|
||||
if (aTopic != "domwindowopened") {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const chromeScript = SpecialPowers.loadChromeScript(_ => {
|
|||
function notify(alertName, principal) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var source;
|
||||
async function observe(subject, topic, data) {
|
||||
async function observe(subject, topic) {
|
||||
if (topic == "alertclickcallback") {
|
||||
reject(new Error("Alerts should not be clicked during test"));
|
||||
} else if (topic == "alertshow") {
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ AutoCompleteResultBase.prototype = {
|
|||
return this._styles[aIndex];
|
||||
},
|
||||
|
||||
getImageAt(aIndex) {
|
||||
getImageAt() {
|
||||
return "";
|
||||
},
|
||||
|
||||
|
|
@ -109,11 +109,11 @@ AutoCompleteResultBase.prototype = {
|
|||
return this._finalCompleteValues[aIndex] || this._values[aIndex];
|
||||
},
|
||||
|
||||
isRemovableAt(aRowIndex) {
|
||||
isRemovableAt() {
|
||||
return true;
|
||||
},
|
||||
|
||||
removeValueAt(aRowIndex) {},
|
||||
removeValueAt() {},
|
||||
|
||||
// nsISupports implementation
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIAutoCompleteResult"]),
|
||||
|
|
@ -161,7 +161,7 @@ function AutocompletePopupBase(input) {
|
|||
AutocompletePopupBase.prototype = {
|
||||
selectedIndex: 0,
|
||||
invalidate() {},
|
||||
selectBy(reverse, page) {
|
||||
selectBy(reverse) {
|
||||
let numRows = this.input.controller.matchCount;
|
||||
if (numRows > 0) {
|
||||
let delta = reverse ? -1 : 1;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ AutoCompleteInput.prototype = {
|
|||
popupOpen: false,
|
||||
|
||||
popup: {
|
||||
setSelectedIndex(aIndex) {},
|
||||
setSelectedIndex() {},
|
||||
invalidate() {},
|
||||
|
||||
// nsISupports implementation
|
||||
|
|
@ -100,7 +100,7 @@ AutoCompleteResult.prototype = {
|
|||
return this._styles[aIndex];
|
||||
},
|
||||
|
||||
getImageAt(aIndex) {
|
||||
getImageAt() {
|
||||
return "";
|
||||
},
|
||||
|
||||
|
|
@ -108,11 +108,11 @@ AutoCompleteResult.prototype = {
|
|||
return this.getValueAt(aIndex);
|
||||
},
|
||||
|
||||
isRemovableAt(aRowIndex) {
|
||||
isRemovableAt() {
|
||||
return true;
|
||||
},
|
||||
|
||||
removeValueAt(aRowIndex) {},
|
||||
removeValueAt() {},
|
||||
|
||||
// nsISupports implementation
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIAutoCompleteResult"]),
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ AutoCompleteInput.prototype = {
|
|||
popupOpen: false,
|
||||
|
||||
popup: {
|
||||
setSelectedIndex(aIndex) {},
|
||||
setSelectedIndex() {},
|
||||
invalidate() {},
|
||||
|
||||
// nsISupports implementation
|
||||
|
|
@ -99,7 +99,7 @@ AutoCompleteResult.prototype = {
|
|||
return this._styles[aIndex];
|
||||
},
|
||||
|
||||
getImageAt(aIndex) {
|
||||
getImageAt() {
|
||||
return "";
|
||||
},
|
||||
|
||||
|
|
@ -107,11 +107,11 @@ AutoCompleteResult.prototype = {
|
|||
return this.getValueAt(aIndex);
|
||||
},
|
||||
|
||||
isRemovableAt(aRowIndex) {
|
||||
isRemovableAt() {
|
||||
return true;
|
||||
},
|
||||
|
||||
removeValueAt(aRowIndex) {},
|
||||
removeValueAt() {},
|
||||
|
||||
// nsISupports implementation
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIAutoCompleteResult"]),
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ AutoCompleteInput.prototype = {
|
|||
popupOpen: false,
|
||||
|
||||
popup: {
|
||||
setSelectedIndex(aIndex) {},
|
||||
setSelectedIndex() {},
|
||||
invalidate() {},
|
||||
|
||||
// nsISupports implementation
|
||||
|
|
@ -98,7 +98,7 @@ AutoCompleteResult.prototype = {
|
|||
return this._styles[aIndex];
|
||||
},
|
||||
|
||||
getImageAt(aIndex) {
|
||||
getImageAt() {
|
||||
return "";
|
||||
},
|
||||
|
||||
|
|
@ -106,11 +106,11 @@ AutoCompleteResult.prototype = {
|
|||
return this.getValueAt(aIndex);
|
||||
},
|
||||
|
||||
isRemovableAt(aRowIndex) {
|
||||
isRemovableAt() {
|
||||
return true;
|
||||
},
|
||||
|
||||
removeValueAt(aRowIndex) {},
|
||||
removeValueAt() {},
|
||||
|
||||
// nsISupports implementation
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIAutoCompleteResult"]),
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ AutoCompleteInput.prototype = {
|
|||
popupOpen: false,
|
||||
|
||||
popup: {
|
||||
setSelectedIndex(aIndex) {},
|
||||
setSelectedIndex() {},
|
||||
invalidate() {},
|
||||
|
||||
// nsISupports implementation
|
||||
|
|
@ -92,7 +92,7 @@ AutoCompleteResult.prototype = {
|
|||
return this._styles[aIndex];
|
||||
},
|
||||
|
||||
getImageAt(aIndex) {
|
||||
getImageAt() {
|
||||
return "";
|
||||
},
|
||||
|
||||
|
|
@ -100,11 +100,11 @@ AutoCompleteResult.prototype = {
|
|||
return this.getValueAt(aIndex);
|
||||
},
|
||||
|
||||
isRemovableAt(aRowIndex) {
|
||||
isRemovableAt() {
|
||||
return true;
|
||||
},
|
||||
|
||||
removeValueAt(aRowIndex) {},
|
||||
removeValueAt() {},
|
||||
|
||||
// nsISupports implementation
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIAutoCompleteResult"]),
|
||||
|
|
|
|||
|
|
@ -21,12 +21,7 @@ function doSearch(aString, aUserContextId) {
|
|||
return new Promise(resolve => {
|
||||
let search = new AutoCompleteSearch("test");
|
||||
|
||||
search.startSearch = function (
|
||||
aSearchString,
|
||||
aSearchParam,
|
||||
aPreviousResult,
|
||||
aListener
|
||||
) {
|
||||
search.startSearch = function (aSearchString, aSearchParam) {
|
||||
unregisterAutoCompleteSearch(search);
|
||||
resolve(aSearchParam);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ AutoCompleteInput.prototype = {
|
|||
popupOpen: false,
|
||||
|
||||
popup: {
|
||||
setSelectedIndex(aIndex) {},
|
||||
setSelectedIndex() {},
|
||||
invalidate() {},
|
||||
|
||||
// nsISupports implementation
|
||||
|
|
@ -100,7 +100,7 @@ AutoCompleteResult.prototype = {
|
|||
return this._styles[aIndex];
|
||||
},
|
||||
|
||||
getImageAt(aIndex) {
|
||||
getImageAt() {
|
||||
return "";
|
||||
},
|
||||
|
||||
|
|
@ -108,11 +108,11 @@ AutoCompleteResult.prototype = {
|
|||
return this.getValueAt(aIndex);
|
||||
},
|
||||
|
||||
isRemovableAt(aRowIndex) {
|
||||
isRemovableAt() {
|
||||
return true;
|
||||
},
|
||||
|
||||
removeValueAt(aRowIndex) {},
|
||||
removeValueAt() {},
|
||||
|
||||
// nsISupports implementation
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIAutoCompleteResult"]),
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ function AutoCompleteSearch(aName) {
|
|||
AutoCompleteSearch.prototype = {
|
||||
constructor: AutoCompleteSearch,
|
||||
stopSearchInvoked: true,
|
||||
startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) {
|
||||
startSearch() {
|
||||
info("Check stop search has been called");
|
||||
Assert.ok(this.stopSearchInvoked);
|
||||
this.stopSearchInvoked = false;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ BHRTelemetryService.prototype = Object.freeze({
|
|||
this.submit();
|
||||
},
|
||||
|
||||
observe(aSubject, aTopic, aData) {
|
||||
observe(aSubject, aTopic) {
|
||||
switch (aTopic) {
|
||||
case "profile-after-change":
|
||||
this.resetPayload();
|
||||
|
|
|
|||
|
|
@ -82,10 +82,7 @@ outputInfo = (sentinel, info) => {
|
|||
dump(`${sentinel}${JSON.stringify(info)}${sentinel}\n`);
|
||||
};
|
||||
|
||||
function monkeyPatchRemoteSettingsClient({
|
||||
last_modified = new Date().getTime(),
|
||||
data = [],
|
||||
}) {
|
||||
function monkeyPatchRemoteSettingsClient({ data = [] }) {
|
||||
lazy.RemoteSettingsClient.prototype.get = async (options = {}) => {
|
||||
outputInfo({ "RemoteSettingsClient.get": { options, response: { data } } });
|
||||
return data;
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ export class BackgroundTasksManager {
|
|||
const waitFlag =
|
||||
commandLine.findFlag("wait-for-jsdebugger", CASE_INSENSITIVE) != -1;
|
||||
if (waitFlag) {
|
||||
function onDevtoolsThreadReady(subject, topic, data) {
|
||||
function onDevtoolsThreadReady(subject, topic) {
|
||||
lazy.log.info(
|
||||
`${Services.appinfo.processID}: Setting breakpoints for background task named '${name}'` +
|
||||
` (with ${commandLine.length} arguments)`
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ export var BackgroundTasksUtils = {
|
|||
lazy.log.info(`readPreferences: profile is locked`);
|
||||
|
||||
let prefs = {};
|
||||
let addPref = (kind, name, value, sticky, locked) => {
|
||||
let addPref = (kind, name, value) => {
|
||||
if (predicate && !predicate(name)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
* code to exit code 0.
|
||||
*/
|
||||
|
||||
export function runBackgroundTask(commandLine) {
|
||||
export function runBackgroundTask() {
|
||||
// In the future, will be modifed by the JS debugger (to 0, success).
|
||||
var exposedExitCode = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
export async function runBackgroundTask(commandLine) {
|
||||
export async function runBackgroundTask() {
|
||||
const get = Services.env.get("MOZ_TEST_PROCESS_UPDATES");
|
||||
let exitCode = 81;
|
||||
if (get == "ShouldNotProcessUpdates(): OtherInstanceRunning") {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ const EXCLUDED_NAMES = [
|
|||
* Return 0 (success) if all targeting getters succeed, 11 (failure)
|
||||
* otherwise.
|
||||
*/
|
||||
export async function runBackgroundTask(commandLine) {
|
||||
export async function runBackgroundTask() {
|
||||
let exitCode = EXIT_CODE.SUCCESS;
|
||||
|
||||
// Can't use `ASRouterTargeting.getEnvironmentSnapshot`, since that
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ function URLFetcher(url, timeout) {
|
|||
xhr.onerror = function () {
|
||||
self.onerror();
|
||||
};
|
||||
xhr.onreadystatechange = function (oEvent) {
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4) {
|
||||
if (self._isAborted) {
|
||||
return;
|
||||
|
|
@ -181,10 +181,7 @@ function LoginObserver(captivePortalDetector) {
|
|||
observeActivity: function observeActivity(
|
||||
aHttpChannel,
|
||||
aActivityType,
|
||||
aActivitySubtype,
|
||||
aTimestamp,
|
||||
aExtraSizeData,
|
||||
aExtraStringData
|
||||
aActivitySubtype
|
||||
) {
|
||||
if (
|
||||
aActivityType ===
|
||||
|
|
@ -541,5 +538,5 @@ if (DEBUG) {
|
|||
};
|
||||
} else {
|
||||
// eslint-disable-next-line no-global-assign
|
||||
debug = function (s) {};
|
||||
debug = function () {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ function xhr_handler(metadata, response) {
|
|||
}
|
||||
|
||||
function fakeUIResponse() {
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic === "captive-portal-login") {
|
||||
do_throw("should not receive captive-portal-login event");
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ function test_abort() {
|
|||
Assert.equal(++step, 1);
|
||||
gCaptivePortalDetector.finishPreparation(kInterfaceName);
|
||||
},
|
||||
complete: function complete(success) {
|
||||
complete: function complete() {
|
||||
do_throw("should not execute |complete| callback");
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ function test_abort() {
|
|||
Assert.equal(++step, 1);
|
||||
gCaptivePortalDetector.finishPreparation(kInterfaceName);
|
||||
},
|
||||
complete: function complete(success) {
|
||||
complete: function complete() {
|
||||
do_throw("should not execute |complete| callback");
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ function xhr_handler(metadata, response) {
|
|||
}
|
||||
|
||||
function fakeUIResponse() {
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic === "captive-portal-login") {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", gServerURL + kCanonicalSitePath, true);
|
||||
|
|
@ -42,7 +42,7 @@ function test_multiple_requests_abort() {
|
|||
Assert.equal(++step, 1);
|
||||
gCaptivePortalDetector.finishPreparation(kInterfaceName);
|
||||
},
|
||||
complete: function complete(success) {
|
||||
complete: function complete() {
|
||||
do_throw("should not execute |complete| callback for " + kInterfaceName);
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ function xhr_handler(metadata, response) {
|
|||
}
|
||||
|
||||
function fakeUIResponse() {
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic === "captive-portal-login") {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", gServerURL + kCanonicalSitePath, true);
|
||||
|
|
@ -56,7 +56,7 @@ function test_abort() {
|
|||
"should not execute |prepare| callback for " + kOtherInterfaceName
|
||||
);
|
||||
},
|
||||
complete: function complete(success) {
|
||||
complete: function complete() {
|
||||
do_throw("should not execute |complete| callback for " + kInterfaceName);
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ function xhr_handler(metadata, response) {
|
|||
}
|
||||
|
||||
function fakeUIResponse() {
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic === "captive-portal-login") {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", gServerURL + kCanonicalSitePath, true);
|
||||
|
|
@ -31,7 +31,7 @@ function fakeUIResponse() {
|
|||
}
|
||||
}, "captive-portal-login");
|
||||
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic === "captive-portal-login-success") {
|
||||
Assert.equal(++step, 4);
|
||||
gServer.stop(do_test_finished);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ function xhr_handler(metadata, response) {
|
|||
}
|
||||
|
||||
function fakeUIResponse() {
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic === "captive-portal-login") {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", gServerURL + kCanonicalSitePath, true);
|
||||
|
|
@ -36,7 +36,7 @@ function fakeUIResponse() {
|
|||
}
|
||||
}, "captive-portal-login");
|
||||
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic === "captive-portal-login-success") {
|
||||
Assert.equal(++step, 4);
|
||||
gServer.stop(function () {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ function xhr_handler(metadata, response) {
|
|||
}
|
||||
|
||||
function fakeUIResponse() {
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic == "captive-portal-login") {
|
||||
do_throw("should not receive captive-portal-login event");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function xhr_handler(metadata, response) {
|
|||
}
|
||||
|
||||
function fakeUIResponse() {
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic === "captive-portal-login") {
|
||||
do_throw("should not receive captive-portal-login event");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ function xhr_handler(metadata, response) {
|
|||
}
|
||||
|
||||
function fakeUIResponse() {
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic === "captive-portal-login") {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", gServerURL + kCanonicalSitePath, true);
|
||||
|
|
@ -33,7 +33,7 @@ function fakeUIResponse() {
|
|||
}
|
||||
}, "captive-portal-login");
|
||||
|
||||
Services.obs.addObserver(function observe(subject, topic, data) {
|
||||
Services.obs.addObserver(function observe(subject, topic) {
|
||||
if (topic === "captive-portal-login-success") {
|
||||
loginSuccessCount++;
|
||||
if (loginSuccessCount > 1) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
pemToDER,
|
||||
} from "chrome://global/content/certviewer/certDecoder.mjs";
|
||||
|
||||
document.addEventListener("DOMContentLoaded", async e => {
|
||||
document.addEventListener("DOMContentLoaded", async () => {
|
||||
let url = new URL(document.URL);
|
||||
let certInfo = url.searchParams.getAll("cert");
|
||||
if (certInfo.length === 0) {
|
||||
|
|
@ -469,7 +469,7 @@ const buildChain = async chain => {
|
|||
let adjustedCerts = certs.map(cert => adjustCertInformation(cert));
|
||||
return render(adjustedCerts, false);
|
||||
})
|
||||
.catch(err => {
|
||||
.catch(() => {
|
||||
render(null, true);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ function openCertDownloadDialog(cert) {
|
|||
cert,
|
||||
returnVals
|
||||
);
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise(resolve => {
|
||||
win.addEventListener(
|
||||
"load",
|
||||
function () {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ function is_element_visible(aElement, aMsg) {
|
|||
|
||||
// Extracted from https://searchfox.org/mozilla-central/rev/40ef22080910c2e2c27d9e2120642376b1d8b8b2/browser/components/preferences/in-content/tests/head.js#41
|
||||
function promiseLoadSubDialog(aURL) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise(resolve => {
|
||||
content.gSubDialog._dialogStack.addEventListener(
|
||||
"dialogopen",
|
||||
function dialogopen(aEvent) {
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ const CookieCleaner = {
|
|||
});
|
||||
},
|
||||
|
||||
deleteByRange(aFrom, aTo) {
|
||||
deleteByRange(aFrom) {
|
||||
return Services.cookies.removeAllSince(aFrom);
|
||||
},
|
||||
|
||||
|
|
@ -584,7 +584,7 @@ const DownloadsCleaner = {
|
|||
};
|
||||
|
||||
const PasswordsCleaner = {
|
||||
deleteByHost(aHost, aOriginAttributes) {
|
||||
deleteByHost(aHost) {
|
||||
// Clearing by host also clears associated subdomains.
|
||||
return this._deleteInternal(aLogin =>
|
||||
Services.eTLD.hasRootDomain(aLogin.hostname, aHost)
|
||||
|
|
@ -630,7 +630,7 @@ const PasswordsCleaner = {
|
|||
};
|
||||
|
||||
const MediaDevicesCleaner = {
|
||||
async deleteByRange(aFrom, aTo) {
|
||||
async deleteByRange(aFrom) {
|
||||
let mediaMgr = Cc["@mozilla.org/mediaManagerService;1"].getService(
|
||||
Ci.nsIMediaManagerService
|
||||
);
|
||||
|
|
@ -799,7 +799,7 @@ const QuotaCleaner = {
|
|||
}
|
||||
},
|
||||
|
||||
async deleteByHost(aHost, aOriginAttributes) {
|
||||
async deleteByHost(aHost) {
|
||||
// XXX: The aOriginAttributes is expected to always be empty({}). Maybe have
|
||||
// a debug assertion here to ensure that?
|
||||
|
||||
|
|
@ -872,7 +872,7 @@ const QuotaCleaner = {
|
|||
_ => /* exceptionThrown = */ false,
|
||||
_ => /* exceptionThrown = */ true
|
||||
)
|
||||
.then(exceptionThrown => {
|
||||
.then(() => {
|
||||
// QuotaManager: In the event of a failure, we call reject to propagate
|
||||
// the error upwards.
|
||||
return new Promise((aResolve, aReject) => {
|
||||
|
|
@ -1002,7 +1002,7 @@ const PushNotificationsCleaner = {
|
|||
});
|
||||
},
|
||||
|
||||
deleteByHost(aHost, aOriginAttributes) {
|
||||
deleteByHost(aHost) {
|
||||
// Will also clear entries for subdomains of aHost. Data is cleared across
|
||||
// all origin attributes.
|
||||
return this._deleteByRootDomain(aHost);
|
||||
|
|
@ -1078,7 +1078,7 @@ const StorageAccessCleaner = {
|
|||
});
|
||||
},
|
||||
|
||||
async deleteByHost(aHost, aOriginAttributes) {
|
||||
async deleteByHost(aHost) {
|
||||
// Clearing by host also clears associated subdomains.
|
||||
this._deleteInternal(({ principal }) => {
|
||||
let toBeRemoved = false;
|
||||
|
|
@ -1095,7 +1095,7 @@ const StorageAccessCleaner = {
|
|||
);
|
||||
},
|
||||
|
||||
async deleteByRange(aFrom, aTo) {
|
||||
async deleteByRange(aFrom) {
|
||||
Services.perms.removeByTypeSince("storageAccessAPI", aFrom / 1000);
|
||||
},
|
||||
|
||||
|
|
@ -1105,7 +1105,7 @@ const StorageAccessCleaner = {
|
|||
};
|
||||
|
||||
const HistoryCleaner = {
|
||||
deleteByHost(aHost, aOriginAttributes) {
|
||||
deleteByHost(aHost) {
|
||||
if (!AppConstants.MOZ_PLACES) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
|
@ -1142,7 +1142,7 @@ const HistoryCleaner = {
|
|||
};
|
||||
|
||||
const SessionHistoryCleaner = {
|
||||
async deleteByHost(aHost, aOriginAttributes) {
|
||||
async deleteByHost(aHost) {
|
||||
// Session storage and history also clear subdomains of aHost.
|
||||
Services.obs.notifyObservers(null, "browser:purge-sessionStorage", aHost);
|
||||
Services.obs.notifyObservers(
|
||||
|
|
@ -1160,7 +1160,7 @@ const SessionHistoryCleaner = {
|
|||
return this.deleteByHost(aBaseDomain, {});
|
||||
},
|
||||
|
||||
async deleteByRange(aFrom, aTo) {
|
||||
async deleteByRange(aFrom) {
|
||||
Services.obs.notifyObservers(
|
||||
null,
|
||||
"browser:purge-session-history",
|
||||
|
|
@ -1275,7 +1275,7 @@ const PermissionsCleaner = {
|
|||
}
|
||||
},
|
||||
|
||||
deleteByHost(aHost, aOriginAttributes) {
|
||||
deleteByHost(aHost) {
|
||||
return this._deleteInternal({ host: aHost });
|
||||
},
|
||||
|
||||
|
|
@ -1287,7 +1287,7 @@ const PermissionsCleaner = {
|
|||
return this._deleteInternal({ baseDomain: aBaseDomain });
|
||||
},
|
||||
|
||||
async deleteByRange(aFrom, aTo) {
|
||||
async deleteByRange(aFrom) {
|
||||
Services.perms.removeAllSince(aFrom / 1000);
|
||||
},
|
||||
|
||||
|
|
@ -1301,7 +1301,7 @@ const PermissionsCleaner = {
|
|||
};
|
||||
|
||||
const PreferencesCleaner = {
|
||||
deleteByHost(aHost, aOriginAttributes) {
|
||||
deleteByHost(aHost) {
|
||||
// Also clears subdomains of aHost.
|
||||
return new Promise((aResolve, aReject) => {
|
||||
let cps2 = Cc["@mozilla.org/content-pref/service;1"].getService(
|
||||
|
|
@ -1328,7 +1328,7 @@ const PreferencesCleaner = {
|
|||
return this.deleteByHost(aBaseDomain, {});
|
||||
},
|
||||
|
||||
async deleteByRange(aFrom, aTo) {
|
||||
async deleteByRange(aFrom) {
|
||||
let cps2 = Cc["@mozilla.org/content-pref/service;1"].getService(
|
||||
Ci.nsIContentPrefService2
|
||||
);
|
||||
|
|
@ -1477,7 +1477,7 @@ const EMECleaner = {
|
|||
};
|
||||
|
||||
const ReportsCleaner = {
|
||||
deleteByHost(aHost, aOriginAttributes) {
|
||||
deleteByHost(aHost) {
|
||||
// Also clears subdomains of aHost.
|
||||
return new Promise(aResolve => {
|
||||
Services.obs.notifyObservers(null, "reporting:purge-host", aHost);
|
||||
|
|
@ -1520,7 +1520,7 @@ const ContentBlockingCleaner = {
|
|||
await this.deleteAll();
|
||||
},
|
||||
|
||||
deleteByRange(aFrom, aTo) {
|
||||
deleteByRange(aFrom) {
|
||||
return lazy.TrackingDBService.clearSince(aFrom);
|
||||
},
|
||||
};
|
||||
|
|
@ -1616,7 +1616,7 @@ const IdentityCredentialStorageCleaner = {
|
|||
}
|
||||
},
|
||||
|
||||
async deleteByPrincipal(aPrincipal, aIsUserRequest) {
|
||||
async deleteByPrincipal(aPrincipal) {
|
||||
if (
|
||||
Services.prefs.getBoolPref(
|
||||
"dom.security.credentialmanagement.identity.enabled",
|
||||
|
|
@ -1698,7 +1698,7 @@ const BounceTrackingProtectionStateCleaner = {
|
|||
await lazy.bounceTrackingProtection.clearAll();
|
||||
},
|
||||
|
||||
async deleteByPrincipal(aPrincipal, aIsUserRequest) {
|
||||
async deleteByPrincipal(aPrincipal) {
|
||||
if (!lazy.isBounceTrackingProtectionEnabled) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1709,7 +1709,7 @@ const BounceTrackingProtectionStateCleaner = {
|
|||
);
|
||||
},
|
||||
|
||||
async deleteByBaseDomain(aBaseDomain, aIsUserRequest) {
|
||||
async deleteByBaseDomain(aBaseDomain) {
|
||||
if (!lazy.isBounceTrackingProtectionEnabled) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1723,7 +1723,7 @@ const BounceTrackingProtectionStateCleaner = {
|
|||
await lazy.bounceTrackingProtection.clearByTimeRange(aFrom, aTo);
|
||||
},
|
||||
|
||||
async deleteByHost(aHost, aOriginAttributes) {
|
||||
async deleteByHost(aHost) {
|
||||
if (!lazy.isBounceTrackingProtectionEnabled) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,10 +244,10 @@ export var SiteDataTestUtils = {
|
|||
return new Promise(resolve => {
|
||||
let data = true;
|
||||
let request = indexedDB.openForPrincipal(principal, "TestDatabase", 1);
|
||||
request.onupgradeneeded = function (e) {
|
||||
request.onupgradeneeded = function () {
|
||||
data = false;
|
||||
};
|
||||
request.onsuccess = function (e) {
|
||||
request.onsuccess = function () {
|
||||
resolve(data);
|
||||
};
|
||||
});
|
||||
|
|
@ -276,11 +276,11 @@ export var SiteDataTestUtils = {
|
|||
CacheListener.prototype = {
|
||||
QueryInterface: ChromeUtils.generateQI(["nsICacheEntryOpenCallback"]),
|
||||
|
||||
onCacheEntryCheck(entry) {
|
||||
onCacheEntryCheck() {
|
||||
return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED;
|
||||
},
|
||||
|
||||
onCacheEntryAvailable(entry, isnew, status) {
|
||||
onCacheEntryAvailable() {
|
||||
resolve();
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ add_task(async function test_principal_permissions() {
|
|||
await new Promise(aResolve => {
|
||||
Services.clearData.deleteData(
|
||||
Ci.nsIClearDataService.CLEAR_PERMISSIONS,
|
||||
value => aResolve()
|
||||
() => aResolve()
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
@ -465,7 +465,7 @@ add_task(async function test_3rdpartystorage_permissions() {
|
|||
await new Promise(aResolve => {
|
||||
Services.clearData.deleteData(
|
||||
Ci.nsIClearDataService.CLEAR_PERMISSIONS,
|
||||
value => aResolve()
|
||||
() => aResolve()
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ add_task(async function test_removing_storage_permission() {
|
|||
await new Promise(aResolve => {
|
||||
Services.clearData.deleteData(
|
||||
Ci.nsIClearDataService.CLEAR_PERMISSIONS,
|
||||
value => aResolve()
|
||||
() => aResolve()
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
@ -138,7 +138,7 @@ add_task(async function test_removing_storage_permission_from_principal() {
|
|||
await new Promise(aResolve => {
|
||||
Services.clearData.deleteData(
|
||||
Ci.nsIClearDataService.CLEAR_PERMISSIONS,
|
||||
value => aResolve()
|
||||
() => aResolve()
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
@ -240,7 +240,7 @@ add_task(async function test_removing_storage_permission_from_base_domainl() {
|
|||
await new Promise(aResolve => {
|
||||
Services.clearData.deleteData(
|
||||
Ci.nsIClearDataService.CLEAR_PERMISSIONS,
|
||||
value => aResolve()
|
||||
() => aResolve()
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
@ -392,7 +392,7 @@ add_task(async function test_deleteUserInteractionForClearingHistory() {
|
|||
await new Promise(aResolve => {
|
||||
Services.clearData.deleteData(
|
||||
Ci.nsIClearDataService.CLEAR_PERMISSIONS,
|
||||
value => aResolve()
|
||||
() => aResolve()
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export function ContentPrefService2() {
|
|||
}
|
||||
|
||||
const cache = new ContentPrefStore();
|
||||
cache.set = function CPS_cache_set(group, name, val) {
|
||||
cache.set = function CPS_cache_set() {
|
||||
Object.getPrototypeOf(this).set.apply(this, arguments);
|
||||
let groupCount = this._groups.size;
|
||||
if (groupCount >= CACHE_MAX_GROUP_ENTRIES) {
|
||||
|
|
@ -211,7 +211,7 @@ ContentPrefService2.prototype = {
|
|||
cbHandleResult(callback, new ContentPref(grp, name, val));
|
||||
}
|
||||
},
|
||||
onDone: (reason, ok, gotRow) => {
|
||||
onDone: (reason, ok) => {
|
||||
if (ok) {
|
||||
for (let [pbGroup, pbName, pbVal] of pbPrefs) {
|
||||
cbHandleResult(callback, new ContentPref(pbGroup, pbName, pbVal));
|
||||
|
|
@ -1088,9 +1088,8 @@ ContentPrefService2.prototype = {
|
|||
*
|
||||
* @param subj This value depends on topic.
|
||||
* @param topic The backchannel "method" name.
|
||||
* @param data This value depends on topic.
|
||||
*/
|
||||
observe: function CPS2_observe(subj, topic, data) {
|
||||
observe: function CPS2_observe(subj, topic) {
|
||||
switch (topic) {
|
||||
case "profile-before-change":
|
||||
this._destroy();
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ export class ContentPrefsParent extends JSProcessActorParent {
|
|||
let actor = this;
|
||||
let args = data.args;
|
||||
|
||||
return new Promise(resolve => {
|
||||
return new Promise(() => {
|
||||
let listener = {
|
||||
handleResult(pref) {
|
||||
actor.sendAsyncMessage("ContentPrefs:HandleResult", {
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ async function runTestsForFrame(browser, isPrivate) {
|
|||
onContentPrefSet(group, name, value, isPrivate) {
|
||||
resolve({ group, name, value, isPrivate });
|
||||
},
|
||||
onContentPrefRemoved(group, name, isPrivate) {
|
||||
onContentPrefRemoved() {
|
||||
reject("got unexpected notification");
|
||||
},
|
||||
};
|
||||
|
|
@ -202,7 +202,7 @@ async function runTestsForFrame(browser, isPrivate) {
|
|||
info("received handleResult");
|
||||
results.push(pref);
|
||||
},
|
||||
handleCompletion(reason) {
|
||||
handleCompletion() {
|
||||
resolve();
|
||||
},
|
||||
handleError(rv) {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ function setWithDate(group, name, val, timestamp, context) {
|
|||
});
|
||||
}
|
||||
|
||||
async function getDate(group, name, context) {
|
||||
async function getDate(group, name) {
|
||||
let conn = await sendMessage("db");
|
||||
let [result] = await conn.execute(
|
||||
`
|
||||
|
|
@ -158,7 +158,7 @@ async function getGlobalOK(args, expectedVal) {
|
|||
await getOKEx("getGlobal", args, expectedPrefs);
|
||||
}
|
||||
|
||||
async function getOKEx(methodName, args, expectedPrefs, strict, context) {
|
||||
async function getOKEx(methodName, args, expectedPrefs, strict) {
|
||||
let actualPrefs = [];
|
||||
await new Promise(resolve => {
|
||||
args.push(
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ BEGIN TRANSACTION;
|
|||
CREATE INDEX prefs_idx ON prefs(groupID, settingID);
|
||||
COMMIT;`;
|
||||
|
||||
function prepareVersion3Schema(callback) {
|
||||
function prepareVersion3Schema() {
|
||||
var dbFile = Services.dirsvc.get("ProfD", Ci.nsIFile);
|
||||
dbFile.append("content-prefs.sqlite");
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ _TabRemovalObserver.prototype = {
|
|||
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
|
||||
observe(subject, topic, data) {
|
||||
observe(subject) {
|
||||
let remoteTab = subject.QueryInterface(Ci.nsIRemoteTab);
|
||||
if (this._remoteTabIds.has(remoteTab.tabId)) {
|
||||
this._remoteTabIds.delete(remoteTab.tabId);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ function runMinidumpAnalyzer(minidumpPath, allThreads) {
|
|||
args.unshift("--full");
|
||||
}
|
||||
|
||||
process.runAsync(args, args.length, (subject, topic, data) => {
|
||||
process.runAsync(args, args.length, (subject, topic) => {
|
||||
switch (topic) {
|
||||
case "process-finished":
|
||||
gRunningProcesses.delete(process);
|
||||
|
|
@ -211,7 +211,7 @@ CrashService.prototype = Object.freeze({
|
|||
await blocker;
|
||||
},
|
||||
|
||||
observe(subject, topic, data) {
|
||||
observe(subject, topic) {
|
||||
switch (topic) {
|
||||
case "profile-after-change":
|
||||
// Side-effect is the singleton is instantiated.
|
||||
|
|
|
|||
|
|
@ -824,7 +824,7 @@ add_task(async function test_glean_crash_ping() {
|
|||
|
||||
// Test with additional fields
|
||||
submitted = false;
|
||||
GleanPings.crash.testBeforeNextSubmit(reason => {
|
||||
GleanPings.crash.testBeforeNextSubmit(() => {
|
||||
submitted = true;
|
||||
const MINUTES = new Date(DUMMY_DATE_2);
|
||||
MINUTES.setSeconds(0);
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ add_task(async function test_addCrash_quitting() {
|
|||
await setup(firstCrashId);
|
||||
|
||||
let minidumpAnalyzerKilledPromise = new Promise((resolve, reject) => {
|
||||
Services.obs.addObserver((subject, topic, data) => {
|
||||
Services.obs.addObserver((subject, topic) => {
|
||||
if (topic === "test-minidump-analyzer-killed") {
|
||||
resolve();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ add_task(async function test_add_mixed_types() {
|
|||
allAdd &&
|
||||
s.addCrash(ptName, CRASH_TYPE_CRASH, ptName + "crash", new Date());
|
||||
},
|
||||
(_, ptName) => {
|
||||
_ => {
|
||||
allAdd =
|
||||
allAdd &&
|
||||
s.addCrash(
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ export var CrashMonitor = {
|
|||
*
|
||||
* Update checkpoint file for every new notification received.
|
||||
*/
|
||||
observe(aSubject, aTopic, aData) {
|
||||
observe(aSubject, aTopic) {
|
||||
this.writeCheckpoint(aTopic);
|
||||
|
||||
if (
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ CrashMonitor.prototype = {
|
|||
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIObserver"]),
|
||||
|
||||
observe(aSubject, aTopic, aData) {
|
||||
observe(aSubject, aTopic) {
|
||||
switch (aTopic) {
|
||||
case "profile-after-change":
|
||||
MonitorAPI.init();
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ FileFaker.prototype = {
|
|||
},
|
||||
};
|
||||
|
||||
function do_get_file(path, allowNonexistent) {
|
||||
function do_get_file(path) {
|
||||
if (!_WORKINGDIR_) {
|
||||
do_throw("No way to fake files if working directory is unknown!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3470,7 +3470,7 @@ function run_string_tests(library) {
|
|||
Assert.equal(ptrValue(test_ansi_echo(null)), 0);
|
||||
}
|
||||
|
||||
function run_readstring_tests(library) {
|
||||
function run_readstring_tests() {
|
||||
// ASCII decode test, "hello world"
|
||||
let ascii_string = ctypes.unsigned_char.array(12)();
|
||||
ascii_string[0] = 0x68;
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ EnterprisePoliciesManager.prototype = {
|
|||
},
|
||||
|
||||
// nsIObserver implementation
|
||||
observe: function BG_observe(subject, topic, data) {
|
||||
observe: function BG_observe(subject, topic) {
|
||||
switch (topic) {
|
||||
case "policies-startup":
|
||||
// Before the first set of policy callbacks runs, we must
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@ add_task(async function test_enterprise_only_policies() {
|
|||
enterprisePolicyRan = false;
|
||||
|
||||
Policies.NormalPolicy = {
|
||||
onProfileAfterChange(manager, param) {
|
||||
onProfileAfterChange() {
|
||||
normalPolicyRan = true;
|
||||
},
|
||||
};
|
||||
|
||||
Policies.EnterpriseOnlyPolicy = {
|
||||
onProfileAfterChange(manager, param) {
|
||||
onProfileAfterChange() {
|
||||
enterprisePolicyRan = true;
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ async function cleanUp() {
|
|||
await new Promise(resolve => {
|
||||
Services.clearData.deleteData(
|
||||
Ci.nsIClearDataService.CLEAR_PERMISSIONS,
|
||||
value => resolve()
|
||||
() => resolve()
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ SanityTest.prototype = {
|
|||
return true;
|
||||
},
|
||||
|
||||
observe(subject, topic, data) {
|
||||
observe(subject, topic) {
|
||||
if (topic != "profile-after-change") {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ const gfxFrameScript = {
|
|||
return aUri.endsWith("/sanitytest.html");
|
||||
},
|
||||
|
||||
onStateChange(webProgress, req, flags, status) {
|
||||
onStateChange(webProgress, req, flags) {
|
||||
if (
|
||||
webProgress.isTopLevel &&
|
||||
flags & Ci.nsIWebProgressListener.STATE_STOP &&
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ function setupFileServer() {
|
|||
"GET",
|
||||
`${SECURE_ROOT_PATH}file_upgrade_insecure_server.sjs?queryresult=${INSECURE_ROOT_PATH}`
|
||||
);
|
||||
xhrRequest.onload = function (e) {
|
||||
xhrRequest.onload = function () {
|
||||
var results = xhrRequest.responseText.split(",");
|
||||
resolve(results);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ var listener = {
|
|||
);
|
||||
},
|
||||
|
||||
onDataAvailable(request, stream, offset, count) {
|
||||
onDataAvailable(request, stream) {
|
||||
try {
|
||||
var bis = Cc["@mozilla.org/binaryinputstream;1"].createInstance(
|
||||
Ci.nsIBinaryInputStream
|
||||
|
|
@ -83,7 +83,7 @@ var listener = {
|
|||
}
|
||||
},
|
||||
|
||||
onStopRequest(request, status) {
|
||||
onStopRequest() {
|
||||
testRan++;
|
||||
runNext();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ var listener = {
|
|||
);
|
||||
},
|
||||
|
||||
onDataAvailable(request, stream, offset, count) {
|
||||
onDataAvailable(request, stream) {
|
||||
try {
|
||||
var bis = Cc["@mozilla.org/binaryinputstream;1"].createInstance(
|
||||
Ci.nsIBinaryInputStream
|
||||
|
|
@ -73,7 +73,7 @@ var listener = {
|
|||
}
|
||||
},
|
||||
|
||||
onStopRequest(request, status) {
|
||||
onStopRequest() {
|
||||
testRan++;
|
||||
runNext();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ export const SpecialMessageActions = {
|
|||
Ci.nsISupportsWeakReference,
|
||||
]),
|
||||
|
||||
observe(aSubject, aTopic, aData) {
|
||||
observe() {
|
||||
let state = lazy.UIState.get();
|
||||
if (state.status === lazy.UIState.STATUS_SIGNED_IN) {
|
||||
// We completed sign-in, so tear down our listener / observer and resolve
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"use strict";
|
||||
|
||||
add_task(async function test_OPEN_PROTECTION_PANEL() {
|
||||
await BrowserTestUtils.withNewTab(EXAMPLE_URL, async browser => {
|
||||
await BrowserTestUtils.withNewTab(EXAMPLE_URL, async () => {
|
||||
const popupshown = BrowserTestUtils.waitForEvent(
|
||||
window,
|
||||
"popupshown",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"use strict";
|
||||
|
||||
add_task(async function test_PIN_CURRENT_TAB() {
|
||||
await BrowserTestUtils.withNewTab("about:blank", async browser => {
|
||||
await BrowserTestUtils.withNewTab("about:blank", async () => {
|
||||
await SMATestUtils.executeAndValidateAction({ type: "PIN_CURRENT_TAB" });
|
||||
|
||||
ok(gBrowser.selectedTab.pinned, "should pin current tab");
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ export class MLEngineParent extends JSWindowActorParent {
|
|||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
async receiveMessage({ name, data }) {
|
||||
async receiveMessage({ name }) {
|
||||
switch (name) {
|
||||
case "MLEngine:Ready":
|
||||
if (lazy.EngineProcess.resolveMLEngineParent) {
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ export var PdfJs = {
|
|||
},
|
||||
|
||||
// nsIObserver
|
||||
observe(aSubject, aTopic, aData) {
|
||||
observe() {
|
||||
this.checkIsDefault();
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ export class NetworkManager {
|
|||
xhr.responseType = "arraybuffer";
|
||||
|
||||
if (args.onError) {
|
||||
xhr.onerror = function (evt) {
|
||||
xhr.onerror = function () {
|
||||
args.onError(xhr.status);
|
||||
};
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ export class NetworkManager {
|
|||
}
|
||||
}
|
||||
|
||||
onStateChange(xhrId, evt) {
|
||||
onStateChange(xhrId) {
|
||||
var pendingRequest = this.pendingRequests[xhrId];
|
||||
if (!pendingRequest) {
|
||||
// Maybe abortRequest was called...
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ class ChromeActions {
|
|||
}
|
||||
}
|
||||
|
||||
download(data, sendResponse) {
|
||||
download(data) {
|
||||
const { originalUrl, options } = data;
|
||||
const blobUrl = data.blobUrl || originalUrl;
|
||||
let { filename } = data;
|
||||
|
|
@ -318,7 +318,7 @@ class ChromeActions {
|
|||
actor.sendAsyncMessage("PDFJS:Parent:getNimbus");
|
||||
Services.obs.addObserver(
|
||||
{
|
||||
observe(aSubject, aTopic, aData) {
|
||||
observe(aSubject, aTopic) {
|
||||
if (aTopic === "pdfjs-getNimbus") {
|
||||
Services.obs.removeObserver(this, aTopic);
|
||||
sendResponse(aSubject && JSON.stringify(aSubject.wrappedJSObject));
|
||||
|
|
@ -747,7 +747,7 @@ PdfStreamConverter.prototype = {
|
|||
*/
|
||||
|
||||
// nsIStreamConverter::convert
|
||||
convert(aFromStream, aFromType, aToType, aCtxt) {
|
||||
convert() {
|
||||
throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED);
|
||||
},
|
||||
|
||||
|
|
@ -1020,7 +1020,7 @@ PdfStreamConverter.prototype = {
|
|||
// request(aRequest) below so we don't overwrite the original channel and
|
||||
// trigger an assertion.
|
||||
var proxy = {
|
||||
onStartRequest(request) {
|
||||
onStartRequest() {
|
||||
listener.onStartRequest(aRequest);
|
||||
},
|
||||
onDataAvailable(request, inputStream, offset, count) {
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ export class PdfjsParent extends JSWindowActorParent {
|
|||
let newBrowser = aEvent.detail;
|
||||
newBrowser.addEventListener(
|
||||
"EndSwapDocShells",
|
||||
evt => {
|
||||
() => {
|
||||
this._hookupEventListeners(newBrowser);
|
||||
},
|
||||
{ once: true }
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const OS_PDF_URL = TESTROOT + "file_pdfjs_object_stream.pdf";
|
|||
const TEST_PDF_URL = TESTROOT + "file_pdfjs_test.pdf";
|
||||
|
||||
add_task(async function test_find_octet_stream_pdf() {
|
||||
await BrowserTestUtils.withNewTab(OS_PDF_URL, async browser => {
|
||||
await BrowserTestUtils.withNewTab(OS_PDF_URL, async () => {
|
||||
let findEls = ["cmd_find", "cmd_findAgain", "cmd_findPrevious"].map(id =>
|
||||
document.getElementById(id)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ add_task(async function test_file_opening() {
|
|||
// the default - because files from disk should always use pdfjs, unless
|
||||
// it is forcibly disabled.
|
||||
let openedWindow = false;
|
||||
let windowOpenedPromise = new Promise((resolve, reject) => {
|
||||
let windowOpenedPromise = new Promise(resolve => {
|
||||
addWindowListener(
|
||||
"chrome://mozapps/content/downloads/unknownContentType.xhtml",
|
||||
() => {
|
||||
|
|
@ -82,7 +82,7 @@ function addWindowListener(aURL, aCallback) {
|
|||
aCallback();
|
||||
}, domwindow);
|
||||
},
|
||||
onCloseWindow(aXULWindow) {},
|
||||
onCloseWindow() {},
|
||||
};
|
||||
Services.wm.addListener(listener);
|
||||
listenerCleanup = () => Services.wm.removeListener(listener);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function waitForFullScreenState(browser, state) {
|
|||
return new Promise(resolve => {
|
||||
let eventReceived = false;
|
||||
|
||||
let observe = (subject, topic, data) => {
|
||||
let observe = () => {
|
||||
if (!eventReceived) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ async function contentSetUp() {
|
|||
return new Promise(resolve => {
|
||||
document.addEventListener(
|
||||
"pagerendered",
|
||||
function (e) {
|
||||
function () {
|
||||
document.querySelector("#viewer").click();
|
||||
resolve();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ add_task(async function test_octet_stream_in_frame() {
|
|||
|
||||
await BrowserTestUtils.withNewTab(
|
||||
{ gBrowser, url: `data:text/html,<iframe src='${PDF_URL}'>` },
|
||||
async function (newTabBrowser) {
|
||||
async function () {
|
||||
// wait until downloadsPanel opens before continuing with test
|
||||
info("Waiting for download panel to open");
|
||||
await downloadsPanelPromise;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,6 @@ function addWindowListener(aURL, aCallback) {
|
|||
aCallback();
|
||||
}, domwindow);
|
||||
},
|
||||
onCloseWindow(aXULWindow) {},
|
||||
onCloseWindow() {},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ var logger = (function () {
|
|||
return _logger;
|
||||
})();
|
||||
|
||||
function serializeSettings(settings, logPrefix) {
|
||||
function serializeSettings(settings) {
|
||||
let re = /^(k[A-Z]|resolution)/; // accessing settings.resolution throws an exception?
|
||||
let types = new Set(["string", "boolean", "number", "undefined"]);
|
||||
let nameValues = {};
|
||||
|
|
@ -80,7 +80,7 @@ function cancelDeferredTasks() {
|
|||
|
||||
document.addEventListener(
|
||||
"DOMContentLoaded",
|
||||
e => {
|
||||
() => {
|
||||
window._initialized = PrintEventHandler.init().catch(e => console.error(e));
|
||||
ourBrowser.setAttribute("flex", "0");
|
||||
ourBrowser.setAttribute("constrainpopups", "false");
|
||||
|
|
@ -96,7 +96,7 @@ window.addEventListener("dialogclosing", () => {
|
|||
|
||||
window.addEventListener(
|
||||
"unload",
|
||||
e => {
|
||||
() => {
|
||||
document.textContent = "";
|
||||
},
|
||||
{ once: true }
|
||||
|
|
@ -1608,7 +1608,7 @@ function PrintUIControlMixin(superClass) {
|
|||
|
||||
render() {}
|
||||
|
||||
update(settings) {}
|
||||
update() {}
|
||||
|
||||
dispatchSettingsChange(changedSettings) {
|
||||
this.dispatchEvent(
|
||||
|
|
@ -1628,7 +1628,7 @@ function PrintUIControlMixin(superClass) {
|
|||
);
|
||||
}
|
||||
|
||||
handleEvent(event) {}
|
||||
handleEvent() {}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1863,7 +1863,7 @@ class PrintSettingCheckbox extends PrintUIControlMixin(HTMLInputElement) {
|
|||
this.checked = settings[this.settingName];
|
||||
}
|
||||
|
||||
handleEvent(e) {
|
||||
handleEvent() {
|
||||
this.dispatchSettingsChange({
|
||||
[this.settingName]: this.checked,
|
||||
});
|
||||
|
|
@ -1884,7 +1884,7 @@ class PrintSettingRadio extends PrintUIControlMixin(HTMLInputElement) {
|
|||
this.checked = settings[this.settingName] == this.value;
|
||||
}
|
||||
|
||||
handleEvent(e) {
|
||||
handleEvent() {
|
||||
this.dispatchSettingsChange({
|
||||
[this.settingName]: this.value,
|
||||
});
|
||||
|
|
@ -2020,7 +2020,7 @@ class CopiesInput extends PrintUIControlMixin(HTMLElement) {
|
|||
this._copiesError.hidden = true;
|
||||
}
|
||||
|
||||
handleEvent(e) {
|
||||
handleEvent() {
|
||||
this._copiesError.hidden = this._copiesInput.checkValidity();
|
||||
}
|
||||
}
|
||||
|
|
@ -2679,7 +2679,7 @@ class TwistySummary extends PrintUIControlMixin(HTMLElement) {
|
|||
this.updateSummary(shouldOpen);
|
||||
}
|
||||
|
||||
handleEvent(e) {
|
||||
handleEvent() {
|
||||
let willOpen = !this.isOpen;
|
||||
Services.prefs.setBoolPref("print.more-settings.open", willOpen);
|
||||
this.updateSummary(willOpen);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ async function waitForPageStatusUpdate(elem, expected, message) {
|
|||
);
|
||||
}
|
||||
|
||||
async function waitUntilVisible(elem, visible = true) {
|
||||
async function waitUntilVisible(elem) {
|
||||
await TestUtils.waitForCondition(
|
||||
() =>
|
||||
BrowserTestUtils.isVisible(elem) && getComputedStyle(elem).opacity == "1",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<script>
|
||||
let count = 0;
|
||||
onload = function() {
|
||||
window.addEventListener('beforeprint', (event) => {
|
||||
window.addEventListener('beforeprint', () => {
|
||||
document.getElementById("before-print-count").innerText = ++count;
|
||||
print()
|
||||
});
|
||||
|
|
|
|||
|
|
@ -232,11 +232,7 @@ class PrintHelper {
|
|||
});
|
||||
|
||||
// Mock PrintEventHandler with our Promises.
|
||||
this.win.PrintEventHandler._showPrintDialog = (
|
||||
window,
|
||||
haveSelection,
|
||||
settings
|
||||
) => {
|
||||
this.win.PrintEventHandler._showPrintDialog = (window, haveSelection) => {
|
||||
this.systemDialogOpenedWithSelection = haveSelection;
|
||||
return showSystemDialogPromise;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ MainProcessSingleton.prototype = {
|
|||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
||||
observe(subject, topic, data) {
|
||||
observe(subject, topic) {
|
||||
switch (topic) {
|
||||
case "app-startup": {
|
||||
// Imported for side-effects.
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue