tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 32783c46e8ab7c6113449ee6a8793d12a02e56b7
parent 3be744628aee5722f47451b439b4e1da4637d3b6
Author: Mark Banner <standard8@mozilla.com>
Date:   Thu, 23 Oct 2025 08:50:00 +0000

Bug 1995811 - Enable ESLint rule jsdoc/multiline-blocks. r=frontend-codestyle-reviewers,perftest-reviewers,sparky,nchevobbe,whimboo,Gijs

Differential Revision: https://phabricator.services.mozilla.com/D269631

Diffstat:
Mbrowser/base/content/browser-sync.js | 3++-
Mbrowser/base/content/utilityOverlay.js | 3++-
Mbrowser/components/BrowserContentHandler.sys.mjs | 3++-
Mbrowser/components/asrouter/modules/ASRouter.sys.mjs | 23+++++++++++++----------
Mbrowser/components/asrouter/tests/unit/ASRouterPreferences.test.js | 3++-
Mbrowser/components/customizableui/test/browser_1856572_ensure_Fluent_works_in_customizeMode.js | 2+-
Mbrowser/components/genai/chat.js | 3++-
Mbrowser/components/genai/tests/browser/browser_link_preview.js | 2+-
Mbrowser/components/ipprotection/GuardianClient.sys.mjs | 5+++--
Mbrowser/components/sessionstore/test/browser_589246.js | 6++++--
Mbrowser/components/tabbrowser/TabUnloader.sys.mjs | 5+++--
Mbrowser/components/translations/tests/browser/browser_translations_about_preferences_settings_ui.js | 6++++--
Mbrowser/modules/Sanitizer.sys.mjs | 3++-
Mcaps/tests/mochitest/test_bug292789.html | 12+++++++-----
Mcaps/tests/mochitest/test_bug470804.html | 5+++--
Mcaps/tests/mochitest/test_disallowInheritPrincipal.html | 7++++---
Mdevtools/client/debugger/src/actions/context-menus/source-tree-item.js | 3++-
Mdevtools/client/netmonitor/src/components/messages/parsers/signalr/JSONHubProtocol.js | 6++++--
Mdevtools/client/webconsole/actions/autocomplete.js | 3++-
Mdevtools/server/actors/network-monitor/network-event-actor.js | 4++--
Mdom/animation/test/chrome/test_running_on_compositor.html | 6++++--
Mdom/base/test/test_bug1022229.html | 3++-
Mdom/base/test/test_bug401662.html | 6++++--
Mdom/base/test/test_bug562169-1.html | 10++++++----
Mdom/events/test/test_bug1017086_enable.html | 5++---
Mdom/events/test/test_bug545268.html | 8+++++---
Mdom/events/test/test_bug944011.html | 6++++--
Mdom/html/test/forms/test_input_color_input_change_events.html | 3++-
Mdom/html/test/forms/test_input_color_picker_initial.html | 6++++--
Mdom/html/test/forms/test_input_color_picker_popup.html | 6++++--
Mdom/html/test/forms/test_input_color_picker_update.html | 3++-
Mdom/html/test/forms/test_select_selectedOptions.html | 3++-
Mdom/html/test/test_bug1260664.html | 10++++++----
Mdom/html/test/test_getElementsByName_after_mutation.html | 5+++--
Mdom/media/IdpSandbox.sys.mjs | 6++++--
Mdom/media/webaudio/test/test_webAudio_muteTab.html | 3++-
Mdom/media/webrtc/tests/mochitests/head.js | 6++++--
Mdom/push/ChromePushSubscription.sys.mjs | 3++-
Mdom/security/test/https-first/browser_schemeless.js | 12++++++++----
Mlayout/forms/test/test_listcontrol_search.html | 6++++--
Mlayout/generic/test/test_bug666225.html | 6++++--
Mlayout/style/test/test_inherit_computation.html | 6++++--
Mlayout/style/test/test_inherit_storage.html | 6++++--
Mlayout/style/test/test_initial_computation.html | 6++++--
Mlayout/style/test/test_initial_storage.html | 6++++--
Mlayout/style/test/test_position_float_display.html | 8+++++---
Mlayout/style/test/test_position_sticky.html | 6++++--
Mlayout/style/test/test_root_node_display.html | 6++++--
Mlayout/style/test/test_transitions_cancel_near_end.html | 8+++++---
Mnetwerk/test/httpserver/httpd.sys.mjs | 5+++--
Mnetwerk/test/httpserver/test/head_utils.js | 4++--
Mnetwerk/test/httpserver/test/test_async_response_sending.js | 12+++++++-----
Mnetwerk/test/httpserver/test/test_body_length.js | 2+-
Mnetwerk/test/httpserver/test/test_default_index_handler.js | 4++--
Mnetwerk/test/httpserver/test/test_header_array.js | 4++--
Mnetwerk/test/httpserver/test/test_host.js | 4++--
Mnetwerk/test/httpserver/test/test_host_identity.js | 2+-
Mnetwerk/test/httpserver/test/test_processasync.js | 2+-
Mnetwerk/test/httpserver/test/test_registerdirectory.js | 32++++++++++++++++----------------
Mnetwerk/test/httpserver/test/test_registerprefix.js | 20++++++++++----------
Mnetwerk/test/httpserver/test/test_request_line_split_in_two_packets.js | 2+-
Mnetwerk/test/httpserver/test/test_seizepower.js | 4++--
Mnetwerk/test/httpserver/test/test_setstatusline.js | 4++--
Mnetwerk/test/httpserver/test/test_sjs.js | 8++++----
Mnetwerk/test/httpserver/test/test_sjs_object_state.js | 4++--
Mnetwerk/test/httpserver/test/test_sjs_state.js | 4++--
Mnetwerk/test/httpserver/test/test_sjs_throwing_exceptions.js | 2+-
Mnetwerk/test/unit/test_speculative_connect.js | 30++++++++++++++++++++----------
Mremote/marionette/actors/MarionetteCommandsChild.sys.mjs | 3++-
Mservices/fxaccounts/FxAccounts.sys.mjs | 27+++++++++++++++------------
Mservices/fxaccounts/FxAccountsWebChannel.sys.mjs | 3++-
Mservices/sync/modules/engines/addons.sys.mjs | 2+-
Mtesting/mochitest/tests/SimpleTest/MozillaLogger.js | 6++++--
Mtesting/talos/talos/pageloader/chrome/MozillaFileLogger.js | 6++++--
Mtesting/talos/talos/scripts/talos-debug.js | 4++--
Mtoolkit/components/antitracking/test/browser/browser_serviceWorkersWithStorageAccessGranted.js | 25+++++++++++++------------
Mtoolkit/components/downloads/test/unit/head.js | 3++-
Mtoolkit/components/extensions/ExtensionParent.sys.mjs | 6++++--
Mtoolkit/components/formautofill/shared/FormAutofillHandler.sys.mjs | 3++-
Mtoolkit/components/ml/actors/MLEngineParent.sys.mjs | 3++-
Mtoolkit/components/ml/content/ModelHub.sys.mjs | 6++++--
Mtoolkit/components/ml/content/Utils.sys.mjs | 3++-
Mtoolkit/components/ml/tests/browser/browser_ml_cache.js | 4++--
Mtoolkit/components/normandy/content/AboutPages.sys.mjs | 6++++--
Mtoolkit/components/passwordmgr/LoginManagerChild.sys.mjs | 3++-
Mtoolkit/components/passwordmgr/test/mochitest/test_form_action_1.html | 6++++--
Mtoolkit/components/passwordmgr/test/mochitest/test_one_doorhanger_per_un_pw.html | 6++++--
Mtoolkit/components/passwordmgr/test/mochitest/test_passwords_in_type_password.html | 6++++--
Mtoolkit/components/places/PlacesTransactions.sys.mjs | 3+--
Mtoolkit/components/thumbnails/PageThumbUtils.sys.mjs | 4++--
Mtoolkit/components/utils/Sampling.sys.mjs | 3++-
Mtoolkit/content/tests/chrome/xul_selectcontrol.js | 3++-
Mtoolkit/content/viewZoomOverlay.js | 3++-
Mtoolkit/mozapps/update/tests/unit_update_binary/checkUpdaterSigSvc.js | 3++-
Mtools/lint/eslint/eslint-plugin-mozilla/lib/configs/valid-jsdoc.mjs | 1+
Mtools/profiler/tests/browser/head.js | 3++-
96 files changed, 351 insertions(+), 233 deletions(-)

diff --git a/browser/base/content/browser-sync.js b/browser/base/content/browser-sync.js @@ -2418,7 +2418,8 @@ var gSync = { } }, - /** Checks if the current list of attached clients to the Mozilla account + /** + * Checks if the current list of attached clients to the Mozilla account * has a service associated with the passed in Id * @param {string} clientId * A known static Id from FxA that identifies the service it's associated with diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js @@ -273,7 +273,8 @@ function closeMenus(node) { } } -/** This function takes in a key element and compares it to the keys pressed during an event. +/** + * This function takes in a key element and compares it to the keys pressed during an event. * * @param aEvent * The KeyboardEvent event you want to compare against your key. diff --git a/browser/components/BrowserContentHandler.sys.mjs b/browser/components/BrowserContentHandler.sys.mjs @@ -826,7 +826,8 @@ nsBrowserContentHandler.prototype = { overridePage = null; } - /** If the override URL is provided by an experiment, is a valid + /** + * If the override URL is provided by an experiment, is a valid * Firefox What's New Page URL, and the update version is less than * or equal to the maxVersion set by the experiment, we'll try to use * the experiment override URL instead of the default or the diff --git a/browser/components/asrouter/modules/ASRouter.sys.mjs b/browser/components/asrouter/modules/ASRouter.sys.mjs @@ -1761,8 +1761,9 @@ export class _ASRouter { }); } - /** _cleanupImpressionsForItems - Helper for cleanupImpressions - calculate the updated - /* impressions object for the given items, then store it and return it + /** + * Helper for cleanupImpressions - calculate the updated impressions object + * for the given items, then store it and return it. * * @param {obj} state Reference to ASRouter internal state * @param {array} items Can be messages, providers or groups that we count impressions for @@ -1806,13 +1807,14 @@ export class _ASRouter { return impressions; } - /** _cleanupMultiProfileImpressions - Helper for cleanupImpressions. This method handles cleanup of impression data in - * multi-profile environments where impression data is shared across all user profiles. - * It performs the following cleanup: - * - For deleted/invalid items: Removes impressions older than 6 months (gradual cleanup) - * - For items with custom frequency caps: Removes impressions older than the longest period - * - Handles corrupted or malformed impression data - * - Updates the shared database after each cleanup operation + /** + * Helper for cleanupImpressions. This method handles cleanup of impression data in + * multi-profile environments where impression data is shared across all user profiles. + * It performs the following cleanup: + * - For deleted/invalid items: Removes impressions older than 6 months (gradual cleanup) + * - For items with custom frequency caps: Removes impressions older than the longest period + * - Handles corrupted or malformed impression data + * - Updates the shared database after each cleanup operation * * @param {obj} state Reference to ASRouter internal state * @param {array} items are messages that we count impressions for @@ -2177,7 +2179,8 @@ export class _ASRouter { return this.sendTriggerMessage({ ...trigger, browser }); } - /** Simple wrapper to make test mocking easier + /** + * Simple wrapper to make test mocking easier * * @returns {Promise} resolves when the attribution string has been set * succesfully. diff --git a/browser/components/asrouter/tests/unit/ASRouterPreferences.test.js b/browser/components/asrouter/tests/unit/ASRouterPreferences.test.js @@ -14,7 +14,8 @@ const CFR_USER_PREF_ADDONS = const CFR_USER_PREF_FEATURES = "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features"; -/** NUMBER_OF_PREFS_TO_OBSERVE includes: +/** + * NUMBER_OF_PREFS_TO_OBSERVE includes: * 1. asrouter.providers. pref branch * 2. asrouter.devtoolsEnabled * 3. browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons (user preference - cfr) diff --git a/browser/components/customizableui/test/browser_1856572_ensure_Fluent_works_in_customizeMode.js b/browser/components/customizableui/test/browser_1856572_ensure_Fluent_works_in_customizeMode.js @@ -13,7 +13,7 @@ const { /** * Bug 1856572 - This test is to ensure that fluent strings in Firefox View * can be updated after opening Customize Mode - * **/ + */ add_task(async function test_data_l10n_customize_mode() { FirefoxViewTestUtilsInit(this); await withFirefoxView({ win: window }, async function (browser) { diff --git a/browser/components/genai/chat.js b/browser/components/genai/chat.js @@ -574,7 +574,8 @@ async function showSummarizeWarning(length) { }); } -/** Expose Sidebar entry for new prompt +/** + * Expose Sidebar entry for new prompt * * @param {object} opt for new prompt * @param {boolean} [opt.show] diff --git a/browser/components/genai/tests/browser/browser_link_preview.js b/browser/components/genai/tests/browser/browser_link_preview.js @@ -809,7 +809,7 @@ add_task(async function test_link_preview_error_rendered() { /** * Test that settings icon is correctly rendered in the link preview card. -// */ + */ add_task(async function test_link_preview_settings_icon_rendered() { await SpecialPowers.pushPrefEnv({ set: [["browser.ml.linkPreview.enabled", true]], diff --git a/browser/components/ipprotection/GuardianClient.sys.mjs b/browser/components/ipprotection/GuardianClient.sys.mjs @@ -238,8 +238,9 @@ export class GuardianClient { url.pathname = "/oauth/success"; return url; } - /** This is the URL that the user will be redirected to after a rejected/failed enrollment. - * The url will contain an error query parameter with the error message. + /** + * This is the URL that the user will be redirected to after a rejected/failed enrollment. + * The url will contain an error query parameter with the error message. */ get #enrollmentError() { const url = new URL(this.guardianEndpoint); diff --git a/browser/components/sessionstore/test/browser_589246.js b/browser/components/sessionstore/test/browser_589246.js @@ -107,8 +107,10 @@ tests.push({ }); function test() { - /** Test for Bug 589246 - Closed window state getting corrupted when closing - and reopening last browser window without exiting browser **/ + /** + * Test for Bug 589246 - Closed window state getting corrupted when closing + * and reopening last browser window without exiting browser + */ waitForExplicitFinish(); // windows opening & closing, so extending the timeout requestLongerTimeout(2); diff --git a/browser/components/tabbrowser/TabUnloader.sys.mjs b/browser/components/tabbrowser/TabUnloader.sys.mjs @@ -350,8 +350,9 @@ export var TabUnloader = { ]), }; -/** Determine the base weight of the tab without accounting for - * resource use +/** + * Determine the base weight of the tab without accounting for resource use. + * * @param tab tab to use * @returns the tab's base weight */ diff --git a/browser/components/translations/tests/browser/browser_translations_about_preferences_settings_ui.js b/browser/components/translations/tests/browser/browser_translations_about_preferences_settings_ui.js @@ -215,7 +215,8 @@ async function testLanguageList( menuList.querySelector("menupopup").hidePopup(); await clickMenu; - /** Languages are always added on the top, so check the firstChild + /** + * Languages are always added on the top, so check the firstChild * for newly added languages. * the firstChild.querySelector("label").innerText is the language display name * which is compared with the menulist display name that is selected @@ -296,7 +297,8 @@ async function testLanguageListWithPref(languageList, pref, sectionName) { for (const langOptions of langs) { Services.prefs.setCharPref(pref, langOptions); - /** Languages are always added on the top, so check the firstChild + /** + * Languages are always added on the top, so check the firstChild * for newly added languages. * the firstChild.querySelector("label").innerText is the language display name * which is compared with the menulist display name that is selected diff --git a/browser/modules/Sanitizer.sys.mjs b/browser/modules/Sanitizer.sys.mjs @@ -1176,7 +1176,8 @@ function extractMatchingPrincipals(principals, matchHost) { }); } -/** This method receives a list of principals and it checks if some of them or +/** + * This method receives a list of principals and it checks if some of them or * some of their sub-domain need to be sanitize. * @param {Object} progress - Object to keep track of the sanitization progress, prefs and mode * @param {nsIPrincipal[]} principals - The principals generated by the PrincipalsCollector diff --git a/caps/tests/mochitest/test_bug292789.html b/caps/tests/mochitest/test_bug292789.html @@ -19,7 +19,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=292789 <pre id="test"> <script class="testbody" type="text/javascript"> -/** Test for Bug 292789 +/** + * Test for Bug 292789 * * Selectively allow access to allowlisted chrome packages * even for ALLOW_CHROME mechanisms (<script>, <img> etc) @@ -39,14 +40,15 @@ function testScriptSrc(aCallback) { is(typeof gTreeUtils.sort, "function", "content can still load <script> from chrome://global"); - /** Try to find an export from history.js. We will find it if it is - * improperly not blocked, otherwise it will be "undefined". + /** + * Try to find an export from history.js. We will find it if it is + * improperly not blocked, otherwise it will be "undefined". */ is(typeof gUpdateHistory, "undefined", "content should not be able to load <script> from chrome://mozapps"); - /** make sure the last one didn't pass because someone - * moved history.js + /** + * Make sure the last one didn't pass because someone moved history.js. */ var resjs = document.getElementById("resjs"); resjs.onload = scriptOnload; diff --git a/caps/tests/mochitest/test_bug470804.html b/caps/tests/mochitest/test_bug470804.html @@ -17,8 +17,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=470804 <pre id="test"> <script type="application/javascript"> -/** Test for Bug 470804 - Passing a null targetURL to checkLoadURIWithPrincipal shouldn't crash +/** + * Test for Bug 470804 + * Passing a null targetURL to checkLoadURIWithPrincipal shouldn't crash */ const nsIScriptSecurityManager = SpecialPowers.Ci.nsIScriptSecurityManager; diff --git a/caps/tests/mochitest/test_disallowInheritPrincipal.html b/caps/tests/mochitest/test_disallowInheritPrincipal.html @@ -17,9 +17,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=732413 <pre id="test"> <script type="application/javascript"> -/** Test for Bug 732413 - Passing DISALLOW_INHERIT_PRINCIPAL flag should be effective even if - aPrincipal is the system principal. +/** + * Test for Bug 732413 + * Passing DISALLOW_INHERIT_PRINCIPAL flag should be effective even if + * aPrincipal is the system principal. */ const nsIScriptSecurityManager = SpecialPowers.Ci.nsIScriptSecurityManager; diff --git a/devtools/client/debugger/src/actions/context-menus/source-tree-item.js b/devtools/client/debugger/src/actions/context-menus/source-tree-item.js @@ -142,7 +142,8 @@ export function showSourceTreeItemContextMenu( } /** - * Compute the string which will be displayed as tooltip on the project directory root header */ + * Compute the string which will be displayed as tooltip on the project directory root header + */ function getItemProjectDirectoryRootName(item) { if (item.thread) { return item.thread.name; diff --git a/devtools/client/netmonitor/src/components/messages/parsers/signalr/JSONHubProtocol.js b/devtools/client/netmonitor/src/components/messages/parsers/signalr/JSONHubProtocol.js @@ -17,7 +17,8 @@ const IHubProtocol = require("resource://devtools/client/netmonitor/src/componen const TextMessageFormat = require("resource://devtools/client/netmonitor/src/components/messages/parsers/signalr/TextMessageFormat.js"); /** Implements the JSON Hub Protocol. */ class JsonHubProtocol { - /** Creates an array of {@link @microsoft/signalr.HubMessage} objects from the specified serialized representation. + /** + * Creates an array of {@link @microsoft/signalr.HubMessage} objects from the specified serialized representation. * * @param {string} input A string containing the serialized representation. */ @@ -67,7 +68,8 @@ class JsonHubProtocol { } return hubMessages; } - /** Writes the specified {@link @microsoft/signalr.HubMessage} to a string and returns it. + /** + * Writes the specified {@link @microsoft/signalr.HubMessage} to a string and returns it. * * @param {HubMessage} message The message to write. * @returns {string} A string containing the serialized representation of the message. diff --git a/devtools/client/webconsole/actions/autocomplete.js b/devtools/client/webconsole/actions/autocomplete.js @@ -100,7 +100,8 @@ function autocompleteUpdate(force, getterPath, expressionVars) { * @param {Array<String>} getterPath The new getter path * @param {{[String]: String}} mappedVars Map of original to generated variable names. * @returns {Array<Array<String>>} The updated authorized evaluations (the original array, - * if it was updated in place) */ + * if it was updated in place) + */ function updateAuthorizedEvaluations( authorizedEvaluations, getterPath, diff --git a/devtools/server/actors/network-monitor/network-event-actor.js b/devtools/server/actors/network-monitor/network-event-actor.js @@ -468,9 +468,9 @@ class NetworkEventActor extends Actor { }; } - /** **************************************************************** + /****************************************************************** * Listeners for new network event data coming from NetworkMonitor. - ******************************************************************/ + *****************************************************************/ addCacheDetails({ fromCache, fromServiceWorker }) { this._resource.fromCache = fromCache; diff --git a/dom/animation/test/chrome/test_running_on_compositor.html b/dom/animation/test/chrome/test_running_on_compositor.html @@ -47,8 +47,10 @@ div { <script> 'use strict'; -/** Test for bug 1045994 - Add a chrome-only property to inspect if an - animation is running on the compositor or not **/ +/** + * Test for bug 1045994 - Add a chrome-only property to inspect if an + * animation is running on the compositor or not + */ const omtaEnabled = isOMTAEnabled(); diff --git a/dom/base/test/test_bug1022229.html b/dom/base/test/test_bug1022229.html @@ -10,7 +10,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1022229 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> <script type="application/javascript"> - /** Test for postMessage between sandboxed iframe and non-sandboxed window. + /** + * Test for postMessage between sandboxed iframe and non-sandboxed window. **/ SimpleTest.waitForExplicitFinish(); function go() { diff --git a/dom/base/test/test_bug401662.html b/dom/base/test/test_bug401662.html @@ -22,8 +22,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=401662 <pre id="test"> <script class="testbody" type="text/javascript"> -/** Test for Bug 401662 - don't serialize style elements in body into - plaintext**/ +/** + * Test for Bug 401662 - don't serialize style elements in body into + * plaintext + */ SimpleTest.waitForExplicitFinish(); window.onload = function() { diff --git a/dom/base/test/test_bug562169-1.html b/dom/base/test/test_bug562169-1.html @@ -18,10 +18,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=562169 <pre id="test"> <script type="application/javascript"> -/** Test for Bug 562169 **/ -/** Test that adding an child to an element with dir="rtl" makes the - child have rtl directionality, and removing the child makes it - go back to ltr directionality **/ +/** + * Test for Bug 562169 + * Test that adding an child to an element with dir="rtl" makes the + * child have rtl directionality, and removing the child makes it + * go back to ltr directionality + */ function checkSelector(element, expectedDir, expectedChild) { diff --git a/dom/events/test/test_bug1017086_enable.html b/dom/events/test/test_bug1017086_enable.html @@ -21,9 +21,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1017086 } function part_of_checks(pointer_events, check, window, document, testelem) { for(item in pointer_events) { check(true, pointer_events[item], window, "window"); } - /** TODO - for(item in pointer_events) { check(false, pointer_events[item], document, "document"); } - **/ + // TODO + // for(item in pointer_events) { check(false, pointer_events[item], document, "document"); } for(item in pointer_events) { check(true, pointer_events[item], testelem, "element"); } SimpleTest.finish(); } diff --git a/dom/events/test/test_bug545268.html b/dom/events/test/test_bug545268.html @@ -19,9 +19,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=545268 <pre id="test"> <script type="application/javascript"> -/** Test for Bug 545268 - Like the test for bug 493251, but we test that suppressing events in - a parent window stops the events from reaching the child window. */ +/** + * Test for Bug 545268 + * Like the test for bug 493251, but we test that suppressing events in + * a parent window stops the events from reaching the child window. + */ var win; var subwin; diff --git a/dom/events/test/test_bug944011.html b/dom/events/test/test_bug944011.html @@ -10,8 +10,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=944011 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> <script type="application/javascript"> - /** Test for Bug 944011 comment 24 - Event handlers should fire even if the - target comes from a non-current inner. **/ + /** + * Test for Bug 944011 comment 24 - Event handlers should fire even if the + * target comes from a non-current inner. + */ SimpleTest.waitForExplicitFinish(); var gLoadCount = 0; function loaded() { diff --git a/dom/html/test/forms/test_input_color_input_change_events.html b/dom/html/test/forms/test_input_color_input_change_events.html @@ -11,7 +11,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> <script type="application/javascript"> - /** Test that update() modifies the element value such as done() when it is + /** + * Test that update() modifies the element value such as done() when it is * not called as a concellation. */ diff --git a/dom/html/test/forms/test_input_color_picker_initial.html b/dom/html/test/forms/test_input_color_picker_initial.html @@ -11,8 +11,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> <script type="application/javascript"> - /** Test that the initial value of the nsIColorPicker is the current value of - the <input type='color'> element. **/ + /** + * Test that the initial value of the nsIColorPicker is the current value of + * the <input type='color'> element. + */ SimpleTest.waitForExplicitFinish(); diff --git a/dom/html/test/forms/test_input_color_picker_popup.html b/dom/html/test/forms/test_input_color_picker_popup.html @@ -12,8 +12,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996 <style> body { font-family: serif } </style> <script type="application/javascript"> - /** Test the behaviour of the <input type='color'> when clicking on it from - different ways. **/ + /** + * Test the behaviour of the <input type='color'> when clicking on it from + * different ways. + */ SimpleTest.waitForExplicitFinish(); diff --git a/dom/html/test/forms/test_input_color_picker_update.html b/dom/html/test/forms/test_input_color_picker_update.html @@ -12,7 +12,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996 <style> body { font-family: serif } </style> <script type="application/javascript"> - /** Test that update() modifies the element value such as done() when it is + /** + * Test that update() modifies the element value such as done() when it is * not called as a concellation. */ diff --git a/dom/html/test/forms/test_select_selectedOptions.html b/dom/html/test/forms/test_select_selectedOptions.html @@ -14,7 +14,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=596681 <pre id="test"> <script type="application/javascript"> -/** Test for HTMLSelectElement's selectedOptions attribute. +/** + * Test for HTMLSelectElement's selectedOptions attribute. * * selectedOptions is a live list of the options that have selectedness of true * (not the selected content attribute). diff --git a/dom/html/test/test_bug1260664.html b/dom/html/test/test_bug1260664.html @@ -30,10 +30,12 @@ function runTests() { attribute: { content: "referrerpolicy", idl: "referrerPolicy" }, validValues: [ "no-referrer", "origin", - /** These 2 below values are still invalid, please see - Bug 1178337 - Valid referrer attribute values **/ - /** "no-referrer-when-downgrade", - "origin-when-cross-origin", **/ + /** + * These 2 below values are still invalid, please see + * Bug 1178337 - Valid referrer attribute values + */ + // "no-referrer-when-downgrade", + // "origin-when-cross-origin", "unsafe-url" ], invalidValues: [ "", " orIgin ", " unsafe-uRl ", " No-RefeRRer ", " fOoBaR " diff --git a/dom/html/test/test_getElementsByName_after_mutation.html b/dom/html/test/test_getElementsByName_after_mutation.html @@ -15,9 +15,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1376695 <pre id="test"> <script type="application/javascript"> -/** Test to ensure that the list returned by getElementsByName is updated after +/** + * Test to ensure that the list returned by getElementsByName is updated after * mutations. - **/ + */ var fooList = document.getElementsByName("foo"); var originalDiv = document.getElementById("originalFoo"); diff --git a/dom/media/IdpSandbox.sys.mjs b/dom/media/IdpSandbox.sys.mjs @@ -22,8 +22,10 @@ RedirectHttpsOnly.prototype = { QueryInterface: ChromeUtils.generateQI(["nsIChannelEventSink"]), }; -/** This class loads a resource into a single string. ResourceLoader.load() is - * the entry point. */ +/** + * This class loads a resource into a single string. ResourceLoader.load() is + * the entry point. + */ function ResourceLoader(res, rej) { this.resolve = res; this.reject = rej; diff --git a/dom/media/webaudio/test/test_webAudio_muteTab.html b/dom/media/webaudio/test/test_webAudio_muteTab.html @@ -20,7 +20,8 @@ createHTML({ * pulseaudio null-sink. Simulateously, record the other side of the null * sink, and check that no audio has been written to the sink, because the tab * was muted. Then, umute the tab and check that audio is being sent to the - * null-sink. */ + * null-sink. + */ runTest(async () => { if (!SpecialPowers.getCharPref("media.audio_loopback_dev", "")) { todo(false, "No loopback device set by framework. Try --use-test-media-devices"); diff --git a/dom/media/webrtc/tests/mochitests/head.js b/dom/media/webrtc/tests/mochitests/head.js @@ -636,8 +636,10 @@ var timeout = (promise, time, msg) => wait(time).then(() => Promise.reject(new Error(msg))), ]); -/** Adds a |finally| function to a promise whose argument is invoked whether the - * promise is resolved or rejected, and that does not interfere with chaining.*/ +/** + * Adds a |finally| function to a promise whose argument is invoked whether the + * promise is resolved or rejected, and that does not interfere with chaining. + */ var addFinallyToPromise = promise => { promise.finally = func => { return promise.then( diff --git a/dom/push/ChromePushSubscription.sys.mjs b/dom/push/ChromePushSubscription.sys.mjs @@ -27,7 +27,8 @@ export class ChromePushSubscription { return this.#props.pushCount; } - /** The number of remaining background messages that can be sent to this + /** + * The number of remaining background messages that can be sent to this * subscription, or -1 of the subscription is exempt from the quota. */ get quota() { diff --git a/dom/security/test/https-first/browser_schemeless.js b/dom/security/test/https-first/browser_schemeless.js @@ -39,7 +39,8 @@ async function runMainTest(aInput, aDesc, aExpectedScheme) { /** * Type aInput into the address bar and press ctrl+enter, * resulting in the input being canonized first. - * This should not change schemeless HTTPS behaviour. */ + * This should not change schemeless HTTPS behaviour. + */ async function runCanonizedTest(aInput, aDesc, aExpectedScheme) { await BrowserTestUtils.withNewTab("about:blank", async function (browser) { const loaded = BrowserTestUtils.browserLoaded(browser, false, null, true); @@ -57,7 +58,8 @@ async function runCanonizedTest(aInput, aDesc, aExpectedScheme) { /** * Type aInput into the address bar and press alt+enter, * resulting in the input being loaded in a new tab. - * This should not change schemeless HTTPS behaviour. */ + * This should not change schemeless HTTPS behaviour. + */ async function runNewTabTest(aInput, aDesc, aExpectedScheme) { await BrowserTestUtils.withNewTab( "about:about", // For alt+enter to do anything, we need to be on a page other than about:blank. @@ -88,7 +90,8 @@ async function runNewTabTest(aInput, aDesc, aExpectedScheme) { /** * Type aInput into the address bar and press shift+enter, * resulting in the input being loaded in a new window. - * This should not change schemeless HTTPS behaviour. */ + * This should not change schemeless HTTPS behaviour. + */ async function runNewWindowTest(aInput, aDesc, aExpectedScheme) { await BrowserTestUtils.withNewTab("about:about", async function () { const newWindowPromise = BrowserTestUtils.waitForNewWindow({ @@ -114,7 +117,8 @@ async function runNewWindowTest(aInput, aDesc, aExpectedScheme) { /** * Instead of typing aInput into the address bar, copy it * to the clipboard and use the "Paste and Go" menu entry. - * This should not change schemeless HTTPS behaviour. */ + * This should not change schemeless HTTPS behaviour. + */ async function runPasteAndGoTest(aInput, aDesc, aExpectedScheme) { await BrowserTestUtils.withNewTab("about:blank", async function (browser) { gURLBar.focus(); diff --git a/layout/forms/test/test_listcontrol_search.html b/layout/forms/test/test_listcontrol_search.html @@ -11,8 +11,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=849438 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> <script type="application/javascript"> - /** This test will focus a select element and press a key that matches the - first non-space character of an entry. **/ + /** + * This test will focus a select element and press a key that matches the + * first non-space character of an entry. + */ SimpleTest.waitForExplicitFinish(); SimpleTest.waitForFocus(function() { diff --git a/layout/generic/test/test_bug666225.html b/layout/generic/test/test_bug666225.html @@ -17,8 +17,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=666225 </div> <pre id="test"> <script type="application/javascript"> -/** Test for Bug 666225 - Causes ASSERTION: Unexpected document: 'capturingContent->GetUncomposedDoc() == GetDocument()' (bug 560764) **/ +/** + * Test for Bug 666225 + * Causes ASSERTION: Unexpected document: 'capturingContent->GetUncomposedDoc() == GetDocument()' (bug 560764) + */ function click() { diff --git a/layout/style/test/test_inherit_computation.html b/layout/style/test/test_inherit_computation.html @@ -19,8 +19,10 @@ <pre id="test"> <script class="testbody" type="text/javascript"> -/** Test for computation of CSS 'inherit' on all properties and 'unset' on - inherited properties **/ +/** + * Test for computation of CSS 'inherit' on all properties and 'unset' on + * inherited properties + */ var gDisplayTree = document.getElementById("display"); // elements without a frame diff --git a/layout/style/test/test_inherit_storage.html b/layout/style/test/test_inherit_storage.html @@ -20,8 +20,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=375363 <pre id="test"> <script class="testbody" type="text/javascript"> -/** Test for parsing, storage, and serialization of CSS 'inherit' on all - properties and 'unset' on inherited properties **/ +/** + * Test for parsing, storage, and serialization of CSS 'inherit' on all + * properties and 'unset' on inherited properties + */ var gDeclaration = document.getElementById("testnode").style; diff --git a/layout/style/test/test_initial_computation.html b/layout/style/test/test_initial_computation.html @@ -36,8 +36,10 @@ <pre id="test"> <script class="testbody" type="text/javascript"> -/** Test for computation of CSS 'initial' on all properties and 'unset' on - reset properties **/ +/** + * Test for computation of CSS 'initial' on all properties and 'unset' on + * reset properties + */ var gBrokenInitial = { }; diff --git a/layout/style/test/test_initial_storage.html b/layout/style/test/test_initial_storage.html @@ -20,8 +20,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=375363 <pre id="test"> <script class="testbody" type="text/javascript"> -/** Test for parsing, storage, and serialization of CSS 'initial' on all - properties and 'unset' on reset properties **/ +/** + * Test for parsing, storage, and serialization of CSS 'initial' on all + * properties and 'unset' on reset properties + */ var gDeclaration = document.getElementById("testnode").style; diff --git a/layout/style/test/test_position_float_display.html b/layout/style/test/test_position_float_display.html @@ -23,9 +23,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1038929 <pre id="test"> <script type="application/javascript"> -/** Test for Bug 1038929: Test that "display" on a floated or absolutely/fixed - position node is correctly converted to a block display as given in the table - in CSS 2.1 9.7. */ +/** + * Test for Bug 1038929: Test that "display" on a floated or absolutely/fixed + * position node is correctly converted to a block display as given in the table + * in CSS 2.1 9.7. + */ // Maps from display value to expected conversion when floated/positioned // This loosely follows the spec in CSS 2.1 section 9.7. Except for "other" diff --git a/layout/style/test/test_position_sticky.html b/layout/style/test/test_position_sticky.html @@ -42,10 +42,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=886646 <script type="application/javascript"> -/** Test for Bug 886646 - Offsets for sticky positioning, when accessed through +/** + * Test for Bug 886646 - Offsets for sticky positioning, when accessed through * getComputedStyle(), should be accurately computed. In particular, * percentage offsets should be computed in terms of the scroll container's - * content box. */ + * content box. + */ // Test that percentage sticky offsets are computed in terms of the // scroll container's content box diff --git a/layout/style/test/test_root_node_display.html b/layout/style/test/test_root_node_display.html @@ -19,8 +19,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=969460 <pre id="test"> <script type="application/javascript"> -/** Test for Bug 969460: Test that "display" on the root node is computed - using the same conversion that we use for display on floated elements **/ +/** + * Test for Bug 969460: Test that "display" on the root node is computed + * using the same conversion that we use for display on floated elements. + */ function test_display_value(val) { diff --git a/layout/style/test/test_transitions_cancel_near_end.html b/layout/style/test/test_transitions_cancel_near_end.html @@ -31,9 +31,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=613888 <pre id="test"> <script class="testbody" type="text/javascript"> -/** Test for Bug 613888: that we don't cancel transitions when they're - about to end (current interpolated value rounds to ending value) and - they get an unrelated style change. **/ +/** + * Test for Bug 613888: that we don't cancel transitions when they're + * about to end (current interpolated value rounds to ending value) and + * they get an unrelated style change. + */ var count_remaining = 6; diff --git a/netwerk/test/httpserver/httpd.sys.mjs b/netwerk/test/httpserver/httpd.sys.mjs @@ -1199,8 +1199,9 @@ function Connection( */ this.request = null; - /** This allows a connection to disambiguate between a peer initiating a - * close and the socket being forced closed on shutdown. + /** + * This allows a connection to disambiguate between a peer initiating a + * close and the socket being forced closed on shutdown. */ this._closed = false; diff --git a/netwerk/test/httpserver/test/head_utils.js b/netwerk/test/httpserver/test/head_utils.js @@ -220,7 +220,7 @@ function callLater(msecs, callback) { do_timeout(msecs, callback); } -/** ***************************************************** +/******************************************************* * SIMPLE SUPPORT FOR LOADING/TESTING A SERIES OF URLS * *******************************************************/ @@ -385,7 +385,7 @@ function runHttpTests(testArray, done) { performNextTest(); } -/** ************************************** +/**************************************** * RAW REQUEST FORMAT TESTING FUNCTIONS * ****************************************/ diff --git a/netwerk/test/httpserver/test/test_async_response_sending.js b/netwerk/test/httpserver/test/test_async_response_sending.js @@ -45,7 +45,7 @@ function runNextTest() { } } -/** *********** +/************* * TEST DATA * *************/ @@ -72,9 +72,11 @@ const LATTER_HALF_THIRD_SEGMENT = [11, 12]; const TWO_HALF_SEGMENTS = [1, 2, 1, 2]; -/** ******* +/** + * ******* * TESTS * - *********/ + ******** + */ var tests = [ sourceClosedWithoutWrite, @@ -318,7 +320,7 @@ function sinkAndSourceClosedWithPendingData(next) { t.expect(Cr.NS_ERROR_UNEXPECTED, []); } -/** *********** +/************* * UTILITIES * *************/ @@ -375,7 +377,7 @@ function note(m) { dumpn(asterisks + "\n* " + m + " *\n" + asterisks); } -/** ********* +/*********** * MOCKERY * ***********/ diff --git a/netwerk/test/httpserver/test/test_body_length.js b/netwerk/test/httpserver/test/test_body_length.js @@ -37,7 +37,7 @@ function contentLength(request) { Assert.equal(data, REQUEST_DATA); } -/** ************* +/*************** * BEGIN TESTS * ***************/ diff --git a/netwerk/test/httpserver/test/test_default_index_handler.js b/netwerk/test/httpserver/test/test_default_index_handler.js @@ -79,7 +79,7 @@ function destroyTestDirectory() { dir.remove(true); } -/** *********** +/************* * UTILITIES * *************/ @@ -212,7 +212,7 @@ function makeFile(name, isDirectory, parentDir, lst) { } } -/** ******* +/********* * TESTS * *********/ diff --git a/netwerk/test/httpserver/test/test_header_array.js b/netwerk/test/httpserver/test/test_header_array.js @@ -18,7 +18,7 @@ function run_test() { runHttpTests(tests, testComplete(srv)); } -/** ********** +/************ * HANDLERS * ************/ @@ -40,7 +40,7 @@ function pathHandler(request, response) { response.setHeader("X-Single-Header-Merge", "Single 2", true); } -/** ************* +/*************** * BEGIN TESTS * ***************/ diff --git a/netwerk/test/httpserver/test/test_host.js b/netwerk/test/httpserver/test/test_host.js @@ -190,7 +190,7 @@ add_task(async function run_test_3() { await new Promise(resolve => srv.stop(resolve)); }); -/** ******************* +/********************* * UTILITY FUNCTIONS * *********************/ @@ -238,7 +238,7 @@ function check400(aData) { Assert.equal(firstLine.substring(0, HTTP_400_LEADER_LENGTH), HTTP_400_LEADER); } -/** ************* +/*************** * BEGIN TESTS * ***************/ diff --git a/netwerk/test/httpserver/test/test_host_identity.js b/netwerk/test/httpserver/test/test_host_identity.js @@ -72,7 +72,7 @@ function runIdentityTest(host, port) { }); } -/** ************* +/*************** * BEGIN TESTS * ***************/ diff --git a/netwerk/test/httpserver/test/test_processasync.js b/netwerk/test/httpserver/test/test_processasync.js @@ -24,7 +24,7 @@ function run_test() { runHttpTests(tests, testComplete(srv)); } -/** ************* +/*************** * BEGIN TESTS * ***************/ diff --git a/netwerk/test/httpserver/test/test_registerdirectory.js b/netwerk/test/httpserver/test/test_registerdirectory.js @@ -49,12 +49,12 @@ function checkFile(ch, status, data) { ChromeUtils.defineLazyGetter(this, "tests", function () { return [ - /** ********************* + /*********************** * without a base path * ***********************/ new Test(BASE + "/test_registerdirectory.js", nocache, notFound, null), - /** ****************** + /******************** * with a base path * ********************/ new Test( @@ -68,7 +68,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { checkFile ), - /** *************************** + /***************************** * without a base path again * *****************************/ new Test( @@ -82,7 +82,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { null ), - /** ************************* + /*************************** * registered path handler * ***************************/ new Test( @@ -98,7 +98,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { null ), - /** ********************** + /************************ * removed path handler * ************************/ new Test( @@ -111,7 +111,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { null ), - /** ****************** + /******************** * with a base path * ********************/ new Test( @@ -127,7 +127,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { checkFile ), - /** *********************** + /************************* * ...and a path handler * *************************/ new Test( @@ -143,7 +143,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { null ), - /** ********************** + /************************ * removed base handler * ************************/ new Test( @@ -157,7 +157,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { null ), - /** ********************** + /************************ * removed path handler * ************************/ new Test( @@ -170,7 +170,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { null ), - /** *********************** + /************************* * mapping set up, works * *************************/ new Test( @@ -184,7 +184,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { null ), - /** ******************* + /********************* * no mapping, fails * *********************/ new Test( @@ -194,7 +194,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { null ), - /** **************** + /****************** * mapping, works * ******************/ new Test( @@ -210,12 +210,12 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { checkFile ), - /** ********************************** + /************************************ * two mappings set up, still works * ************************************/ new Test(BASE + "/foo/test_registerdirectory.js", nocache, null, checkFile), - /** ************************ + /************************** * remove topmost mapping * **************************/ new Test( @@ -228,7 +228,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { null ), - /** ************************************ + /************************************** * lower mapping still present, works * **************************************/ new Test( @@ -238,7 +238,7 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { checkFile ), - /** ***************** + /******************* * mapping removed * *******************/ new Test( diff --git a/netwerk/test/httpserver/test/test_registerprefix.js b/netwerk/test/httpserver/test/test_registerprefix.js @@ -58,36 +58,36 @@ ChromeUtils.defineLazyGetter(this, "tests", function () { ]; }); -/** ************************* +/***************************** * registered prefix handler * - ***************************/ + *****************************/ function prefixHandler(channel) { nocache(channel); srv.registerPrefixHandler("/prefix/", makeOverride("prefix")); } -/** ****************************** +/********************************** * registered path handler on top * - ********************************/ + **********************************/ function pathHandler(channel) { nocache(channel); srv.registerPathHandler("/prefix/dummy", makeOverride("path")); } -/** ******************************** +/************************************ * registered longer prefix handler * - **********************************/ + ************************************/ function longerPrefixHandler(channel) { nocache(channel); srv.registerPrefixHandler("/prefix/subpath/", makeOverride("subpath")); } -/** ********************** +/************************** * removed prefix handler * - ************************/ + **************************/ function removeHandlers(channel) { nocache(channel); @@ -95,9 +95,9 @@ function removeHandlers(channel) { srv.registerPathHandler("/prefix/dummy", null); } -/** *************************** +/******************************* * re-register shorter handler * - *****************************/ + *******************************/ function newPrefixHandler(channel) { nocache(channel); diff --git a/netwerk/test/httpserver/test/test_request_line_split_in_two_packets.js b/netwerk/test/httpserver/test/test_request_line_split_in_two_packets.js @@ -24,7 +24,7 @@ function run_test() { runRawTests(tests, testComplete(srv)); } -/** ************* +/*************** * BEGIN TESTS * ***************/ diff --git a/netwerk/test/httpserver/test/test_seizepower.js b/netwerk/test/httpserver/test/test_seizepower.js @@ -44,7 +44,7 @@ function checkException(fun, err, msg) { do_throw(msg); } -/** *************** +/***************** * PATH HANDLERS * *****************/ @@ -132,7 +132,7 @@ function handleSeizeAfterAsync(request, response) { }); } -/** ************* +/*************** * BEGIN TESTS * ***************/ diff --git a/netwerk/test/httpserver/test/test_setstatusline.js b/netwerk/test/httpserver/test/test_setstatusline.js @@ -30,7 +30,7 @@ function run_test() { runHttpTests(tests, testComplete(srv)); } -/** *********** +/************* * UTILITIES * *************/ @@ -51,7 +51,7 @@ function checkStatusLine( Assert.equal(respMin.value, httpMinVer); } -/** ******* +/********* * TESTS * *********/ diff --git a/netwerk/test/httpserver/test/test_sjs.js b/netwerk/test/httpserver/test/test_sjs.js @@ -20,7 +20,7 @@ const BASE = "http://localhost:" + PORT; var test; var tests = []; -/** ******************* +/********************* * UTILITY FUNCTIONS * *********************/ @@ -36,7 +36,7 @@ function skipCache(ch) { ch.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE; } -/** ****************** +/******************** * DEFINE THE TESTS * ********************/ @@ -119,7 +119,7 @@ function setupTests(throwing) { // after the two sets will almost certainly fail. } -/** *************** +/***************** * ADD THE TESTS * *****************/ @@ -225,7 +225,7 @@ function onStop(ch, status, data) { test = new Test(BASE + "/script.html", setupFileMapping, onStart, onStop); tests.push(test); -/** *************** +/***************** * RUN THE TESTS * *****************/ diff --git a/netwerk/test/httpserver/test/test_sjs_object_state.js b/netwerk/test/httpserver/test/test_sjs_object_state.js @@ -26,7 +26,7 @@ function run_test() { new HTTPTestLoader(PATH + "?state=initial", initialStart, initialStop); } -/** ****************** +/******************** * OBSERVER METHODS * ********************/ @@ -239,7 +239,7 @@ function checkForFinish() { } } -/** ******************************* +/********************************* * UTILITY OBSERVABLE URL LOADER * *********************************/ diff --git a/netwerk/test/httpserver/test/test_sjs_state.js b/netwerk/test/httpserver/test/test_sjs_state.js @@ -37,7 +37,7 @@ function run_test() { runHttpTests(tests, done); } -/** ********** +/************ * HANDLERS * ************/ @@ -74,7 +74,7 @@ function pathHandler(request, response) { response.setHeader("X-New-Shared-Value", sharedValue, false); } -/** ************* +/*************** * BEGIN TESTS * ***************/ diff --git a/netwerk/test/httpserver/test/test_sjs_throwing_exceptions.js b/netwerk/test/httpserver/test/test_sjs_throwing_exceptions.js @@ -35,7 +35,7 @@ function run_test() { runHttpTests(tests, done); } -/** ************* +/*************** * BEGIN TESTS * ***************/ diff --git a/netwerk/test/unit/test_speculative_connect.js b/netwerk/test/unit/test_speculative_connect.js @@ -15,7 +15,8 @@ const ServerSocket = CC( var serv; var ios; -/** Example local IP addresses (literal IP address hostname). +/** + * Example local IP addresses (literal IP address hostname). * * Note: for IPv6 Unique Local and Link Local, a wider range of addresses is * set aside than those most commonly used. Technically, link local addresses @@ -51,7 +52,8 @@ var localIPv6Literals = [ ]; var localIPLiterals = localIPv4Literals.concat(localIPv6Literals); -/** Test function list and descriptions. +/** + * Test function list and descriptions. */ var testList = [ test_localhost_http_speculative_connect, @@ -72,7 +74,8 @@ var testDescription = [ var testIdx = 0; var hostIdx = 0; -/** TestServer +/** + * TestServer * * Implements nsIServerSocket for test_speculative_connect. */ @@ -94,7 +97,8 @@ TestServer.prototype = { onStopListening() {}, }; -/** TestFailedStreamCallback +/** + * TestFailedStreamCallback * * Implements nsI[Input|Output]StreamCallback for socket layer tests. * Expect failure in all cases @@ -149,7 +153,8 @@ TestFailedStreamCallback.prototype = { }, }; -/** test_localhost_http_speculative_connect +/** + * test_localhost_http_speculative_connect * * Tests a basic positive case using nsIOService.SpeculativeConnect: * connecting to localhost via http. @@ -167,7 +172,8 @@ function test_localhost_http_speculative_connect() { .speculativeConnect(URI, principal, null, false); } -/** test_localhost_https_speculative_connect +/** + * test_localhost_https_speculative_connect * * Tests a basic positive case using nsIOService.SpeculativeConnect: * connecting to localhost via https. @@ -195,7 +201,8 @@ function test_localhost_https_speculative_connect() { * 2. Verify hostnames that need to be resolved at the socket layer. */ -/** test_hostnames_resolving_to_addresses +/** + * test_hostnames_resolving_to_addresses * * Common test function for resolved hostnames. Takes a list of hosts, a * boolean to determine if the test is expected to succeed or fail, and a @@ -269,7 +276,8 @@ function test_hostnames_resolving_to_local_addresses() { test_hostnames_resolving_to_addresses(host, next); } -/** test_speculative_connect_with_host_list +/** + * test_speculative_connect_with_host_list * * Common test function for resolved proxy hosts. Takes a list of hosts, a * boolean to determine if the test is expected to succeed or fail, and a @@ -398,7 +406,8 @@ function test_speculative_connect_with_proxy_filter() { next_test(); } -/** next_test +/** + * next_test * * Calls the next test in testList. Each test is responsible for calling this * function when its test cases are complete. @@ -415,7 +424,8 @@ function next_test() { testList[testIdx++](); } -/** run_test +/** + * run_test * * Main entry function for test execution. */ diff --git a/remote/marionette/actors/MarionetteCommandsChild.sys.mjs b/remote/marionette/actors/MarionetteCommandsChild.sys.mjs @@ -307,7 +307,8 @@ export class MarionetteCommandsChild extends JSWindowActorChild { // Implementation of WebDriver commands - /** Clear the text of an element. + /** + * Clear the text of an element. * * @param {object} options * @param {Element} options.elem diff --git a/services/fxaccounts/FxAccounts.sys.mjs b/services/fxaccounts/FxAccounts.sys.mjs @@ -509,7 +509,8 @@ export class FxAccounts { } } - /** Gets both the OAuth token and the users scoped keys for that token + /** + * Gets both the OAuth token and the users scoped keys for that token * and verifies that both operations were done for the same user, * preventing race conditions where a caller * can get the key for one user, and the id of another if the user @@ -688,18 +689,19 @@ export class FxAccounts { }); } - /** Returns a promise that resolves to true if we can currently connect (ie, - * sign in, or re-connect after a password change) to a Firefox Account. - * If this returns false, the caller can assume that some UI was shown - * which tells the user why we could not connect. + /** + * Returns a promise that resolves to true if we can currently connect (ie, + * sign in, or re-connect after a password change) to a Firefox Account. + * If this returns false, the caller can assume that some UI was shown + * which tells the user why we could not connect. * - * Currently, the primary password being locked is the only reason why - * this returns false, and in this scenario, the primary password unlock - * dialog will have been shown. + * Currently, the primary password being locked is the only reason why + * this returns false, and in this scenario, the primary password unlock + * dialog will have been shown. * - * This currently doesn't need to return a promise, but does so that - * future enhancements, such as other explanatory UI which requires - * async can work without modification of the call-sites. + * This currently doesn't need to return a promise, but does so that + * future enhancements, such as other explanatory UI which requires + * async can work without modification of the call-sites. */ static canConnectAccount() { return Promise.resolve(!lazy.mpLocked() || lazy.ensureMPUnlocked()); @@ -1549,7 +1551,8 @@ FxAccountsInternal.prototype = { }); }, - /** Sets the user to be verified in the account state, + /** + * Sets the user to be verified in the account state, * This prevents any polling for the user's verification state from the FxA server **/ async setUserVerified() { diff --git a/services/fxaccounts/FxAccountsWebChannel.sys.mjs b/services/fxaccounts/FxAccountsWebChannel.sys.mjs @@ -587,7 +587,8 @@ FxAccountsWebChannelHelpers.prototype = { } }, - /** Internal function used to configure the requested services. + /** + * Internal function used to configure the requested services. * * The "services" param is an object as received from the FxA server. */ diff --git a/services/sync/modules/engines/addons.sys.mjs b/services/sync/modules/engines/addons.sys.mjs @@ -528,7 +528,7 @@ AddonsStore.prototype = { } }, - /** ************************************************************************* + /*************************************************************************** * Functions below are unique to this store and not part of the Store API * ***************************************************************************/ diff --git a/testing/mochitest/tests/SimpleTest/MozillaLogger.js b/testing/mochitest/tests/SimpleTest/MozillaLogger.js @@ -52,8 +52,10 @@ class MozillaLogger { * intended to be run from chrome space */ -/** Init the file logger with the absolute path to the file. - It will create and append if the file already exists **/ +/** + * Init the file logger with the absolute path to the file. + * It will create and append if the file already exists. + */ class MozillaFileLogger extends MozillaLogger { constructor(aPath) { super(); diff --git a/testing/talos/talos/pageloader/chrome/MozillaFileLogger.js b/testing/talos/talos/pageloader/chrome/MozillaFileLogger.js @@ -40,8 +40,10 @@ const PR_SYNC = 0x40; // exists, no action and NULL is returned. const PR_EXCL = 0x80; -/** Init the file logger with the absolute path to the file. - It will create and append if the file already exists **/ +/** + * Init the file logger with the absolute path to the file. + * It will create and append if the file already exists. + */ var MozillaFileLogger = {}; MozillaFileLogger.init = function (path) { diff --git a/testing/talos/talos/scripts/talos-debug.js b/testing/talos/talos/scripts/talos-debug.js @@ -2,7 +2,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/. */ -/** **************************************************************** +/** * window.talosDebug provides some statistical functions * (sum, average, median, stddev) and a tpRecordTime method which * reports some statistics about the data set, including detected @@ -13,7 +13,7 @@ * stability point, etc) * * talos-debug.js: Bug 849558 - *****************************************************************/ + */ window.talosDebug = { // Optional config properties disabled: false, diff --git a/toolkit/components/antitracking/test/browser/browser_serviceWorkersWithStorageAccessGranted.js b/toolkit/components/antitracking/test/browser/browser_serviceWorkersWithStorageAccessGranted.js @@ -1,17 +1,18 @@ -/** This tests that the service worker can be used if we have storage access - * permission. We manually write the storage access permission into the - * permission manager to simulate the storage access has been granted. We would - * test the service worker three times. The fist time is to check the service - * work is allowed. The second time is to load again and check it won't hit - * assertion, this assertion would only be hit if we have registered a service - * worker, see Bug 1631234. +/** + * This tests that the service worker can be used if we have storage access + * permission. We manually write the storage access permission into the + * permission manager to simulate the storage access has been granted. We would + * test the service worker three times. The fist time is to check the service + * work is allowed. The second time is to load again and check it won't hit + * assertion, this assertion would only be hit if we have registered a service + * worker, see Bug 1631234. * - * The third time is to load again but in a sandbox iframe to check it won't - * hit the assertion. See Bug 1637226 for details. + * The third time is to load again but in a sandbox iframe to check it won't + * hit the assertion. See Bug 1637226 for details. * - * The fourth time is to load again in a nested iframe to check it won't hit - * the assertion. See Bug 1641153 for details. - * */ + * The fourth time is to load again in a nested iframe to check it won't hit + * the assertion. See Bug 1641153 for details. + */ add_task(async _ => { // Manually add the storage permission. diff --git a/toolkit/components/downloads/test/unit/head.js b/toolkit/components/downloads/test/unit/head.js @@ -881,7 +881,8 @@ function isValidDate(aDate) { * Because the actual download's referrer info's computedReferrer is computed * from referrerPolicy and originalReferrer and is non-null, and the expected * referrer info was constructed in isolation and therefore the computedReferrer - * is null, it isn't possible to use equals here. */ + * is null, it isn't possible to use equals here. + */ function checkEqualReferrerInfos(aActualInfo, aExpectedInfo) { Assert.equal( !!aExpectedInfo.originalReferrer, diff --git a/toolkit/components/extensions/ExtensionParent.sys.mjs b/toolkit/components/extensions/ExtensionParent.sys.mjs @@ -1620,8 +1620,10 @@ class HiddenExtensionPage { } } -/** @typedef {import("resource://devtools/server/actors/descriptors/webextension.js") - .WebExtensionDescriptorActor} WebExtensionDescriptorActor */ +/** + * @typedef {import("resource://devtools/server/actors/descriptors/webextension.js") + * .WebExtensionDescriptorActor} WebExtensionDescriptorActor + */ /** * This object provides utility functions needed by the devtools actors to diff --git a/toolkit/components/formautofill/shared/FormAutofillHandler.sys.mjs b/toolkit/components/formautofill/shared/FormAutofillHandler.sys.mjs @@ -1115,7 +1115,8 @@ export class FormAutofillHandler { } } -/** Apply some transformations to the fields on the profile based +/** + * Apply some transformations to the fields on the profile based * on the fields that appear in the form. The original values are * saved and used if the transformer is used again. */ diff --git a/toolkit/components/ml/actors/MLEngineParent.sys.mjs b/toolkit/components/ml/actors/MLEngineParent.sys.mjs @@ -494,7 +494,8 @@ export class MLEngineParent extends JSProcessActorParent { }); } - /** Gets the wasm file from remote settings. + /** + * Gets the wasm file from remote settings. * * @param {RemoteSettingsClient} client * @param {string} backend - The ML engine for which the WASM buffer is requested. diff --git a/toolkit/components/ml/content/ModelHub.sys.mjs b/toolkit/components/ml/content/ModelHub.sys.mjs @@ -1500,7 +1500,8 @@ export class ModelHub { }; } - /** Creates the file URL from the organization, model, and version. + /** + * Creates the file URL from the organization, model, and version. * * @param {object} config - The configuration object to be updated. * @param {string} config.model - model name @@ -1522,7 +1523,8 @@ export class ModelHub { }); } - /** Checks the model and revision inputs. + /** + * Checks the model and revision inputs. * * @param { string } model * @param { string } revision diff --git a/toolkit/components/ml/content/Utils.sys.mjs b/toolkit/components/ml/content/Utils.sys.mjs @@ -178,7 +178,8 @@ export class ProgressAndStatusCallbackParams { } } -/** Creates the file URL from the organization, model, and version. +/** + * Creates the file URL from the organization, model, and version. * * @param {object} config - The configuration object to be updated. * @param {string} config.model - model name diff --git a/toolkit/components/ml/tests/browser/browser_ml_cache.js b/toolkit/components/ml/tests/browser/browser_ml_cache.js @@ -585,8 +585,8 @@ add_task(async function testInvalidDomain() { ); }); -/** Tests the method's error handling when the URL format does not include the required segments. - * +/** + * Tests the method's error handling when the URL format does not include the required segments. */ add_task(async function testTooFewParts() { const hub = new ModelHub({ diff --git a/toolkit/components/normandy/content/AboutPages.sys.mjs b/toolkit/components/normandy/content/AboutPages.sys.mjs @@ -119,14 +119,16 @@ ChromeUtils.defineLazyGetter(AboutPages, "aboutStudies", () => { } }, - /** Add a browsing context to the weak set; + /** + * Add a browsing context to the weak set; * this weak set keeps track of all contexts * that are housing an about:studies page. */ addToWeakSet(browsingContext) { BrowsingContexts.add(browsingContext); }, - /** Remove a browsing context to the weak set; + /** + * Remove a browsing context to the weak set; * this weak set keeps track of all contexts * that are housing an about:studies page. */ diff --git a/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs b/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs @@ -738,7 +738,8 @@ export class LoginFormState { lazy.gFormFillService.showPopup(); } - /** Remove login field highlight when its value is cleared or overwritten. + /** + * Remove login field highlight when its value is cleared or overwritten. */ static #removeFillFieldHighlight(event) { event.target.autofillState = ""; diff --git a/toolkit/components/passwordmgr/test/mochitest/test_form_action_1.html b/toolkit/components/passwordmgr/test/mochitest/test_form_action_1.html @@ -21,8 +21,10 @@ let DEFAULT_ORIGIN = window.location.origin; <pre id="test"> <script class="testbody" type="text/javascript"> -/** Test for Login Manager: 360493 (Cross-Site Forms + Password - Manager = Security Failure) **/ +/** + * Test for Login Manager: 360493 (Cross-Site Forms + Password + * Manager = Security Failure) + */ // This test is designed to make sure variations on the form's |action| // and |method| continue to work with the fix for 360493. diff --git a/toolkit/components/passwordmgr/test/mochitest/test_one_doorhanger_per_un_pw.html b/toolkit/components/passwordmgr/test/mochitest/test_one_doorhanger_per_un_pw.html @@ -26,8 +26,10 @@ <pre id="test"></pre> <script> - /** Test for Login Manager: Don't repeatedly prompt to save the - same username and password combination in the same document **/ + /** + * Test for Login Manager: Don't repeatedly prompt to save the + * same username and password combination in the same document + */ add_task(async function test_prompt_does_not_reappear() { let username = document.getElementById("ufield"); diff --git a/toolkit/components/passwordmgr/test/mochitest/test_passwords_in_type_password.html b/toolkit/components/passwordmgr/test/mochitest/test_passwords_in_type_password.html @@ -21,8 +21,10 @@ let DEFAULT_ORIGIN = window.location.origin; <pre id="test"> <script class="testbody" type="text/javascript"> -/** Test for Login Manager: 242956 (Stored password is inserted into a - readable text input on a second page) **/ +/** + * Test for Login Manager: 242956 (Stored password is inserted into a + * readable text input on a second page) + */ // Make sure that pwmgr only puts passwords into type=password <input>s. // Might as well test the converse, too (username in password field). diff --git a/toolkit/components/places/PlacesTransactions.sys.mjs b/toolkit/components/places/PlacesTransactions.sys.mjs @@ -1051,13 +1051,12 @@ function createItemsFromBookmarksTree(tree, restoring = false) { return createItem(tree, tree.parentGuid, tree.index); } -/** *************************************************************************** +/** * The Standard Places Transactions. * * See the documentation at the top of this file. The valid values for input * are also documented there. */ - var PT = PlacesTransactions; /** diff --git a/toolkit/components/thumbnails/PageThumbUtils.sys.mjs b/toolkit/components/thumbnails/PageThumbUtils.sys.mjs @@ -74,7 +74,7 @@ export var PageThumbUtils = { let windowScale = aWindow ? aWindow.devicePixelRatio : primaryScale; let scale = Math.max(primaryScale, windowScale); - /** * + /** * THESE VALUES ARE DEFINED IN newtab.css and hard coded. * If you change these values from the prefs, * ALSO CHANGE THEM IN newtab.css @@ -103,7 +103,7 @@ export var PageThumbUtils = { return [this._thumbnailWidth, this._thumbnailHeight]; }, - /** * + /** * Given a browser window, return the size of the content * minus the scroll bars. */ diff --git a/toolkit/components/utils/Sampling.sys.mjs b/toolkit/components/utils/Sampling.sys.mjs @@ -107,7 +107,8 @@ export var Sampling = { * @param {integer} count Number of buckets to check. * @param {integer} total Total number of buckets to group inputs into. * @promises {boolean} True if the given input is within the range of buckets - * we're checking. */ + * we're checking. + */ async bucketSample(input, start, count, total) { const inputHash = await Sampling.truncatedHash(input); const wrappedStart = start % total; diff --git a/toolkit/content/tests/chrome/xul_selectcontrol.js b/toolkit/content/tests/chrome/xul_selectcontrol.js @@ -301,7 +301,8 @@ function test_nsIDOMXULSelectControlElement_States( } } -/** test_nsIDOMXULSelectControlElement_UI +/** + * test_nsIDOMXULSelectControlElement_UI * * Test the UI aspects of an element which implements nsIDOMXULSelectControlElement * diff --git a/toolkit/content/viewZoomOverlay.js b/toolkit/content/viewZoomOverlay.js @@ -4,7 +4,8 @@ * 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/. */ -/** Document Zoom Management Code +/** + * Document Zoom Management Code * * To use this, you'll need to have a global gBrowser variable * or use the methods that accept a browser to be modified. diff --git a/toolkit/mozapps/update/tests/unit_update_binary/checkUpdaterSigSvc.js b/toolkit/mozapps/update/tests/unit_update_binary/checkUpdaterSigSvc.js @@ -5,7 +5,8 @@ /** * We skip authenticode cert checks from the service udpates * so that we can use updater-xpcshell with the wrong certs for testing. - * This tests that code path. */ + * This tests that code path. + */ function run_test() { if (!IS_AUTHENTICODE_CHECK_ENABLED) { diff --git a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/valid-jsdoc.mjs b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/valid-jsdoc.mjs @@ -15,6 +15,7 @@ export default { "jsdoc/check-tag-names": "error", "jsdoc/check-types": "error", "jsdoc/empty-tags": "error", + "jsdoc/multiline-blocks": "error", "jsdoc/no-bad-blocks": "error", "jsdoc/no-multi-asterisks": "error", "jsdoc/require-param-type": "error", diff --git a/tools/profiler/tests/browser/head.js b/tools/profiler/tests/browser/head.js @@ -69,7 +69,8 @@ async function waitSamplingAndStopProfilerAndGetThreads(contentPid) { return stopProfilerNowAndGetThreads(contentPid); } -/** This tries to find the service worker thread by targeting a very specific +/** + * This tries to find the service worker thread by targeting a very specific * UserTiming marker. Indeed we use performance.mark to add this marker from the * service worker's events. * Then from this thread we get its parent thread. Indeed the parent thread is