diff --git a/browser/base/content/test/general/browser_clipboard_pastefile.js b/browser/base/content/test/general/browser_clipboard_pastefile.js index fe87284f34d9..0badb48ea197 100644 --- a/browser/base/content/test/general/browser_clipboard_pastefile.js +++ b/browser/base/content/test/general/browser_clipboard_pastefile.js @@ -35,7 +35,7 @@ add_task(function*() { let output = yield ContentTask.spawn(browser, { }, function* (arg) { return content.document.getElementById("output").textContent; }); - is (output, "Passed", "Paste file"); + is(output, "Passed", "Paste file"); textbox.focus(); diff --git a/browser/base/content/test/general/browser_devedition.js b/browser/base/content/test/general/browser_devedition.js index 06ee42e7e849..2e6e2688cde4 100644 --- a/browser/base/content/test/general/browser_devedition.js +++ b/browser/base/content/test/general/browser_devedition.js @@ -25,56 +25,56 @@ registerCleanupFunction(() => { add_task(function* startTests() { Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark"); - info ("Setting the current theme to null"); + info("Setting the current theme to null"); LightweightThemeManager.currentTheme = null; - ok (!DevEdition.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied."); + ok(!DevEdition.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied."); - info ("Adding a lightweight theme."); + info("Adding a lightweight theme."); LightweightThemeManager.currentTheme = dummyLightweightTheme("preview0"); - ok (!DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been removed when a lightweight theme is applied."); + ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been removed when a lightweight theme is applied."); - info ("Applying the devedition lightweight theme."); + info("Applying the devedition lightweight theme."); let onAttributeAdded = waitForBrightTitlebarAttribute(); LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org"); - ok (DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied"); + ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied"); yield onAttributeAdded; - is (document.documentElement.getAttribute("brighttitlebarforeground"), "true", + is(document.documentElement.getAttribute("brighttitlebarforeground"), "true", "The brighttitlebarforeground attribute is set on the window."); - info ("Unapplying all themes."); + info("Unapplying all themes."); LightweightThemeManager.currentTheme = null; - ok (!DevEdition.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied."); + ok(!DevEdition.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied."); - info ("Applying the devedition lightweight theme."); + info("Applying the devedition lightweight theme."); onAttributeAdded = waitForBrightTitlebarAttribute(); LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org"); - ok (DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied"); + ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied"); yield onAttributeAdded; - ok (document.documentElement.hasAttribute("brighttitlebarforeground"), + ok(document.documentElement.hasAttribute("brighttitlebarforeground"), "The brighttitlebarforeground attribute is set on the window with dark devtools theme."); }); add_task(function* testDevtoolsTheme() { - info ("Checking stylesheet and :root attributes based on devtools theme."); + info("Checking stylesheet and :root attributes based on devtools theme."); Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light"); - is (document.documentElement.getAttribute("devtoolstheme"), "light", + is(document.documentElement.getAttribute("devtoolstheme"), "light", "The documentElement has an attribute based on devtools theme."); - ok (DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the light devtools theme."); - ok (!document.documentElement.hasAttribute("brighttitlebarforeground"), + ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the light devtools theme."); + ok(!document.documentElement.hasAttribute("brighttitlebarforeground"), "The brighttitlebarforeground attribute is not set on the window with light devtools theme."); Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark"); - is (document.documentElement.getAttribute("devtoolstheme"), "dark", + is(document.documentElement.getAttribute("devtoolstheme"), "dark", "The documentElement has an attribute based on devtools theme."); - ok (DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the dark devtools theme."); - is (document.documentElement.getAttribute("brighttitlebarforeground"), "true", + ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the dark devtools theme."); + is(document.documentElement.getAttribute("brighttitlebarforeground"), "true", "The brighttitlebarforeground attribute is set on the window with dark devtools theme."); Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "foobar"); - is (document.documentElement.getAttribute("devtoolstheme"), "light", + is(document.documentElement.getAttribute("devtoolstheme"), "light", "The documentElement has 'light' as a default for the devtoolstheme attribute"); - ok (DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the foobar devtools theme."); - ok (!document.documentElement.hasAttribute("brighttitlebarforeground"), + ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the foobar devtools theme."); + ok(!document.documentElement.hasAttribute("brighttitlebarforeground"), "The brighttitlebarforeground attribute is not set on the window with light devtools theme."); }); @@ -90,25 +90,25 @@ function dummyLightweightTheme(id) { } add_task(function* testLightweightThemePreview() { - info ("Setting devedition to current and the previewing others"); + info("Setting devedition to current and the previewing others"); LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org"); - ok (DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled."); + ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled."); LightweightThemeManager.previewTheme(dummyLightweightTheme("preview0")); - ok (!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a lightweight theme preview."); + ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a lightweight theme preview."); LightweightThemeManager.resetPreview(); LightweightThemeManager.previewTheme(dummyLightweightTheme("preview1")); - ok (!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a second lightweight theme preview."); + ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a second lightweight theme preview."); LightweightThemeManager.resetPreview(); - ok (DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled again after resetting the preview."); + ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled again after resetting the preview."); LightweightThemeManager.currentTheme = null; - ok (!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is gone after removing the current theme."); + ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is gone after removing the current theme."); - info ("Previewing the devedition theme"); + info("Previewing the devedition theme"); LightweightThemeManager.previewTheme(LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org")); - ok (DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled."); + ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled."); LightweightThemeManager.previewTheme(dummyLightweightTheme("preview2")); LightweightThemeManager.resetPreview(); - ok (!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is now disabled after resetting the preview."); + ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is now disabled after resetting the preview."); }); // Use a mutation observer to wait for the brighttitlebarforeground diff --git a/browser/base/content/test/general/browser_keywordBookmarklets.js b/browser/base/content/test/general/browser_keywordBookmarklets.js index 5e94733fef9f..52089c8fef8d 100644 --- a/browser/base/content/test/general/browser_keywordBookmarklets.js +++ b/browser/base/content/test/general/browser_keywordBookmarklets.js @@ -5,7 +5,7 @@ add_task(function* test_keyword_bookmarklet() { title: "bookmarklet", url: "javascript:'1';" }); let tab = gBrowser.selectedTab = gBrowser.addTab(); - registerCleanupFunction (function* () { + registerCleanupFunction(function* () { gBrowser.removeTab(tab); yield PlacesUtils.bookmarks.remove(bm); }); diff --git a/browser/base/content/test/general/browser_save_link-perwindowpb.js b/browser/base/content/test/general/browser_save_link-perwindowpb.js index 5c99ba32ae76..3a92c31b6029 100644 --- a/browser/base/content/test/general/browser_save_link-perwindowpb.js +++ b/browser/base/content/test/general/browser_save_link-perwindowpb.js @@ -39,7 +39,7 @@ function triggerSave(aWindow, aCallback) { info("showCallback"); fileName = fp.defaultString; info("fileName: " + fileName); - destFile.append (fileName); + destFile.append(fileName); MockFilePicker.returnFiles = [destFile]; MockFilePicker.filterIndex = 1; // kSaveAsType_URL info("done showCallback"); diff --git a/browser/base/content/test/general/browser_save_link_when_window_navigates.js b/browser/base/content/test/general/browser_save_link_when_window_navigates.js index 2fd10b00e287..e3812dfabfd8 100644 --- a/browser/base/content/test/general/browser_save_link_when_window_navigates.js +++ b/browser/base/content/test/general/browser_save_link_when_window_navigates.js @@ -43,7 +43,7 @@ function triggerSave(aWindow, aCallback) { info("showCallback"); fileName = fp.defaultString; info("fileName: " + fileName); - destFile.append (fileName); + destFile.append(fileName); MockFilePicker.returnFiles = [destFile]; MockFilePicker.filterIndex = 1; // kSaveAsType_URL info("done showCallback"); diff --git a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js index e7ed5fa34bdc..14be43e8d457 100644 --- a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js +++ b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js @@ -60,7 +60,7 @@ function promiseImageDownloaded() { MockFilePicker.displayDirectory = destDir; MockFilePicker.showCallback = function(fp) { fileName = fp.defaultString; - destFile.append (fileName); + destFile.append(fileName); MockFilePicker.returnFiles = [destFile]; MockFilePicker.filterIndex = 1; // kSaveAsType_URL }; diff --git a/browser/base/content/test/general/browser_trackingUI_4.js b/browser/base/content/test/general/browser_trackingUI_4.js index 93a06913e55f..234b790acb44 100644 --- a/browser/base/content/test/general/browser_trackingUI_4.js +++ b/browser/base/content/test/general/browser_trackingUI_4.js @@ -30,7 +30,7 @@ function waitForSecurityChange(numChanges = 1) { let listener = { onSecurityChange: function() { n = n + 1; - info ("Received onSecurityChange event " + n + " of " + numChanges); + info("Received onSecurityChange event " + n + " of " + numChanges); if (n >= numChanges) { tabbrowser.removeProgressListener(listener); resolve(); diff --git a/browser/base/content/test/general/browser_trackingUI_6.js b/browser/base/content/test/general/browser_trackingUI_6.js index be91bc4a044e..4f64a5a59138 100644 --- a/browser/base/content/test/general/browser_trackingUI_6.js +++ b/browser/base/content/test/general/browser_trackingUI_6.js @@ -6,7 +6,7 @@ function waitForSecurityChange(numChanges = 1) { let listener = { onSecurityChange: function() { n = n + 1; - info ("Received onSecurityChange event " + n + " of " + numChanges); + info("Received onSecurityChange event " + n + " of " + numChanges); if (n >= numChanges) { gBrowser.removeProgressListener(listener); resolve(); diff --git a/browser/components/migration/tests/unit/head_migration.js b/browser/components/migration/tests/unit/head_migration.js index 7eebc8db8958..e4903f86d477 100644 --- a/browser/components/migration/tests/unit/head_migration.js +++ b/browser/components/migration/tests/unit/head_migration.js @@ -30,7 +30,7 @@ function promiseMigration(migrator, resourceType, aProfile = null) { let availableSources = migrator.getMigrateData(aProfile, false); Assert.ok((availableSources & resourceType) > 0, "Resource supported by migrator"); - return new Promise (resolve => { + return new Promise(resolve => { Services.obs.addObserver(function onMigrationEnded() { Services.obs.removeObserver(onMigrationEnded, "Migration:Ended"); resolve(); diff --git a/browser/components/places/PlacesUIUtils.jsm b/browser/components/places/PlacesUIUtils.jsm index 0d1051177308..110c5fdf6790 100644 --- a/browser/components/places/PlacesUIUtils.jsm +++ b/browser/components/places/PlacesUIUtils.jsm @@ -590,7 +590,7 @@ this.PlacesUIUtils = { if ("itemGuid" in aData) { if (!this.PLACES_FLAVORS.includes(aData.type)) - throw new Error (`itemGuid unexpectedly set on ${aData.type} data`); + throw new Error(`itemGuid unexpectedly set on ${aData.type} data`); let info = { guid: aData.itemGuid , newParentGuid: aNewParentGuid diff --git a/browser/components/places/tests/browser/browser_416459_cut.js b/browser/components/places/tests/browser/browser_416459_cut.js index 6f3f8cdd5821..586c8d12174e 100644 --- a/browser/components/places/tests/browser/browser_416459_cut.js +++ b/browser/components/places/tests/browser/browser_416459_cut.js @@ -68,7 +68,7 @@ var selectBookmarksIn = Task.async(function* (organizer, bookmarks, aLeftPaneQue let ids = []; for (let {guid} of bookmarks) { let bookmark = yield PlacesUtils.bookmarks.fetch(guid); - is (bookmark.parentGuid, PlacesOrganizer._places.selectedNode.targetFolderGuid, + is(bookmark.parentGuid, PlacesOrganizer._places.selectedNode.targetFolderGuid, "Bookmark has the right parent"); ids.push(yield PlacesUtils.promiseItemId(bookmark.guid)); } diff --git a/browser/modules/test/unit/social/test_SocialService.js b/browser/modules/test/unit/social/test_SocialService.js index e6f354fed338..1cb618478711 100644 --- a/browser/modules/test/unit/social/test_SocialService.js +++ b/browser/modules/test/unit/social/test_SocialService.js @@ -34,7 +34,7 @@ function run_test() { runner.appendIterator(testGetProviderList(manifests, next)); runner.appendIterator(testAddRemoveProvider(manifests, next)); runner.appendIterator(testIsSameOrigin(manifests, next)); - runner.appendIterator(testResolveUri (manifests, next)); + runner.appendIterator(testResolveUri(manifests, next)); runner.appendIterator(testOrderedProviders(manifests, next)); runner.appendIterator(testRemoveProviders(manifests, next)); runner.next(); diff --git a/toolkit/.eslintrc.js b/toolkit/.eslintrc.js index 5e90158c06b3..c3bafc08d314 100644 --- a/toolkit/.eslintrc.js +++ b/toolkit/.eslintrc.js @@ -36,6 +36,9 @@ module.exports = { // Always require a trailing EOL "eol-last": "error", + // No spaces between function name and parentheses + "func-call-spacing": "error", + // Require function* name() // "generator-star-spacing": ["error", {"before": false, "after": true}], @@ -138,9 +141,6 @@ module.exports = { // No declaring variables that hide things like arguments "no-shadow-restricted-names": "error", - // No spaces between function name and parentheses - // "no-spaced-func": "error", - // No trailing whitespace "no-trailing-spaces": "error", diff --git a/toolkit/components/crashes/CrashManagerTest.jsm b/toolkit/components/crashes/CrashManagerTest.jsm index 9d47c96932a3..24edba7798a9 100644 --- a/toolkit/components/crashes/CrashManagerTest.jsm +++ b/toolkit/components/crashes/CrashManagerTest.jsm @@ -100,7 +100,7 @@ this.TestingCrashManager.prototype = { return Task.spawn(function* () { let mode = OS.Constants.libc.S_IRUSR | OS.Constants.libc.S_IWUSR; yield OS.File.open(path, {create: true}, {unixMode: mode}); - dump ("Create ignored dump file: " + path + "\n"); + dump("Create ignored dump file: " + path + "\n"); }); }, diff --git a/toolkit/components/places/tests/unit/test_preventive_maintenance_checkAndFixDatabase.js b/toolkit/components/places/tests/unit/test_preventive_maintenance_checkAndFixDatabase.js index a8acb4be058c..9167654989b6 100644 --- a/toolkit/components/places/tests/unit/test_preventive_maintenance_checkAndFixDatabase.js +++ b/toolkit/components/places/tests/unit/test_preventive_maintenance_checkAndFixDatabase.js @@ -20,7 +20,7 @@ function run_test() { let infos = []; aLog.forEach(function (aMsg) { - print (aMsg); + print(aMsg); switch (aMsg.substr(0, 1)) { case "+": positives.push(aMsg); diff --git a/toolkit/components/places/tests/unit/test_preventive_maintenance_runTasks.js b/toolkit/components/places/tests/unit/test_preventive_maintenance_runTasks.js index ebe308f03c1c..f07da114ee7e 100644 --- a/toolkit/components/places/tests/unit/test_preventive_maintenance_runTasks.js +++ b/toolkit/components/places/tests/unit/test_preventive_maintenance_runTasks.js @@ -18,7 +18,7 @@ function run_test() { let infos = []; aLog.forEach(function (aMsg) { - print (aMsg); + print(aMsg); switch (aMsg.substr(0, 1)) { case "+": positives.push(aMsg); diff --git a/toolkit/components/prompts/test/bug619644_inner.html b/toolkit/components/prompts/test/bug619644_inner.html index f929c56499ed..cecfa78bad25 100644 --- a/toolkit/components/prompts/test/bug619644_inner.html +++ b/toolkit/components/prompts/test/bug619644_inner.html @@ -1,7 +1,7 @@

Original content

diff --git a/toolkit/components/telemetry/TelemetrySession.jsm b/toolkit/components/telemetry/TelemetrySession.jsm index d1ee833aafee..cf070eaebacd 100644 --- a/toolkit/components/telemetry/TelemetrySession.jsm +++ b/toolkit/components/telemetry/TelemetrySession.jsm @@ -1729,7 +1729,7 @@ var Impl = { addEnvironment: true, }; p.push(TelemetryController.submitExternalPing(getPingType(payload), payload, options) - .catch (e => this._log.error("saveShutdownPings - failed to submit saved-session ping", e))); + .catch(e => this._log.error("saveShutdownPings - failed to submit saved-session ping", e))); } // Wait on pings to be saved. diff --git a/toolkit/components/tooltiptext/tests/browser_bug581947.js b/toolkit/components/tooltiptext/tests/browser_bug581947.js index 9aff4b190162..c1e8b94b9588 100644 --- a/toolkit/components/tooltiptext/tests/browser_bug581947.js +++ b/toolkit/components/tooltiptext/tests/browser_bug581947.js @@ -23,12 +23,12 @@ function check(aBrowser, aElementName, aBarred, aType) { } e.setAttribute('title', ''); - ok (!tttp.getNodeText(e, {}, {}), + ok(!tttp.getNodeText(e, {}, {}), "No tooltip should be shown if the title attribute is set"); e.removeAttribute('title'); contentElement.setAttribute('novalidate', ''); - ok (!tttp.getNodeText(e, {}, {}), + ok(!tttp.getNodeText(e, {}, {}), "No tooltip should be shown if the novalidate attribute is set on the form owner"); contentElement.removeAttribute('novalidate'); diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js b/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js index d44ad4a2d43b..76c45e96067e 100644 --- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js +++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js @@ -1221,7 +1221,7 @@ WidgetStack.prototype = { this._widgetState[wid] = state; - log ("(New widget: " + wid + (state.viewport ? " [viewport]" : "") + " at: " + state.rect + ")"); + log("(New widget: " + wid + (state.viewport ? " [viewport]" : "") + " at: " + state.rect + ")"); }, _removeWidget: function (w) { diff --git a/toolkit/content/widgets/colorpicker.xml b/toolkit/content/widgets/colorpicker.xml index 30f8a63540e6..0ed4a4f10074 100644 --- a/toolkit/content/widgets/colorpicker.xml +++ b/toolkit/content/widgets/colorpicker.xml @@ -230,7 +230,7 @@ event.initEvent(aEventName, true, true); var cancel = !aTarget.dispatchEvent(event); if (aTarget.hasAttribute("on" + aEventName)) { - var fn = new Function ("event", aTarget.getAttribute("on" + aEventName)); + var fn = new Function("event", aTarget.getAttribute("on" + aEventName)); var rv = fn.call(aTarget, event); if (rv == false) cancel = true; @@ -486,7 +486,7 @@ event.initEvent(aEventName, true, true); var cancel = !aTarget.dispatchEvent(event); if (aTarget.hasAttribute("on" + aEventName)) { - var fn = new Function ("event", aTarget.getAttribute("on" + aEventName)); + var fn = new Function("event", aTarget.getAttribute("on" + aEventName)); var rv = fn.call(aTarget, event); if (rv == false) cancel = true; diff --git a/toolkit/content/widgets/preferences.xml b/toolkit/content/widgets/preferences.xml index 9fb2ac7ea1f7..66b972a90667 100644 --- a/toolkit/content/widgets/preferences.xml +++ b/toolkit/content/widgets/preferences.xml @@ -437,8 +437,8 @@ try { var event = document.createEvent("Events"); event.initEvent("syncfrompreference", true, true); - var f = new Function ("event", - aElement.getAttribute("onsyncfrompreference")); + var f = new Function("event", + aElement.getAttribute("onsyncfrompreference")); rv = f.call(aElement, event); } catch (e) { @@ -492,8 +492,8 @@ try { var event = document.createEvent("Events"); event.initEvent("synctopreference", true, true); - var f = new Function ("event", - aElement.getAttribute("onsynctopreference")); + var f = new Function("event", + aElement.getAttribute("onsynctopreference")); var rv = f.call(aElement, event); if (rv !== undefined) return rv; @@ -644,7 +644,7 @@ acceptButton.disabled = true; } else { // morph the Cancel button into the Close button - cancelButton.setAttribute ("icon", "close"); + cancelButton.setAttribute("icon", "close"); cancelButton.label = docElt.getAttribute("closebuttonlabel"); cancelButton.accesskey = docElt.getAttribute("closebuttonaccesskey"); } @@ -797,7 +797,7 @@ event.initEvent(aEventName, true, true); var cancel = !aTarget.dispatchEvent(event); if (aTarget.hasAttribute("on" + aEventName)) { - var fn = new Function ("event", aTarget.getAttribute("on" + aEventName)); + var fn = new Function("event", aTarget.getAttribute("on" + aEventName)); var rv = fn.call(aTarget, event); if (rv == false) cancel = true; diff --git a/toolkit/modules/GMPInstallManager.jsm b/toolkit/modules/GMPInstallManager.jsm index 993a68761181..69c0c14d9074 100644 --- a/toolkit/modules/GMPInstallManager.jsm +++ b/toolkit/modules/GMPInstallManager.jsm @@ -325,7 +325,7 @@ function GMPAddon(addon) { for (let name of Object.keys(addon)) { this[name] = addon[name]; } - log.info ("Created new addon: " + this.toString()); + log.info("Created new addon: " + this.toString()); } GMPAddon.prototype = { diff --git a/toolkit/modules/Sntp.jsm b/toolkit/modules/Sntp.jsm index 6041c5f15c1b..5cb769c5dac1 100644 --- a/toolkit/modules/Sntp.jsm +++ b/toolkit/modules/Sntp.jsm @@ -129,7 +129,7 @@ Sntp.prototype = { _retry: function _retry() { this._retryCount++; if (this._retryCount > this._maxRetryCount) { - debug ("stop retrying SNTP"); + debug("stop retrying SNTP"); // Clear so we can start with clean status next time we have network. this._retryCount = 0; this._retryPeriodInMS = 0; @@ -176,7 +176,7 @@ Sntp.prototype = { onStopRequest: function onStopRequest(request, context, status) { if (!Components.isSuccessCode(status)) { - debug ("Connection failed"); + debug("Connection failed"); this._requesting = false; this._retry(); } @@ -191,7 +191,7 @@ Sntp.prototype = { ((s - OFFSET_1900_TO_1970) * 1000) + ((f * 1000) / 0x100000000) ); } - debug ("Data available: " + count + " bytes"); + debug("Data available: " + count + " bytes"); try { let binaryInputStream = Cc["@mozilla.org/binaryinputstream;1"] @@ -213,7 +213,7 @@ Sntp.prototype = { transmitTimeInMS, respondTimeInMS); this._requesting = false; } catch (e) { - debug ("SNTPListener Error: " + e.message); + debug("SNTPListener Error: " + e.message); this._requesting = false; this._retry(); } @@ -227,10 +227,10 @@ Sntp.prototype = { try { let data = GetRequest(); let bytes_write = stream.write(data, data.length); - debug ("SNTP: sent " + bytes_write + " bytes"); + debug("SNTP: sent " + bytes_write + " bytes"); stream.close(); } catch (e) { - debug ("SNTPRequester Error: " + e.message); + debug("SNTPRequester Error: " + e.message); this._requesting = false; this._retry(); } @@ -252,7 +252,7 @@ Sntp.prototype = { this._updateTimer.cancel(); } - debug ("Making request"); + debug("Making request"); this._requesting = true; let currentThread = Cc["@mozilla.org/thread-manager;1"] diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index d0b5399aa1d2..640dd6a64126 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -4191,7 +4191,7 @@ this.XPIProvider = { * A callback to pass the Addon to */ getAddonByID: function(aId, aCallback) { - XPIDatabase.getVisibleAddonForID (aId, function(aAddon) { + XPIDatabase.getVisibleAddonForID(aId, function(aAddon) { aCallback(aAddon ? aAddon.wrapper : null); }); }, diff --git a/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js b/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js index e7c6722120ea..91e728f736ab 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js +++ b/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js @@ -278,7 +278,7 @@ add_task(function* cancel_during_repopulate() { let getInstalls = Promise.defer(); AddonManager.getAllInstalls(getInstalls.resolve); let installs = yield getInstalls.promise; - is (installs.length, 0, "There should be no active installs after background installs are done"); + is(installs.length, 0, "There should be no active installs after background installs are done"); // addon8 should have updated in the background, // addon9 was listed as previously disabled so it should not have updated @@ -347,7 +347,7 @@ add_task(function* cancel_during_findUpdates() { let getInstalls = Promise.defer(); AddonManager.getAllInstalls(getInstalls.resolve); let installs = yield getInstalls.promise; - is (installs.length, 0, "There should be no active installs after the dialog is cancelled 2"); + is(installs.length, 0, "There should be no active installs after the dialog is cancelled 2"); info("findUpdates done"); yield promise_uninstall_test_addons(); diff --git a/toolkit/mozapps/preferences/changemp.js b/toolkit/mozapps/preferences/changemp.js index 486f32a4ca8f..ea57a6cc7ca2 100644 --- a/toolkit/mozapps/preferences/changemp.js +++ b/toolkit/mozapps/preferences/changemp.js @@ -172,19 +172,19 @@ function setPasswordStrength() // use of numbers in the password - var numnumeric = pw.replace (/[0-9]/g, ""); + var numnumeric = pw.replace(/[0-9]/g, ""); var numeric = (pw.length - numnumeric.length); if (numeric > 3) numeric = 3; // use of symbols in the password - var symbols = pw.replace (/\W/g, ""); + var symbols = pw.replace(/\W/g, ""); var numsymbols = (pw.length - symbols.length); if (numsymbols > 3) numsymbols = 3; // use of uppercase in the password - var numupper = pw.replace (/[A-Z]/g, ""); + var numupper = pw.replace(/[A-Z]/g, ""); var upper = (pw.length - numupper.length); if (upper > 3) upper = 3;