From 771b361ca1a33dd9ba3afdfdadfedf4621c98873 Mon Sep 17 00:00:00 2001 From: Magnus Melin Date: Sat, 14 Mar 2020 14:33:11 +0200 Subject: [PATCH] Bug 1620556 - comm-central automatic code fixes for Prettier 1.19.1 upgrade. rs=eslint --HG-- extra : amend_source : a3a3a71e4de9500d0466ca28f7804bc3ad500426 --- calendar/base/src/CalEvent.jsm | 5 +- .../content/html-item-editing/react-code.js | 10 +- .../content/lightning-item-iframe.js | 8 +- calendar/test/browser/browser_taskDisplay.js | 5 +- calendar/test/browser/browser_timezones.js | 715 ++++++++++++++++-- .../test/browser/recurrence/browser_daily.js | 5 +- .../recurrenceRotated/browser_daily.js | 5 +- calendar/test/unit/test_itip_utils.js | 10 +- calendar/test/unit/test_unifinder_utils.js | 38 +- chat/components/src/test/test_logger.js | 5 +- chat/modules/test/test_NormalizedMap.js | 5 +- chat/protocols/irc/test/test_ircMessage.js | 6 +- chat/protocols/twitter/twitter.jsm | 5 +- chat/protocols/xmpp/xmpp-session.jsm | 4 +- mail/base/content/editContactPanel.js | 2 +- mail/base/content/tabmail.js | 2 +- mail/base/modules/DBViewWrapper.jsm | 4 +- .../about-support/content/aboutSupport.js | 12 +- .../accountcreation/content/util.js | 5 +- mail/components/extensions/parent/ext-tabs.js | 4 +- .../im/content/chat-conversation.js | 4 +- mail/components/im/modules/index_im.jsm | 6 +- .../test/unit/test_autoconfigUtils.js | 10 +- .../test/unit/test_telemetry_buildconfig.js | 10 +- .../folder-display/browser_paneFocus.js | 9 +- .../quick-filter-bar/browser_filterLogic.js | 32 +- .../db/gloda/test/unit/test_fts3_tokenizer.js | 5 +- .../test/unit/test_traits.js | 14 +- mailnews/mime/jsmime/test/unit/test_header.js | 10 +- .../jsmime/test/unit/test_header_emitter.js | 10 +- .../test/unit/test_nsIMsgHeaderParser4.js | 5 +- .../test/unit/test_nsIMsgHeaderParser5.js | 10 +- 32 files changed, 840 insertions(+), 140 deletions(-) diff --git a/calendar/base/src/CalEvent.jsm b/calendar/base/src/CalEvent.jsm index 0137de2a25..7264f4c5a3 100644 --- a/calendar/base/src/CalEvent.jsm +++ b/calendar/base/src/CalEvent.jsm @@ -74,7 +74,10 @@ CalEvent.prototype = { return this.startDate; }, - icsEventPropMap: [{ cal: "DTSTART", ics: "startTime" }, { cal: "DTEND", ics: "endTime" }], + icsEventPropMap: [ + { cal: "DTSTART", ics: "startTime" }, + { cal: "DTEND", ics: "endTime" }, + ], set icalString(value) { this.icalComponent = cal.getIcsService().parseICS(value, null); diff --git a/calendar/lightning/content/html-item-editing/react-code.js b/calendar/lightning/content/html-item-editing/react-code.js index d712f592ca..4b93a98de6 100644 --- a/calendar/lightning/content/html-item-editing/react-code.js +++ b/calendar/lightning/content/html-item-editing/react-code.js @@ -174,7 +174,10 @@ var TopComponent = React.createClass({ initialAttachments: {}, tabs: ["Description", "More", "Reminders", "Attachments", "Attendees"], - calendarList: [[0, "Home"], [1, "Work"]], + calendarList: [ + [0, "Home"], + [1, "Work"], + ], privacyList: [ ["NONE", "Not Specified"], ["PUBLIC", "Public Event"], @@ -194,7 +197,10 @@ var TopComponent = React.createClass({ [5, "Normal"], [1, "High"], ], - showTimeAsList: [["OPAQUE", true], ["TRANSPARENT", false]], + showTimeAsList: [ + ["OPAQUE", true], + ["TRANSPARENT", false], + ], repeatList: [ ["none", "Does Not Repeat"], ["daily", "Daily"], diff --git a/calendar/lightning/content/lightning-item-iframe.js b/calendar/lightning/content/lightning-item-iframe.js index af8c91eafe..5a628cdaff 100644 --- a/calendar/lightning/content/lightning-item-iframe.js +++ b/calendar/lightning/content/lightning-item-iframe.js @@ -4230,11 +4230,9 @@ function displayCounterProposal() { if (idCounter > 0) { if (partStat && attendeeId.length) { - document.getElementById("counter-proposal-summary").value = cal.l10n.getString( - "calendar-event-dialog", - partStat, - [attendeeId] - ); + document.getElementById( + "counter-proposal-summary" + ).value = cal.l10n.getString("calendar-event-dialog", partStat, [attendeeId]); document.getElementById("counter-proposal-summary").removeAttribute("collapsed"); } if (comment) { diff --git a/calendar/test/browser/browser_taskDisplay.js b/calendar/test/browser/browser_taskDisplay.js index a1d5f508eb..7aeb7b7e3f 100644 --- a/calendar/test/browser/browser_taskDisplay.js +++ b/calendar/test/browser/browser_taskDisplay.js @@ -51,7 +51,10 @@ add_task(async () => { // Although the order of expectedTasks matches the observed behaviour when // this test was written, order is NOT checked here. The order of the list // is not well defined (particularly when changing the filter text). - ok(expectedTasks.every(task => actualTasks.includes(task)), "All expected tasks found"); + ok( + expectedTasks.every(task => actualTasks.includes(task)), + "All expected tasks found" + ); } let today = cal.dtz.now(); diff --git a/calendar/test/browser/browser_timezones.js b/calendar/test/browser/browser_timezones.js index d95c0217b3..335d791c36 100644 --- a/calendar/test/browser/browser_timezones.js +++ b/calendar/test/browser/browser_timezones.js @@ -55,7 +55,16 @@ add_task(async function testTimezones2_CreateEvents() { goToDate(controller, 2009, 1, 1); // Create weekly recurring events in all TIMEZONES. - let times = [[4, 30], [5, 0], [3, 0], [3, 0], [9, 0], [14, 0], [19, 45], [1, 30]]; + let times = [ + [4, 30], + [5, 0], + [3, 0], + [3, 0], + [9, 0], + [14, 0], + [19, 45], + [1, 30], + ]; let time = new Date(); for (let i = 0; i < TIMEZONES.length; i++) { let eventBox = lookupEventBox("day", CANVAS_BOX, null, 1, i + 11); @@ -82,14 +91,86 @@ add_task(async function testTimezones2_CreateEvents() { add_task(function testTimezones3_checkStJohns() { Services.prefs.setStringPref("calendar.timezone.local", "America/St_Johns"); let times = [ - [[4, 30], [5, 30], [6, 30], [7, 30], [8, 30], [9, 30], [10, 30], [11, 30]], - [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [9, 30], [11, 30], [12, 30]], - [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [9, 30], [11, 30], [13, 30]], - [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [9, 30], [11, 30], [13, 30]], - [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [9, 30], [11, 30], [13, 30]], - [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [9, 30], [11, 30], [12, 30]], - [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [10, 30], [11, 30], [12, 30]], - [[4, 30], [5, 30], [6, 30], [7, 30], [8, 30], [9, 30], [10, 30], [11, 30]], + [ + [4, 30], + [5, 30], + [6, 30], + [7, 30], + [8, 30], + [9, 30], + [10, 30], + [11, 30], + ], + [ + [4, 30], + [6, 30], + [7, 30], + [7, 30], + [9, 30], + [9, 30], + [11, 30], + [12, 30], + ], + [ + [4, 30], + [6, 30], + [7, 30], + [7, 30], + [9, 30], + [9, 30], + [11, 30], + [13, 30], + ], + [ + [4, 30], + [6, 30], + [7, 30], + [7, 30], + [9, 30], + [9, 30], + [11, 30], + [13, 30], + ], + [ + [4, 30], + [6, 30], + [7, 30], + [7, 30], + [9, 30], + [9, 30], + [11, 30], + [13, 30], + ], + [ + [4, 30], + [6, 30], + [7, 30], + [7, 30], + [9, 30], + [9, 30], + [11, 30], + [12, 30], + ], + [ + [4, 30], + [6, 30], + [7, 30], + [7, 30], + [9, 30], + [10, 30], + [11, 30], + [12, 30], + ], + [ + [4, 30], + [5, 30], + [6, 30], + [7, 30], + [8, 30], + [9, 30], + [10, 30], + [11, 30], + ], ]; controller.click(eid("calendar-tab-button")); switchToView(controller, "day"); @@ -103,14 +184,86 @@ add_task(function testTimezones4_checkCaracas() { // This is actually incorrect. Venezuela shifted clocks forward 30 minutes // in 2016, but our code doesn't handle historical timezones. let times = [ - [[4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0]], - [[3, 0], [5, 0], [6, 0], [6, 0], [8, 0], [8, 0], [10, 0], [11, 0]], - [[3, 0], [5, 0], [6, 0], [6, 0], [8, 0], [8, 0], [10, 0], [12, 0]], - [[3, 0], [5, 0], [6, 0], [6, 0], [8, 0], [8, 0], [10, 0], [12, 0]], - [[3, 0], [5, 0], [6, 0], [6, 0], [8, 0], [8, 0], [10, 0], [12, 0]], - [[3, 0], [5, 0], [6, 0], [6, 0], [8, 0], [8, 0], [10, 0], [11, 0]], - [[3, 0], [5, 0], [6, 0], [6, 0], [8, 0], [9, 0], [10, 0], [11, 0]], - [[4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0]], + [ + [4, 0], + [5, 0], + [6, 0], + [7, 0], + [8, 0], + [9, 0], + [10, 0], + [11, 0], + ], + [ + [3, 0], + [5, 0], + [6, 0], + [6, 0], + [8, 0], + [8, 0], + [10, 0], + [11, 0], + ], + [ + [3, 0], + [5, 0], + [6, 0], + [6, 0], + [8, 0], + [8, 0], + [10, 0], + [12, 0], + ], + [ + [3, 0], + [5, 0], + [6, 0], + [6, 0], + [8, 0], + [8, 0], + [10, 0], + [12, 0], + ], + [ + [3, 0], + [5, 0], + [6, 0], + [6, 0], + [8, 0], + [8, 0], + [10, 0], + [12, 0], + ], + [ + [3, 0], + [5, 0], + [6, 0], + [6, 0], + [8, 0], + [8, 0], + [10, 0], + [11, 0], + ], + [ + [3, 0], + [5, 0], + [6, 0], + [6, 0], + [8, 0], + [9, 0], + [10, 0], + [11, 0], + ], + [ + [4, 0], + [5, 0], + [6, 0], + [7, 0], + [8, 0], + [9, 0], + [10, 0], + [11, 0], + ], ]; controller.click(eid("calendar-tab-button")); switchToView(controller, "day"); @@ -122,14 +275,86 @@ add_task(function testTimezones4_checkCaracas() { add_task(function testTimezones5_checkPhoenix() { Services.prefs.setStringPref("calendar.timezone.local", "America/Phoenix"); let times = [ - [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [8, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [9, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [9, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [9, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [8, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [6, 0], [7, 0], [8, 0]], - [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0]], + [ + [1, 0], + [2, 0], + [3, 0], + [4, 0], + [5, 0], + [6, 0], + [7, 0], + [8, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [5, 0], + [7, 0], + [8, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [5, 0], + [7, 0], + [9, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [5, 0], + [7, 0], + [9, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [5, 0], + [7, 0], + [9, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [5, 0], + [7, 0], + [8, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [6, 0], + [7, 0], + [8, 0], + ], + [ + [1, 0], + [2, 0], + [3, 0], + [4, 0], + [5, 0], + [6, 0], + [7, 0], + [8, 0], + ], ]; controller.click(eid("calendar-tab-button")); switchToView(controller, "day"); @@ -141,14 +366,86 @@ add_task(function testTimezones5_checkPhoenix() { add_task(function testTimezones6_checkLosAngeles() { Services.prefs.setStringPref("calendar.timezone.local", "America/Los_Angeles"); let times = [ - [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [8, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [9, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [9, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [9, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [8, 0]], - [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [6, 0], [7, 0], [8, 0]], - [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0]], + [ + [0, 0], + [1, 0], + [2, 0], + [3, 0], + [4, 0], + [5, 0], + [6, 0], + [7, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [5, 0], + [7, 0], + [8, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [5, 0], + [7, 0], + [9, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [5, 0], + [7, 0], + [9, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [5, 0], + [7, 0], + [9, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [5, 0], + [7, 0], + [8, 0], + ], + [ + [0, 0], + [2, 0], + [3, 0], + [3, 0], + [5, 0], + [6, 0], + [7, 0], + [8, 0], + ], + [ + [0, 0], + [1, 0], + [2, 0], + [3, 0], + [4, 0], + [5, 0], + [6, 0], + [7, 0], + ], ]; controller.click(eid("calendar-tab-button")); switchToView(controller, "day"); @@ -160,14 +457,86 @@ add_task(function testTimezones6_checkLosAngeles() { add_task(function testTimezones7_checkBuenosAires() { Services.prefs.setStringPref("calendar.timezone.local", "America/Argentina/Buenos_Aires"); let times = [ - [[5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0]], - [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [9, 0], [11, 0], [12, 0]], - [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [9, 0], [11, 0], [13, 0]], - [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [9, 0], [11, 0], [13, 0]], - [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [9, 0], [11, 0], [13, 0]], - [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [9, 0], [11, 0], [12, 0]], - [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [10, 0], [11, 0], [12, 0]], - [[5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0]], + [ + [5, 0], + [6, 0], + [7, 0], + [8, 0], + [9, 0], + [10, 0], + [11, 0], + [12, 0], + ], + [ + [4, 0], + [6, 0], + [7, 0], + [7, 0], + [9, 0], + [9, 0], + [11, 0], + [12, 0], + ], + [ + [4, 0], + [6, 0], + [7, 0], + [7, 0], + [9, 0], + [9, 0], + [11, 0], + [13, 0], + ], + [ + [4, 0], + [6, 0], + [7, 0], + [7, 0], + [9, 0], + [9, 0], + [11, 0], + [13, 0], + ], + [ + [4, 0], + [6, 0], + [7, 0], + [7, 0], + [9, 0], + [9, 0], + [11, 0], + [13, 0], + ], + [ + [4, 0], + [6, 0], + [7, 0], + [7, 0], + [9, 0], + [9, 0], + [11, 0], + [12, 0], + ], + [ + [4, 0], + [6, 0], + [7, 0], + [7, 0], + [9, 0], + [10, 0], + [11, 0], + [12, 0], + ], + [ + [5, 0], + [6, 0], + [7, 0], + [8, 0], + [9, 0], + [10, 0], + [11, 0], + [12, 0], + ], ]; controller.click(eid("calendar-tab-button")); switchToView(controller, "day"); @@ -179,14 +548,86 @@ add_task(function testTimezones7_checkBuenosAires() { add_task(function testTimezones8_checkParis() { Services.prefs.setStringPref("calendar.timezone.local", "Europe/Paris"); let times = [ - [[9, 0], [10, 0], [11, 0], [12, 0], [13, 0], [14, 0], [15, 0], [16, 0]], - [[9, 0], [11, 0], [12, 0], [12, 0], [14, 0], [14, 0], [16, 0], [17, 0]], - [[9, 0], [11, 0], [12, 0], [12, 0], [14, 0], [14, 0], [16, 0], [18, 0]], - [[9, 0], [11, 0], [12, 0], [12, 0], [14, 0], [14, 0], [16, 0], [18, 0]], - [[9, 0], [11, 0], [12, 0], [12, 0], [14, 0], [14, 0], [16, 0], [18, 0]], - [[9, 0], [11, 0], [12, 0], [12, 0], [14, 0], [14, 0], [16, 0], [17, 0]], - [[8, 0], [10, 0], [11, 0], [11, 0], [13, 0], [14, 0], [15, 0], [16, 0]], - [[9, 0], [10, 0], [11, 0], [12, 0], [13, 0], [14, 0], [15, 0], [16, 0]], + [ + [9, 0], + [10, 0], + [11, 0], + [12, 0], + [13, 0], + [14, 0], + [15, 0], + [16, 0], + ], + [ + [9, 0], + [11, 0], + [12, 0], + [12, 0], + [14, 0], + [14, 0], + [16, 0], + [17, 0], + ], + [ + [9, 0], + [11, 0], + [12, 0], + [12, 0], + [14, 0], + [14, 0], + [16, 0], + [18, 0], + ], + [ + [9, 0], + [11, 0], + [12, 0], + [12, 0], + [14, 0], + [14, 0], + [16, 0], + [18, 0], + ], + [ + [9, 0], + [11, 0], + [12, 0], + [12, 0], + [14, 0], + [14, 0], + [16, 0], + [18, 0], + ], + [ + [9, 0], + [11, 0], + [12, 0], + [12, 0], + [14, 0], + [14, 0], + [16, 0], + [17, 0], + ], + [ + [8, 0], + [10, 0], + [11, 0], + [11, 0], + [13, 0], + [14, 0], + [15, 0], + [16, 0], + ], + [ + [9, 0], + [10, 0], + [11, 0], + [12, 0], + [13, 0], + [14, 0], + [15, 0], + [16, 0], + ], ]; controller.click(eid("calendar-tab-button")); switchToView(controller, "day"); @@ -198,14 +639,86 @@ add_task(function testTimezones8_checkParis() { add_task(function testTimezones9_checkKathmandu() { Services.prefs.setStringPref("calendar.timezone.local", "Asia/Kathmandu"); let times = [ - [[13, 45], [14, 45], [15, 45], [16, 45], [17, 45], [18, 45], [19, 45], [20, 45]], - [[12, 45], [14, 45], [15, 45], [15, 45], [17, 45], [17, 45], [19, 45], [20, 45]], - [[12, 45], [14, 45], [15, 45], [15, 45], [17, 45], [17, 45], [19, 45], [21, 45]], - [[12, 45], [14, 45], [15, 45], [15, 45], [17, 45], [17, 45], [19, 45], [21, 45]], - [[12, 45], [14, 45], [15, 45], [15, 45], [17, 45], [17, 45], [19, 45], [21, 45]], - [[12, 45], [14, 45], [15, 45], [15, 45], [17, 45], [17, 45], [19, 45], [20, 45]], - [[12, 45], [14, 45], [15, 45], [15, 45], [17, 45], [18, 45], [19, 45], [20, 45]], - [[13, 45], [14, 45], [15, 45], [16, 45], [17, 45], [18, 45], [19, 45], [20, 45]], + [ + [13, 45], + [14, 45], + [15, 45], + [16, 45], + [17, 45], + [18, 45], + [19, 45], + [20, 45], + ], + [ + [12, 45], + [14, 45], + [15, 45], + [15, 45], + [17, 45], + [17, 45], + [19, 45], + [20, 45], + ], + [ + [12, 45], + [14, 45], + [15, 45], + [15, 45], + [17, 45], + [17, 45], + [19, 45], + [21, 45], + ], + [ + [12, 45], + [14, 45], + [15, 45], + [15, 45], + [17, 45], + [17, 45], + [19, 45], + [21, 45], + ], + [ + [12, 45], + [14, 45], + [15, 45], + [15, 45], + [17, 45], + [17, 45], + [19, 45], + [21, 45], + ], + [ + [12, 45], + [14, 45], + [15, 45], + [15, 45], + [17, 45], + [17, 45], + [19, 45], + [20, 45], + ], + [ + [12, 45], + [14, 45], + [15, 45], + [15, 45], + [17, 45], + [18, 45], + [19, 45], + [20, 45], + ], + [ + [13, 45], + [14, 45], + [15, 45], + [16, 45], + [17, 45], + [18, 45], + [19, 45], + [20, 45], + ], ]; controller.click(eid("calendar-tab-button")); switchToView(controller, "day"); @@ -217,14 +730,86 @@ add_task(function testTimezones9_checkKathmandu() { add_task(function testTimezones10_checkAdelaide() { Services.prefs.setStringPref("calendar.timezone.local", "Australia/Adelaide"); let times = [ - [[18, 30], [19, 30], [20, 30], [21, 30], [22, 30], [23, 30], [0, 30, +1], [1, 30, +1]], - [[17, 30], [19, 30], [20, 30], [20, 30], [22, 30], [22, 30], [0, 30, +1], [1, 30, +1]], - [[16, 30], [18, 30], [19, 30], [19, 30], [21, 30], [21, 30], [23, 30], [1, 30, +1]], - [[16, 30], [18, 30], [19, 30], [19, 30], [21, 30], [21, 30], [23, 30], [1, 30, +1]], - [[16, 30], [18, 30], [19, 30], [19, 30], [21, 30], [21, 30], [23, 30], [1, 30, +1]], - [[17, 30], [19, 30], [20, 30], [20, 30], [22, 30], [22, 30], [0, 30, +1], [1, 30, +1]], - [[17, 30], [19, 30], [20, 30], [20, 30], [22, 30], [23, 30], [0, 30, +1], [1, 30, +1]], - [[18, 30], [19, 30], [20, 30], [21, 30], [22, 30], [23, 30], [0, 30, +1], [1, 30, +1]], + [ + [18, 30], + [19, 30], + [20, 30], + [21, 30], + [22, 30], + [23, 30], + [0, 30, +1], + [1, 30, +1], + ], + [ + [17, 30], + [19, 30], + [20, 30], + [20, 30], + [22, 30], + [22, 30], + [0, 30, +1], + [1, 30, +1], + ], + [ + [16, 30], + [18, 30], + [19, 30], + [19, 30], + [21, 30], + [21, 30], + [23, 30], + [1, 30, +1], + ], + [ + [16, 30], + [18, 30], + [19, 30], + [19, 30], + [21, 30], + [21, 30], + [23, 30], + [1, 30, +1], + ], + [ + [16, 30], + [18, 30], + [19, 30], + [19, 30], + [21, 30], + [21, 30], + [23, 30], + [1, 30, +1], + ], + [ + [17, 30], + [19, 30], + [20, 30], + [20, 30], + [22, 30], + [22, 30], + [0, 30, +1], + [1, 30, +1], + ], + [ + [17, 30], + [19, 30], + [20, 30], + [20, 30], + [22, 30], + [23, 30], + [0, 30, +1], + [1, 30, +1], + ], + [ + [18, 30], + [19, 30], + [20, 30], + [21, 30], + [22, 30], + [23, 30], + [0, 30, +1], + [1, 30, +1], + ], ]; controller.click(eid("calendar-tab-button")); switchToView(controller, "day"); diff --git a/calendar/test/browser/recurrence/browser_daily.js b/calendar/test/browser/recurrence/browser_daily.js index 089a671c88..3138cd2340 100755 --- a/calendar/test/browser/recurrence/browser_daily.js +++ b/calendar/test/browser/recurrence/browser_daily.js @@ -127,7 +127,10 @@ add_task(async function testDailyRecurrence() { // Check day view for 7 days. let day = lookupEventBox("day", EVENT_BOX, null, 1, null, EVENTPATH); - let dates = [[2009, 1, 3], [2009, 1, 4]]; + let dates = [ + [2009, 1, 3], + [2009, 1, 4], + ]; for (let [y, m, d] of dates) { goToDate(controller, y, m, d); controller.assertNodeNotExist(day); diff --git a/calendar/test/browser/recurrenceRotated/browser_daily.js b/calendar/test/browser/recurrenceRotated/browser_daily.js index 69b7268bc4..92b950aa7e 100755 --- a/calendar/test/browser/recurrenceRotated/browser_daily.js +++ b/calendar/test/browser/recurrenceRotated/browser_daily.js @@ -135,7 +135,10 @@ add_task(async function testDailyRecurrence() { // Check day view for 7 days. let day = lookupEventBox("day", EVENT_BOX, null, 1, null, EVENTPATH); - let dates = [[2009, 1, 3], [2009, 1, 4]]; + let dates = [ + [2009, 1, 3], + [2009, 1, 4], + ]; for (let [y, m, d] of dates) { goToDate(controller, y, m, d); controller.assertNodeNotExist(day); diff --git a/calendar/test/unit/test_itip_utils.js b/calendar/test/unit/test_itip_utils.js index 1040413b63..e2fa5dc15d 100644 --- a/calendar/test/unit/test_itip_utils.js +++ b/calendar/test/unit/test_itip_utils.js @@ -546,8 +546,14 @@ function test_getAttendeesBySender() { cal.itip.getAttendeesBySender(attendees, test.input.sender).forEach(att => { detected.push(att.id); }); - ok(detected.every(aId => test.expected.includes(aId)), "(test #" + i + " ok1)"); - ok(test.expected.every(aId => detected.includes(aId)), "(test #" + i + " ok2)"); + ok( + detected.every(aId => test.expected.includes(aId)), + "(test #" + i + " ok1)" + ); + ok( + test.expected.every(aId => detected.includes(aId)), + "(test #" + i + " ok2)" + ); } } diff --git a/calendar/test/unit/test_unifinder_utils.js b/calendar/test/unit/test_unifinder_utils.js index 537850629c..d6cd5fa6db 100644 --- a/calendar/test/unit/test_unifinder_utils.js +++ b/calendar/test/unit/test_unifinder_utils.js @@ -69,10 +69,16 @@ function test_sort_items() { }); cal.unifinder.sortItems(items, "title", 1); - deepEqual(items.map(item => item.title), ["a", "b", null]); + deepEqual( + items.map(item => item.title), + ["a", "b", null] + ); cal.unifinder.sortItems(items, "title", -1); - deepEqual(items.map(item => item.title), [null, "b", "a"]); + deepEqual( + items.map(item => item.title), + [null, "b", "a"] + ); // date comparison let dates = ["20180101T000002Z", "20180101T000000Z", "20180101T000001Z"]; @@ -85,18 +91,16 @@ function test_sort_items() { }); cal.unifinder.sortItems(items, "startDate", 1); - deepEqual(items.map(item => item.startDate.icalString), [ - "20180101T000000Z", - "20180101T000001Z", - "20180101T000002Z", - ]); + deepEqual( + items.map(item => item.startDate.icalString), + ["20180101T000000Z", "20180101T000001Z", "20180101T000002Z"] + ); cal.unifinder.sortItems(items, "startDate", -1); - deepEqual(items.map(item => item.startDate.icalString), [ - "20180101T000002Z", - "20180101T000001Z", - "20180101T000000Z", - ]); + deepEqual( + items.map(item => item.startDate.icalString), + ["20180101T000002Z", "20180101T000001Z", "20180101T000000Z"] + ); // number comparison let percents = [3, 1, 2]; @@ -109,8 +113,14 @@ function test_sort_items() { }); cal.unifinder.sortItems(items, "percentComplete", 1); - deepEqual(items.map(item => item.percentComplete), [1, 2, 3]); + deepEqual( + items.map(item => item.percentComplete), + [1, 2, 3] + ); cal.unifinder.sortItems(items, "percentComplete", -1); - deepEqual(items.map(item => item.percentComplete), [3, 2, 1]); + deepEqual( + items.map(item => item.percentComplete), + [3, 2, 1] + ); } diff --git a/chat/components/src/test/test_logger.js b/chat/components/src/test/test_logger.js index 00df996fb3..18a2beb479 100644 --- a/chat/components/src/test/test_logger.js +++ b/chat/components/src/test/test_logger.js @@ -195,7 +195,10 @@ var test_queueFileOperation = async function() { let p2 = qFO("path2", dummyRejectedOperation); equal(gFP.get("path2"), p2); // This should throw since p2 rejected. Drop the error. - await p2.then(() => do_throw(), () => {}); + await p2.then( + () => do_throw(), + () => {} + ); ok(!gFP.has("path2")); let onPromiseComplete = (aPromise, aHandler) => { diff --git a/chat/modules/test/test_NormalizedMap.js b/chat/modules/test/test_NormalizedMap.js index ddb1044bae..339699521a 100644 --- a/chat/modules/test/test_NormalizedMap.js +++ b/chat/modules/test/test_NormalizedMap.js @@ -27,7 +27,10 @@ function test_setter_getter() { } function test_constructor() { - let k = new NormalizedMap(aStr => aStr.toLowerCase(), [["A", 2], ["b", 3]]); + let k = new NormalizedMap(aStr => aStr.toLowerCase(), [ + ["A", 2], + ["b", 3], + ]); Assert.equal(k.get("b"), 3); Assert.equal(k.get("a"), 2); Assert.equal(k.get("B"), 3); diff --git a/chat/protocols/irc/test/test_ircMessage.js b/chat/protocols/irc/test/test_ircMessage.js index dbcd717346..5301fd19fd 100644 --- a/chat/protocols/irc/test/test_ircMessage.js +++ b/chat/protocols/irc/test/test_ircMessage.js @@ -308,7 +308,11 @@ function testTags() { origin: "quux", user: undefined, host: undefined, - tags: new Map([["c", undefined], ["h", ""], ["a", "b"]]), + tags: new Map([ + ["c", undefined], + ["h", ""], + ["a", "b"], + ]), source: "", }, "@time=2012-06-30T23:59:60.419Z :John!~john@1.2.3.4 JOIN #chan": { diff --git a/chat/protocols/twitter/twitter.jsm b/chat/protocols/twitter/twitter.jsm index a4136e7148..5b6c5a034a 100644 --- a/chat/protocols/twitter/twitter.jsm +++ b/chat/protocols/twitter/twitter.jsm @@ -797,7 +797,10 @@ Account.prototype = { this.signAndSend(url, null, [], aOnSent, aOnError, aThis); }, directMessage(aMsg, aName, aOnSent, aOnError, aThis) { - let POSTData = [["text", aMsg], ["screen_name", aName]]; + let POSTData = [ + ["text", aMsg], + ["screen_name", aName], + ]; this.signAndSend( "1.1/direct_messages/new.json", null, diff --git a/chat/protocols/xmpp/xmpp-session.jsm b/chat/protocols/xmpp/xmpp-session.jsm index 595e5d4a75..4c256cf644 100644 --- a/chat/protocols/xmpp/xmpp-session.jsm +++ b/chat/protocols/xmpp/xmpp-session.jsm @@ -66,8 +66,8 @@ function XMPPSession(aHost, aPort, aSecurity, aJID, aPassword, aAccount) { // RFC 6120 (Section 3.2.3): When Not to Use SRV. if ( Services.prefs.getBoolPref("chat.dns.srv.disable") || - (this._account.prefs.prefHasUserValue("server") || - this._account.prefs.prefHasUserValue("port")) + this._account.prefs.prefHasUserValue("server") || + this._account.prefs.prefHasUserValue("port") ) { this.connect(this._host, this._port, this._security); return; diff --git a/mail/base/content/editContactPanel.js b/mail/base/content/editContactPanel.js index acde8befad..0415c3265e 100644 --- a/mail/base/content/editContactPanel.js +++ b/mail/base/content/editContactPanel.js @@ -75,7 +75,7 @@ var editContactInlineUI = { } // Only handle the read-only cases here. - if (aHandleOnlyReadOnly && (this._writeable && !aEvent.target.readOnly)) { + if (aHandleOnlyReadOnly && this._writeable && !aEvent.target.readOnly) { return; } diff --git a/mail/base/content/tabmail.js b/mail/base/content/tabmail.js index e031471118..e48ab506b0 100644 --- a/mail/base/content/tabmail.js +++ b/mail/base/content/tabmail.js @@ -839,7 +839,7 @@ // doesn't keep the window alive. browser.permanentKey = new (Cu.getGlobalForObject( Services - )).Object(); + ).Object)(); } return browser; }, diff --git a/mail/base/modules/DBViewWrapper.jsm b/mail/base/modules/DBViewWrapper.jsm index 96f5ffcf93..f33fc86edd 100644 --- a/mail/base/modules/DBViewWrapper.jsm +++ b/mail/base/modules/DBViewWrapper.jsm @@ -1402,8 +1402,8 @@ DBViewWrapper.prototype = { if (this.isVirtual) { if ( this.isMultiFolder && - (changedFlags & Ci.nsMsgViewFlagsType.kThreadedDisplay && - !(changedFlags & Ci.nsMsgViewFlagsType.kGroupBySort)) + changedFlags & Ci.nsMsgViewFlagsType.kThreadedDisplay && + !(changedFlags & Ci.nsMsgViewFlagsType.kGroupBySort) ) { reSort = true; } diff --git a/mail/components/about-support/content/aboutSupport.js b/mail/components/about-support/content/aboutSupport.js index 558d7f8ba8..3e629315b0 100644 --- a/mail/components/about-support/content/aboutSupport.js +++ b/mail/components/about-support/content/aboutSupport.js @@ -625,11 +625,13 @@ var snapshotFormatters = { apzInfo.length ? [ new Text( - (await document.l10n.formatValues( - apzInfo.map(id => { - return { id }; - }) - )).join("; ") + ( + await document.l10n.formatValues( + apzInfo.map(id => { + return { id }; + }) + ) + ).join("; ") ), ] : "apz-none" diff --git a/mail/components/accountcreation/content/util.js b/mail/components/accountcreation/content/util.js index ba504ea6de..2ca7ae7be5 100644 --- a/mail/components/accountcreation/content/util.js +++ b/mail/components/accountcreation/content/util.js @@ -487,7 +487,10 @@ function PriorityOrderAbortable(successCallback, errorCallback) { } if (!this._successfulCall) { // all failed - errorCallback(this._calls[0].e, this._calls.map(call => call.e)); // see docs above + errorCallback( + this._calls[0].e, + this._calls.map(call => call.e) + ); // see docs above } }); } diff --git a/mail/components/extensions/parent/ext-tabs.js b/mail/components/extensions/parent/ext-tabs.js index 0c7944a900..e355ad4db5 100644 --- a/mail/components/extensions/parent/ext-tabs.js +++ b/mail/components/extensions/parent/ext-tabs.js @@ -225,8 +225,8 @@ class TabsUpdateFilterEventManager extends EventManager { if ( filter && filter.urls && - (!extension.hasPermission("tabs") && - !extension.hasPermission("activeTab")) + !extension.hasPermission("tabs") && + !extension.hasPermission("activeTab") ) { Cu.reportError( 'Url filtering in tabs.onUpdated requires "tabs" or "activeTab" permission.' diff --git a/mail/components/im/content/chat-conversation.js b/mail/components/im/content/chat-conversation.js index 223a87f694..fe2b1ca01f 100644 --- a/mail/components/im/content/chat-conversation.js +++ b/mail/components/im/content/chat-conversation.js @@ -1161,9 +1161,9 @@ if ( event.charCode == 0 && // it's not a character, it's a command key - (event.keyCode != 13 && // Return + event.keyCode != 13 && // Return event.keyCode != 8 && // Backspace - event.keyCode != 46) + event.keyCode != 46 ) { // Delete return; diff --git a/mail/components/im/modules/index_im.jsm b/mail/components/im/modules/index_im.jsm index 2a7c0baa19..6bd1179eb3 100644 --- a/mail/components/im/modules/index_im.jsm +++ b/mail/components/im/modules/index_im.jsm @@ -521,9 +521,9 @@ var GlodaIMIndexer = { : logFiles; for (let logFile of currentLogFiles) { let fileName = OS.Path.basename(logFile); - let lastModifiedTime = (await OS.File.stat( - logFile - )).lastModificationDate.valueOf(); + let lastModifiedTime = ( + await OS.File.stat(logFile) + ).lastModificationDate.valueOf(); if ( Object.prototype.hasOwnProperty.call(conv.convObj, fileName) && conv.convObj[fileName] == lastModifiedTime diff --git a/mail/components/test/unit/test_autoconfigUtils.js b/mail/components/test/unit/test_autoconfigUtils.js index 962ac57845..2e61ea3cd1 100644 --- a/mail/components/test/unit/test_autoconfigUtils.js +++ b/mail/components/test/unit/test_autoconfigUtils.js @@ -255,7 +255,10 @@ function test_getIncomingTryOrder() { ssl = SSL; tryOrder = getIncomingTryOrder(domain, protocol, ssl, port); - assert_equal_try_orders(tryOrder, [[IMAP, SSL, 993], [POP, SSL, 995]]); + assert_equal_try_orders(tryOrder, [ + [IMAP, SSL, 993], + [POP, SSL, 995], + ]); ssl = UNKNOWN; port = 31337; @@ -271,7 +274,10 @@ function test_getIncomingTryOrder() { ssl = SSL; tryOrder = getIncomingTryOrder(domain, protocol, ssl, port); - assert_equal_try_orders(tryOrder, [[IMAP, SSL, port], [POP, SSL, port]]); + assert_equal_try_orders(tryOrder, [ + [IMAP, SSL, port], + [POP, SSL, port], + ]); } /** diff --git a/mail/components/test/unit/test_telemetry_buildconfig.js b/mail/components/test/unit/test_telemetry_buildconfig.js index e35a9a09c0..6f55933d6c 100644 --- a/mail/components/test/unit/test_telemetry_buildconfig.js +++ b/mail/components/test/unit/test_telemetry_buildconfig.js @@ -62,13 +62,19 @@ add_task(async function test_recording_state() { events.forEach(e => Telemetry.recordEvent(...e)); TelemetryTestUtils.assertEvents([]); // But still expect a non-zero summary count. - checkEventSummary(events.map(e => ["parent", e, 1]), true); + checkEventSummary( + events.map(e => ["parent", e, 1]), + true + ); // Once again, with recording on. Telemetry.setEventRecordingEnabled("tb.test", true); events.forEach(e => Telemetry.recordEvent(...e)); TelemetryTestUtils.assertEvents(events); - checkEventSummary(events.map(e => ["parent", e, 1]), true); + checkEventSummary( + events.map(e => ["parent", e, 1]), + true + ); }); /** diff --git a/mail/test/browser/folder-display/browser_paneFocus.js b/mail/test/browser/folder-display/browser_paneFocus.js index 83b4e8d9f2..edb56e4791 100644 --- a/mail/test/browser/folder-display/browser_paneFocus.js +++ b/mail/test/browser/folder-display/browser_paneFocus.js @@ -49,9 +49,12 @@ add_task(function setupModule(module) { * @return the focused pane */ function get_focused_pane() { - let panes = ["threadTree", "folderTree", "messagepane", "multimessage"].map( - id => mc.e(id) - ); + let panes = [ + "threadTree", + "folderTree", + "messagepane", + "multimessage", + ].map(id => mc.e(id)); let currentNode = mc.window.top.document.activeElement; diff --git a/mail/test/browser/quick-filter-bar/browser_filterLogic.js b/mail/test/browser/quick-filter-bar/browser_filterLogic.js index 6bfc9e4fea..8f35b12c04 100644 --- a/mail/test/browser/quick-filter-bar/browser_filterLogic.js +++ b/mail/test/browser/quick-filter-bar/browser_filterLogic.js @@ -69,10 +69,17 @@ add_task(function test_filter_starred() { add_task(function test_filter_simple_intersection_unread_and_starred() { let folder = create_folder("QuickFilterBarFilterUnreadAndStarred"); - let [, readUnstarred, unreadStarred, readStarred] = make_new_sets_in_folder( - folder, - [{ count: 1 }, { count: 1 }, { count: 1 }, { count: 1 }] - ); + let [ + , + readUnstarred, + unreadStarred, + readStarred, + ] = make_new_sets_in_folder(folder, [ + { count: 1 }, + { count: 1 }, + { count: 1 }, + { count: 1 }, + ]); readUnstarred.setRead(true); unreadStarred.setStarred(true); readStarred.setRead(true); @@ -153,10 +160,19 @@ add_task(function test_filter_tags() { const tagA = "$label1", tagB = "$label2", tagC = "$label3"; - let [setNoTag, setTagA, setTagB, setTagAB, setTagC] = make_new_sets_in_folder( - folder, - [{ count: 1 }, { count: 1 }, { count: 1 }, { count: 1 }, { count: 1 }] - ); + let [ + setNoTag, + setTagA, + setTagB, + setTagAB, + setTagC, + ] = make_new_sets_in_folder(folder, [ + { count: 1 }, + { count: 1 }, + { count: 1 }, + { count: 1 }, + { count: 1 }, + ]); setTagA.addTag(tagA); setTagB.addTag(tagB); setTagAB.addTag(tagA); diff --git a/mailnews/db/gloda/test/unit/test_fts3_tokenizer.js b/mailnews/db/gloda/test/unit/test_fts3_tokenizer.js index 950bcd6d57..48458d105a 100644 --- a/mailnews/db/gloda/test/unit/test_fts3_tokenizer.js +++ b/mailnews/db/gloda/test/unit/test_fts3_tokenizer.js @@ -54,7 +54,10 @@ var intlPhrases = [ encodings: { "utf-8": ["=?utf-8?q?aa_bbb?=", "aa bbb"], }, - searchPhrases: [{ body: "aa", match: false }, { body: "bbb", match: true }], + searchPhrases: [ + { body: "aa", match: false }, + { body: "bbb", match: true }, + ], }, ]; diff --git a/mailnews/extensions/bayesian-spam-filter/test/unit/test_traits.js b/mailnews/extensions/bayesian-spam-filter/test/unit/test_traits.js index eb5d629fc5..b005db72cc 100644 --- a/mailnews/extensions/bayesian-spam-filter/test/unit/test_traits.js +++ b/mailnews/extensions/bayesian-spam-filter/test/unit/test_traits.js @@ -83,7 +83,12 @@ var tests = [ // spam1 trained as "pro" for first pro/anti pair // spam4 trained as "anti" for second pro/anti pair // others are partials - percents: [[100, 50], [81, 0], [98, 50], [81, 0]], + percents: [ + [100, 50], + [81, 0], + [98, 50], + [81, 0], + ], }, // reset the plugin, read in data, and retest the classification // this tests the trait file writing @@ -109,7 +114,12 @@ var tests = [ fileName: "spam1.eml,spam2.eml,spam3.eml,spam4.eml", traitIds: [4, 6], traitAntiIds: [3, 5], - percents: [[100, 50], [81, 0], [98, 50], [81, 0]], + percents: [ + [100, 50], + [81, 0], + [98, 50], + [81, 0], + ], }, ]; diff --git a/mailnews/mime/jsmime/test/unit/test_header.js b/mailnews/mime/jsmime/test/unit/test_header.js index 922992c171..3d72d7f4f8 100644 --- a/mailnews/mime/jsmime/test/unit/test_header.js +++ b/mailnews/mime/jsmime/test/unit/test_header.js @@ -454,7 +454,10 @@ define(function(require) { ], [ '" "@a a;b', - [{ name: "", email: '" "@a a' }, { name: "b", email: "" }], + [ + { name: "", email: '" "@a a' }, + { name: "b", email: "" }, + ], ], [ "Undisclosed recipients:;\0:; foo ", ], [ - [{ name: "", email: "a@b.c" }, { name: "", email: "b@b.c" }], + [ + { name: "", email: "a@b.c" }, + { name: "", email: "b@b.c" }, + ], "a@b.c, b@b.c", ], [ - [{ name: "JD", email: "a@a.c" }, { name: "SD", email: "b@b.c" }], + [ + { name: "JD", email: "a@a.c" }, + { name: "SD", email: "b@b.c" }, + ], "JD , SD ", ], [ diff --git a/mailnews/mime/test/unit/test_nsIMsgHeaderParser4.js b/mailnews/mime/test/unit/test_nsIMsgHeaderParser4.js index 27d9563ac4..cfdd5878b6 100644 --- a/mailnews/mime/test/unit/test_nsIMsgHeaderParser4.js +++ b/mailnews/mime/test/unit/test_nsIMsgHeaderParser4.js @@ -16,7 +16,10 @@ function run_test() { }, { displayString: "test@foo.invalid, test2@foo.invalid", - addresses: [["", "test@foo.invalid"], ["", "test2@foo.invalid"]], + addresses: [ + ["", "test@foo.invalid"], + ["", "test2@foo.invalid"], + ], }, { displayString: "John Doe ", diff --git a/mailnews/mime/test/unit/test_nsIMsgHeaderParser5.js b/mailnews/mime/test/unit/test_nsIMsgHeaderParser5.js index f1a3ba25ee..a118d44641 100644 --- a/mailnews/mime/test/unit/test_nsIMsgHeaderParser5.js +++ b/mailnews/mime/test/unit/test_nsIMsgHeaderParser5.js @@ -80,8 +80,14 @@ function run_test() { [ // This used to cause memory read overruns. '" "@a a;b', - [{ name: "", email: '" "@a a' }, { name: "b", email: "" }], - [{ name: "", email: "@a a" }, { name: "b", email: "" }], + [ + { name: "", email: '" "@a a' }, + { name: "b", email: "" }, + ], + [ + { name: "", email: "@a a" }, + { name: "b", email: "" }, + ], ], ];