Bug 1248855 - [webext] Add "object-curly-spacing" ESLint rule and auto-fix errors. r=billm
authorKris Maglione <maglione.k@gmail.com>
Tue, 16 Feb 2016 20:10:00 -0800
changeset 284535 db7c5f35321fae1b076a088553ec92a9b89d883b
parent 284534 4b710f2e4e64c30525d667492d6de6e499d3213b
child 284536 c007ec81b75ae1c51da2c2d2bab21180290fab6b
child 284661 80398286fc25639999d8750a27526e63813f453c
push id71993
push usercbook@mozilla.com
push dateWed, 17 Feb 2016 11:16:29 +0000
treeherdermozilla-inbound@60f020c84b23 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1248855
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1248855 - [webext] Add "object-curly-spacing" ESLint rule and auto-fix errors. r=billm MozReview-Commit-ID: BAZ2rRl7eSM
browser/components/extensions/ext-bookmarks.js
browser/components/extensions/ext-browserAction.js
browser/components/extensions/ext-contextMenus.js
browser/components/extensions/ext-desktop-runtime.js
browser/components/extensions/ext-pageAction.js
browser/components/extensions/ext-tabs.js
browser/components/extensions/ext-utils.js
browser/components/extensions/test/browser/browser_ext_browserAction_context.js
browser/components/extensions/test/browser/browser_ext_browserAction_pageAction_icon.js
browser/components/extensions/test/browser/browser_ext_browserAction_popup.js
browser/components/extensions/test/browser/browser_ext_contentscript_connect.js
browser/components/extensions/test/browser/browser_ext_contextMenus.js
browser/components/extensions/test/browser/browser_ext_lastError.js
browser/components/extensions/test/browser/browser_ext_pageAction_context.js
browser/components/extensions/test/browser/browser_ext_pageAction_popup.js
browser/components/extensions/test/browser/browser_ext_popup_api_injection.js
browser/components/extensions/test/browser/browser_ext_runtime_setUninstallURL.js
browser/components/extensions/test/browser/browser_ext_tab_runtimeConnect.js
browser/components/extensions/test/browser/browser_ext_tabs_audio.js
browser/components/extensions/test/browser/browser_ext_tabs_captureVisibleTab.js
browser/components/extensions/test/browser/browser_ext_tabs_create.js
browser/components/extensions/test/browser/browser_ext_tabs_executeScript_bad.js
browser/components/extensions/test/browser/browser_ext_tabs_executeScript_good.js
browser/components/extensions/test/browser/browser_ext_tabs_getCurrent.js
browser/components/extensions/test/browser/browser_ext_tabs_insertCSS.js
browser/components/extensions/test/browser/browser_ext_tabs_move.js
browser/components/extensions/test/browser/browser_ext_tabs_move_window.js
browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js
browser/components/extensions/test/browser/browser_ext_tabs_sendMessage.js
browser/components/extensions/test/browser/browser_ext_webNavigation_getFrames.js
toolkit/components/extensions/.eslintrc
toolkit/components/extensions/Extension.jsm
toolkit/components/extensions/ExtensionContent.jsm
toolkit/components/extensions/ExtensionManagement.jsm
toolkit/components/extensions/MessageChannel.jsm
toolkit/components/extensions/ext-alarms.js
toolkit/components/extensions/ext-backgroundPage.js
toolkit/components/extensions/ext-cookies.js
toolkit/components/extensions/ext-downloads.js
toolkit/components/extensions/ext-notifications.js
toolkit/components/extensions/ext-runtime.js
toolkit/components/extensions/ext-storage.js
toolkit/components/extensions/ext-webNavigation.js
toolkit/components/extensions/ext-webRequest.js
toolkit/components/extensions/test/mochitest/file_ext_test_api_injection.js
toolkit/components/extensions/test/mochitest/test_ext_background_runtime_connect_params.html
toolkit/components/extensions/test/mochitest/test_ext_contentscript_create_iframe.html
toolkit/components/extensions/test/mochitest/test_ext_cookies_permissions.html
toolkit/components/extensions/test/mochitest/test_ext_i18n.html
toolkit/components/extensions/test/xpcshell/head.js
toolkit/components/extensions/test/xpcshell/test_ext_schemas.js
toolkit/components/extensions/test/xpcshell/test_locale_converter.js
toolkit/modules/addons/MatchPattern.jsm
toolkit/modules/addons/WebRequest.jsm
--- a/browser/components/extensions/ext-bookmarks.js
+++ b/browser/components/extensions/ext-bookmarks.js
@@ -1,13 +1,13 @@
 /* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
-const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
+const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/PlacesUtils.jsm");
 var Bookmarks = PlacesUtils.bookmarks;
 
 Cu.import("resource://gre/modules/ExtensionUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
                                   "resource://gre/modules/Task.jsm");
@@ -136,17 +136,17 @@ extensions.registerSchemaAPI("bookmarks"
           info.parentGuid = bookmark.parentId;
         } else {
           info.parentGuid = Bookmarks.unfiledGuid;
         }
 
         try {
           return Bookmarks.insert(info).then(convert);
         } catch (e) {
-          return Promise.reject({ message: `Invalid bookmark: ${JSON.stringify(info)}` });
+          return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`});
         }
       },
 
       move: function(id, destination) {
         let info = {
           guid: id,
         };
 
@@ -155,17 +155,17 @@ extensions.registerSchemaAPI("bookmarks"
         }
         if (destination.index !== null) {
           info.index = destination.index;
         }
 
         try {
           return Bookmarks.update(info).then(convert);
         } catch (e) {
-          return Promise.reject({ message: `Invalid bookmark: ${JSON.stringify(info)}` });
+          return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`});
         }
       },
 
       update: function(id, changes) {
         let info = {
           guid: id,
         };
 
@@ -174,28 +174,28 @@ extensions.registerSchemaAPI("bookmarks"
         }
         if (changes.url !== null) {
           info.url = changes.url;
         }
 
         try {
           return Bookmarks.update(info).then(convert);
         } catch (e) {
-          return Promise.reject({ message: `Invalid bookmark: ${JSON.stringify(info)}` });
+          return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`});
         }
       },
 
       remove: function(id) {
         let info = {
           guid: id,
         };
 
         // The API doesn't give you the old bookmark at the moment
         try {
           return Bookmarks.remove(info).then(result => {});
         } catch (e) {
-          return Promise.reject({ message: `Invalid bookmark: ${JSON.stringify(info)}` });
+          return Promise.reject({message: `Invalid bookmark: ${JSON.stringify(info)}`});
         }
       },
     },
   };
 });
 
--- a/browser/components/extensions/ext-browserAction.js
+++ b/browser/components/extensions/ext-browserAction.js
@@ -39,17 +39,17 @@ function BrowserAction(options, extensio
     popup = extension.baseURI.resolve(popup);
   }
 
   this.defaults = {
     enabled: true,
     title: title || extension.name,
     badgeText: "",
     badgeBackgroundColor: null,
-    icon: IconDetails.normalize({ path: options.default_icon }, extension,
+    icon: IconDetails.normalize({path: options.default_icon}, extension,
                                 null, true),
     popup: popup,
   };
 
   this.tabContext = new TabContext(tab => Object.create(this.defaults),
                                    extension);
 
   EventEmitter.decorate(this);
--- a/browser/components/extensions/ext-contextMenus.js
+++ b/browser/components/extensions/ext-contextMenus.js
@@ -305,17 +305,17 @@ MenuItem.prototype = {
     this.children.splice(idx, 1);
     child.parent = null;
   },
 
   get root() {
     let extension = this.extension;
     if (!rootItems.has(extension)) {
       let root = new MenuItem(extension, this.context,
-                              { title: extension.name },
+                              {title: extension.name},
                               /* isRoot = */ true);
       rootItems.set(extension, root);
     }
 
     return rootItems.get(extension);
   },
 
   remove() {
--- a/browser/components/extensions/ext-desktop-runtime.js
+++ b/browser/components/extensions/ext-desktop-runtime.js
@@ -1,10 +1,10 @@
 "use strict";
 
 /* eslint-disable mozilla/balanced-listeners */
 extensions.on("uninstall", (msg, extension) => {
   if (extension.uninstallURL) {
     let browser = Services.wm.getMostRecentWindow("navigator:browser").gBrowser;
-    browser.addTab(extension.uninstallURL, { relatedToCurrent: true });
+    browser.addTab(extension.uninstallURL, {relatedToCurrent: true});
   }
 });
 
--- a/browser/components/extensions/ext-pageAction.js
+++ b/browser/components/extensions/ext-pageAction.js
@@ -23,17 +23,17 @@ function PageAction(options, extension) 
   let popup = extension.localize(options.default_popup || "");
   if (popup) {
     popup = extension.baseURI.resolve(popup);
   }
 
   this.defaults = {
     show: false,
     title: title || extension.name,
-    icon: IconDetails.normalize({ path: options.default_icon }, extension,
+    icon: IconDetails.normalize({path: options.default_icon}, extension,
                                 null, true),
     popup: popup && extension.baseURI.resolve(popup),
   };
 
   this.tabContext = new TabContext(tab => Object.create(this.defaults),
                                    extension);
 
   this.tabContext.on("location-change", this.handleLocationChange.bind(this)); // eslint-disable-line mozilla/balanced-listeners
--- a/browser/components/extensions/ext-tabs.js
+++ b/browser/components/extensions/ext-tabs.js
@@ -460,17 +460,17 @@ extensions.registerSchemaAPI("tabs", nul
             }
           }
         }
         return Promise.resolve(result);
       },
 
       captureVisibleTab: function(windowId, options) {
         if (!extension.hasPermission("<all_urls>")) {
-          return Promise.reject({ message: "The <all_urls> permission is required to use the captureVisibleTab API" });
+          return Promise.reject({message: "The <all_urls> permission is required to use the captureVisibleTab API"});
         }
 
         let window = windowId == null ?
           WindowManager.topWindow :
           WindowManager.getWindow(windowId);
 
         let browser = window.gBrowser.selectedBrowser;
         let recipient = {
@@ -519,31 +519,31 @@ extensions.registerSchemaAPI("tabs", nul
         }
 
         if (details.code !== null) {
           options[kind + "Code"] = details.code;
         }
         if (details.file !== null) {
           let url = context.uri.resolve(details.file);
           if (!extension.isExtensionURL(url)) {
-            return Promise.reject({ message: "Files to be injected must be within the extension" });
+            return Promise.reject({message: "Files to be injected must be within the extension"});
           }
           options[kind].push(url);
         }
         if (details.allFrames) {
           options.all_frames = details.allFrames;
         }
         if (details.matchAboutBlank) {
           options.match_about_blank = details.matchAboutBlank;
         }
         if (details.runAt !== null) {
           options.run_at = details.runAt;
         }
 
-        return context.sendMessage(mm, "Extension:Execute", { options }, recipient);
+        return context.sendMessage(mm, "Extension:Execute", {options}, recipient);
       },
 
       executeScript: function(tabId, details) {
         return self.tabs._execute(tabId, details, "js");
       },
 
       insertCSS: function(tabId, details) {
         return self.tabs._execute(tabId, details, "css");
--- a/browser/components/extensions/ext-utils.js
+++ b/browser/components/extensions/ext-utils.js
@@ -230,17 +230,17 @@ class BasePopup {
       // We can't finish setting up the browser until the binding has fully
       // initialized. Waiting for the first load event guarantees that it has.
       let loadListener = event => {
         this.browser.removeEventListener("load", loadListener, true);
         resolve();
       };
       this.browser.addEventListener("load", loadListener, true);
     }).then(() => {
-      let { contentWindow } = this.browser;
+      let {contentWindow} = this.browser;
 
       contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                    .getInterface(Ci.nsIDOMWindowUtils)
                    .allowScriptsToClose();
 
       this.context = new ExtensionPage(this.extension, {
         type: "popup",
         contentWindow,
@@ -418,17 +418,17 @@ ExtensionTabManager.prototype = {
 
   hasTabPermission(tab) {
     return this.extension.hasPermission("tabs") || this.hasActiveTabPermission(tab);
   },
 
   convert(tab) {
     let window = tab.ownerDocument.defaultView;
 
-    let mutedInfo = { muted: tab.muted };
+    let mutedInfo = {muted: tab.muted};
     if (tab.muteReason === null) {
       mutedInfo.reason = "user";
     } else if (tab.muteReason) {
       mutedInfo.reason = "extension";
       mutedInfo.extensionId = tab.muteReason;
     }
 
     let result = {
--- a/browser/components/extensions/test/browser/browser_ext_browserAction_context.js
+++ b/browser/components/extensions/test/browser/browser_ext_browserAction_context.js
@@ -8,20 +8,20 @@ function* runTests(options) {
     // promise that resolves to an object containing them.
     function getDetails(tabId) {
       return Promise.all([
         browser.browserAction.getTitle({tabId}),
         browser.browserAction.getPopup({tabId}),
         browser.browserAction.getBadgeText({tabId}),
         browser.browserAction.getBadgeBackgroundColor({tabId})]
       ).then(details => {
-        return Promise.resolve({ title: details[0],
-                                 popup: details[1],
-                                 badge: details[2],
-                                 badgeBackgroundColor: details[3] });
+        return Promise.resolve({title: details[0],
+                                popup: details[1],
+                                badge: details[2],
+                                badgeBackgroundColor: details[3]});
       });
     }
 
     function checkDetails(expecting, tabId) {
       return getDetails(tabId).then(details => {
         browser.test.assertEq(expecting.title, details.title,
                               "expected value from getTitle");
 
@@ -48,17 +48,17 @@ function* runTests(options) {
     // and passes control back to the outer test scope.
     function nextTest() {
       let test = tests.shift();
 
       test(expecting => {
         // Check that the API returns the expected values, and then
         // run the next test.
         new Promise(resolve => {
-          return browser.tabs.query({ active: true, currentWindow: true }, resolve);
+          return browser.tabs.query({active: true, currentWindow: true}, resolve);
         }).then(tabs => {
           return checkDetails(expecting, tabs[0].id);
         }).then(() => {
           // Check that the actual icon has the expected values, then
           // run the next test.
           browser.test.sendMessage("nextTest", expecting, tests.length);
         });
       });
@@ -67,17 +67,17 @@ function* runTests(options) {
     browser.test.onMessage.addListener((msg) => {
       if (msg != "runNextTest") {
         browser.test.fail("Expecting 'runNextTest' message");
       }
 
       nextTest();
     });
 
-    browser.tabs.query({ active: true, currentWindow: true }, resultTabs => {
+    browser.tabs.query({active: true, currentWindow: true}, resultTabs => {
       tabs[0] = resultTabs[0].id;
 
       nextTest();
     });
   }
 
   let extension = ExtensionTestUtils.loadExtension({
     manifest: options.manifest,
@@ -143,82 +143,82 @@ add_task(function* testTabSwitchContext(
         "default_popup": "default.html",
         "default_title": "Default Title",
       },
       "permissions": ["tabs"],
     },
 
     getTests(tabs, expectDefaults) {
       let details = [
-        { "icon": browser.runtime.getURL("default.png"),
-          "popup": browser.runtime.getURL("default.html"),
-          "title": "Default Title",
-          "badge": "",
-          "badgeBackgroundColor": null },
-        { "icon": browser.runtime.getURL("1.png"),
-          "popup": browser.runtime.getURL("default.html"),
-          "title": "Default Title",
-          "badge": "",
-          "badgeBackgroundColor": null },
-        { "icon": browser.runtime.getURL("2.png"),
-          "popup": browser.runtime.getURL("2.html"),
-          "title": "Title 2",
-          "badge": "2",
-          "badgeBackgroundColor": [0xff, 0, 0, 0xff],
-          "disabled": true },
-        { "icon": browser.runtime.getURL("1.png"),
-          "popup": browser.runtime.getURL("default-2.html"),
-          "title": "Default Title 2",
-          "badge": "d2",
-          "badgeBackgroundColor": [0, 0xff, 0, 0xff],
-          "disabled": true },
-        { "icon": browser.runtime.getURL("1.png"),
-          "popup": browser.runtime.getURL("default-2.html"),
-          "title": "Default Title 2",
-          "badge": "d2",
-          "badgeBackgroundColor": [0, 0xff, 0, 0xff],
-          "disabled": false },
-        { "icon": browser.runtime.getURL("default-2.png"),
-          "popup": browser.runtime.getURL("default-2.html"),
-          "title": "Default Title 2",
-          "badge": "d2",
-          "badgeBackgroundColor": [0, 0xff, 0, 0xff] },
+        {"icon": browser.runtime.getURL("default.png"),
+         "popup": browser.runtime.getURL("default.html"),
+         "title": "Default Title",
+         "badge": "",
+         "badgeBackgroundColor": null},
+        {"icon": browser.runtime.getURL("1.png"),
+         "popup": browser.runtime.getURL("default.html"),
+         "title": "Default Title",
+         "badge": "",
+         "badgeBackgroundColor": null},
+        {"icon": browser.runtime.getURL("2.png"),
+         "popup": browser.runtime.getURL("2.html"),
+         "title": "Title 2",
+         "badge": "2",
+         "badgeBackgroundColor": [0xff, 0, 0, 0xff],
+          "disabled": true},
+        {"icon": browser.runtime.getURL("1.png"),
+         "popup": browser.runtime.getURL("default-2.html"),
+         "title": "Default Title 2",
+         "badge": "d2",
+         "badgeBackgroundColor": [0, 0xff, 0, 0xff],
+          "disabled": true},
+        {"icon": browser.runtime.getURL("1.png"),
+         "popup": browser.runtime.getURL("default-2.html"),
+         "title": "Default Title 2",
+         "badge": "d2",
+         "badgeBackgroundColor": [0, 0xff, 0, 0xff],
+         "disabled": false},
+        {"icon": browser.runtime.getURL("default-2.png"),
+         "popup": browser.runtime.getURL("default-2.html"),
+         "title": "Default Title 2",
+         "badge": "d2",
+         "badgeBackgroundColor": [0, 0xff, 0, 0xff]},
       ];
 
       return [
         expect => {
           browser.test.log("Initial state, expect default properties.");
           expectDefaults(details[0]).then(() => {
             expect(details[0]);
           });
         },
         expect => {
           browser.test.log("Change the icon in the current tab. Expect default properties excluding the icon.");
-          browser.browserAction.setIcon({ tabId: tabs[0], path: "1.png" });
+          browser.browserAction.setIcon({tabId: tabs[0], path: "1.png"});
           expectDefaults(details[0]).then(() => {
             expect(details[1]);
           });
         },
         expect => {
           browser.test.log("Create a new tab. Expect default properties.");
-          browser.tabs.create({ active: true, url: "about:blank?0" }, tab => {
+          browser.tabs.create({active: true, url: "about:blank?0"}, tab => {
             tabs.push(tab.id);
             expectDefaults(details[0]).then(() => {
               expect(details[0]);
             });
           });
         },
         expect => {
           browser.test.log("Change properties. Expect new properties.");
           let tabId = tabs[1];
-          browser.browserAction.setIcon({ tabId, path: "2.png" });
-          browser.browserAction.setPopup({ tabId, popup: "2.html" });
-          browser.browserAction.setTitle({ tabId, title: "Title 2" });
-          browser.browserAction.setBadgeText({ tabId, text: "2" });
-          browser.browserAction.setBadgeBackgroundColor({ tabId, color: [0xff, 0, 0, 0xff] });
+          browser.browserAction.setIcon({tabId, path: "2.png"});
+          browser.browserAction.setPopup({tabId, popup: "2.html"});
+          browser.browserAction.setTitle({tabId, title: "Title 2"});
+          browser.browserAction.setBadgeText({tabId, text: "2"});
+          browser.browserAction.setBadgeBackgroundColor({tabId, color: [0xff, 0, 0, 0xff]});
           browser.browserAction.disable(tabId);
 
           expectDefaults(details[0]).then(() => {
             expect(details[2]);
           });
         },
         expect => {
           browser.test.log("Navigate to a new page. Expect no changes.");
@@ -227,60 +227,60 @@ add_task(function* testTabSwitchContext(
           // callback currently fires too early in e10s windows.
           browser.tabs.onUpdated.addListener(function listener(tabId, changed) {
             if (tabId == tabs[1] && changed.url) {
               browser.tabs.onUpdated.removeListener(listener);
               expect(details[2]);
             }
           });
 
-          browser.tabs.update(tabs[1], { url: "about:blank?1" });
+          browser.tabs.update(tabs[1], {url: "about:blank?1"});
         },
         expect => {
           browser.test.log("Switch back to the first tab. Expect previously set properties.");
-          browser.tabs.update(tabs[0], { active: true }, () => {
+          browser.tabs.update(tabs[0], {active: true}, () => {
             expect(details[1]);
           });
         },
         expect => {
           browser.test.log("Change default values, expect those changes reflected.");
-          browser.browserAction.setIcon({ path: "default-2.png" });
-          browser.browserAction.setPopup({ popup: "default-2.html" });
-          browser.browserAction.setTitle({ title: "Default Title 2" });
-          browser.browserAction.setBadgeText({ text: "d2" });
-          browser.browserAction.setBadgeBackgroundColor({ color: [0, 0xff, 0, 0xff] });
+          browser.browserAction.setIcon({path: "default-2.png"});
+          browser.browserAction.setPopup({popup: "default-2.html"});
+          browser.browserAction.setTitle({title: "Default Title 2"});
+          browser.browserAction.setBadgeText({text: "d2"});
+          browser.browserAction.setBadgeBackgroundColor({color: [0, 0xff, 0, 0xff]});
           browser.browserAction.disable();
           expectDefaults(details[3]).then(() => {
             expect(details[3]);
           });
         },
         expect => {
           browser.test.log("Re-enable by default. Expect enabled.");
           browser.browserAction.enable();
           expectDefaults(details[4]).then(() => {
             expect(details[4]);
           });
         },
         expect => {
           browser.test.log("Switch back to tab 2. Expect former value, unaffected by changes to defaults in previous step.");
-          browser.tabs.update(tabs[1], { active: true }, () => {
+          browser.tabs.update(tabs[1], {active: true}, () => {
             expectDefaults(details[3]).then(() => {
               expect(details[2]);
             });
           });
         },
         expect => {
           browser.test.log("Delete tab, switch back to tab 1. Expect previous results again.");
           browser.tabs.remove(tabs[1], () => {
             expect(details[4]);
           });
         },
         expect => {
           browser.test.log("Create a new tab. Expect new default properties.");
-          browser.tabs.create({ active: true, url: "about:blank?2" }, tab => {
+          browser.tabs.create({active: true, url: "about:blank?2"}, tab => {
             tabs.push(tab.id);
             expect(details[5]);
           });
         },
         expect => {
           browser.test.log("Delete tab.");
           browser.tabs.remove(tabs[2], () => {
             expect(details[4]);
@@ -300,69 +300,69 @@ add_task(function* testDefaultTitle() {
         "default_icon": "icon.png",
       },
 
       "permissions": ["tabs"],
     },
 
     getTests(tabs, expectDefaults) {
       let details = [
-        { "title": "Foo Extension",
-          "popup": "",
-          "badge": "",
-          "badgeBackgroundColor": null,
-          "icon": browser.runtime.getURL("icon.png") },
-        { "title": "Foo Title",
-          "popup": "",
-          "badge": "",
-          "badgeBackgroundColor": null,
-          "icon": browser.runtime.getURL("icon.png") },
-        { "title": "Bar Title",
-          "popup": "",
-          "badge": "",
-          "badgeBackgroundColor": null,
-          "icon": browser.runtime.getURL("icon.png") },
-        { "title": "",
-          "popup": "",
-          "badge": "",
-          "badgeBackgroundColor": null,
-          "icon": browser.runtime.getURL("icon.png") },
+        {"title": "Foo Extension",
+         "popup": "",
+         "badge": "",
+         "badgeBackgroundColor": null,
+         "icon": browser.runtime.getURL("icon.png")},
+        {"title": "Foo Title",
+         "popup": "",
+         "badge": "",
+         "badgeBackgroundColor": null,
+         "icon": browser.runtime.getURL("icon.png")},
+        {"title": "Bar Title",
+         "popup": "",
+         "badge": "",
+         "badgeBackgroundColor": null,
+         "icon": browser.runtime.getURL("icon.png")},
+        {"title": "",
+         "popup": "",
+         "badge": "",
+         "badgeBackgroundColor": null,
+         "icon": browser.runtime.getURL("icon.png")},
       ];
 
       return [
         expect => {
           browser.test.log("Initial state. Expect extension title as default title.");
           expectDefaults(details[0]).then(() => {
             expect(details[0]);
           });
         },
         expect => {
           browser.test.log("Change the title. Expect new title.");
-          browser.browserAction.setTitle({ tabId: tabs[0], title: "Foo Title" });
+          browser.browserAction.setTitle({tabId: tabs[0], title: "Foo Title"});
           expectDefaults(details[0]).then(() => {
             expect(details[1]);
           });
         },
         expect => {
           browser.test.log("Change the default. Expect same properties.");
-          browser.browserAction.setTitle({ title: "Bar Title" });
+          browser.browserAction.setTitle({title: "Bar Title"});
           expectDefaults(details[2]).then(() => {
             expect(details[1]);
           });
         },
         expect => {
           browser.test.log("Clear the title. Expect new default title.");
-          browser.browserAction.setTitle({ tabId: tabs[0], title: "" });
+          browser.browserAction.setTitle({tabId: tabs[0], title: ""});
           expectDefaults(details[2]).then(() => {
             expect(details[2]);
           });
         },
         expect => {
           browser.test.log("Set default title to null string. Expect null string from API, extension title in UI.");
-          browser.browserAction.setTitle({ title: "" });
+          browser.browserAction.setTitle({title: ""});
           expectDefaults(details[3]).then(() => {
             expect(details[3]);
           });
         },
       ];
     },
   });
 });
--- a/browser/components/extensions/test/browser/browser_ext_browserAction_pageAction_icon.js
+++ b/browser/components/extensions/test/browser/browser_ext_browserAction_pageAction_icon.js
@@ -26,110 +26,110 @@ add_task(function* testDetailsObjects() 
     let imageData = {
       red: getImageData("red"),
       green: getImageData("green"),
     };
 
     /* eslint-disable comma-dangle, indent */
     let iconDetails = [
       // Only paths.
-      { details: { "path": "a.png" },
+      {details: {"path": "a.png"},
         resolutions: {
           "1": browser.runtime.getURL("data/a.png"),
-          "2": browser.runtime.getURL("data/a.png"), } },
-      { details: { "path": "/a.png" },
+          "2": browser.runtime.getURL("data/a.png")}},
+      {details: {"path": "/a.png"},
         resolutions: {
           "1": browser.runtime.getURL("a.png"),
-          "2": browser.runtime.getURL("a.png"), } },
-      { details: { "path": { "19": "a.png" } },
+          "2": browser.runtime.getURL("a.png")}},
+      {details: {"path": {"19": "a.png"}},
         resolutions: {
           "1": browser.runtime.getURL("data/a.png"),
-          "2": browser.runtime.getURL("data/a.png"), } },
-      { details: { "path": { "38": "a.png" } },
+          "2": browser.runtime.getURL("data/a.png")}},
+      {details: {"path": {"38": "a.png"}},
         resolutions: {
           "1": browser.runtime.getURL("data/a.png"),
-          "2": browser.runtime.getURL("data/a.png"), } },
-      { details: { "path": { "19": "a.png", "38": "a-x2.png" } },
+          "2": browser.runtime.getURL("data/a.png")}},
+      {details: {"path": {"19": "a.png", "38": "a-x2.png"}},
         resolutions: {
           "1": browser.runtime.getURL("data/a.png"),
-          "2": browser.runtime.getURL("data/a-x2.png"), } },
+          "2": browser.runtime.getURL("data/a-x2.png")}},
 
       // Only ImageData objects.
-      { details: { "imageData": imageData.red.imageData },
+      {details: {"imageData": imageData.red.imageData},
         resolutions: {
           "1": imageData.red.url,
-          "2": imageData.red.url, } },
-      { details: { "imageData": { "19": imageData.red.imageData } },
+          "2": imageData.red.url}},
+      {details: {"imageData": {"19": imageData.red.imageData}},
         resolutions: {
           "1": imageData.red.url,
-          "2": imageData.red.url, } },
-      { details: { "imageData": { "38": imageData.red.imageData } },
+          "2": imageData.red.url}},
+      {details: {"imageData": {"38": imageData.red.imageData}},
         resolutions: {
           "1": imageData.red.url,
-          "2": imageData.red.url, } },
-      { details: { "imageData": {
+          "2": imageData.red.url}},
+      {details: {"imageData": {
           "19": imageData.red.imageData,
-          "38": imageData.green.imageData } },
+          "38": imageData.green.imageData}},
         resolutions: {
           "1": imageData.red.url,
-          "2": imageData.green.url, } },
+          "2": imageData.green.url}},
 
       // Mixed path and imageData objects.
       //
       // The behavior is currently undefined if both |path| and
       // |imageData| specify icons of the same size.
-      { details: {
-          "path": { "19": "a.png" },
-          "imageData": { "38": imageData.red.imageData } },
+      {details: {
+          "path": {"19": "a.png"},
+          "imageData": {"38": imageData.red.imageData}},
         resolutions: {
           "1": browser.runtime.getURL("data/a.png"),
-          "2": imageData.red.url, } },
-      { details: {
-          "path": { "38": "a.png" },
-          "imageData": { "19": imageData.red.imageData } },
+          "2": imageData.red.url}},
+      {details: {
+          "path": {"38": "a.png"},
+          "imageData": {"19": imageData.red.imageData}},
         resolutions: {
           "1": imageData.red.url,
-          "2": browser.runtime.getURL("data/a.png"), } },
+          "2": browser.runtime.getURL("data/a.png")}},
 
       // A path or ImageData object by itself is treated as a 19px icon.
-      { details: {
+      {details: {
           "path": "a.png",
-          "imageData": { "38": imageData.red.imageData } },
+          "imageData": {"38": imageData.red.imageData}},
         resolutions: {
           "1": browser.runtime.getURL("data/a.png"),
-          "2": imageData.red.url, } },
-      { details: {
-          "path": { "38": "a.png" },
-          "imageData": imageData.red.imageData, },
+          "2": imageData.red.url}},
+      {details: {
+          "path": {"38": "a.png"},
+          "imageData": imageData.red.imageData},
         resolutions: {
           "1": imageData.red.url,
-          "2": browser.runtime.getURL("data/a.png"), } },
+          "2": browser.runtime.getURL("data/a.png")}},
 
       // Various resolutions
-      { details: { "path": { "18": "a.png", "32": "a-x2.png" } },
+      {details: {"path": {"18": "a.png", "32": "a-x2.png"}},
         resolutions: {
           "1": browser.runtime.getURL("data/a.png"),
-          "2": browser.runtime.getURL("data/a-x2.png"), } },
-      { details: { "path": { "16": "16.png", "100": "100.png" } },
+          "2": browser.runtime.getURL("data/a-x2.png")}},
+      {details: {"path": {"16": "16.png", "100": "100.png"}},
         resolutions: {
           "1": browser.runtime.getURL("data/100.png"),
-          "2": browser.runtime.getURL("data/100.png"), } },
-      { details: { "path": { "2": "2.png"} },
+          "2": browser.runtime.getURL("data/100.png")}},
+      {details: {"path": {"2": "2.png"}},
         resolutions: {
           "1": browser.runtime.getURL("data/2.png"),
-          "2": browser.runtime.getURL("data/2.png"), } },
-      { details: { "path": {
+          "2": browser.runtime.getURL("data/2.png")}},
+      {details: {"path": {
         "6": "6.png",
         "18": "18.png",
         "32": "32.png",
         "48": "48.png",
-        "128": "128.png" } },
+        "128": "128.png"}},
         resolutions: {
           "1": browser.runtime.getURL("data/18.png"),
-          "2": browser.runtime.getURL("data/48.png"), } },
+          "2": browser.runtime.getURL("data/48.png")}},
     ];
 
     // Allow serializing ImageData objects for logging.
     ImageData.prototype.toJSON = () => "<ImageData>";
 
     let tabId;
 
     browser.test.onMessage.addListener((msg, test) => {
@@ -157,25 +157,25 @@ add_task(function* testDetailsObjects() 
     // but it can't pass us icon definitions with ImageData objects. This
     // shouldn't be a problem, since structured clones should handle ImageData
     // objects without issue. Unfortunately, |cloneInto| implements a slightly
     // different algorithm than we use in web APIs, and does not handle them
     // correctly.
     let tests = [];
     for (let [idx, icon] of iconDetails.entries()) {
       for (let res of Object.keys(icon.resolutions)) {
-        tests.push({ index: idx, resolution: Number(res) });
+        tests.push({index: idx, resolution: Number(res)});
       }
     }
 
     // Sort by resolution, so we don't needlessly switch back and forth
     // between each test.
     tests.sort(test => test.resolution);
 
-    browser.tabs.query({ active: true, currentWindow: true }, tabs => {
+    browser.tabs.query({active: true, currentWindow: true}, tabs => {
       tabId = tabs[0].id;
       browser.pageAction.show(tabId);
 
       browser.test.sendMessage("ready", tests);
     });
   }
 
   let extension = ExtensionTestUtils.loadExtension({
@@ -225,17 +225,17 @@ add_task(function* testDetailsObjects() 
 add_task(function* testInvalidIconSizes() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "browser_action": {},
       "page_action": {},
     },
 
     background: function() {
-      browser.tabs.query({ active: true, currentWindow: true }, tabs => {
+      browser.tabs.query({active: true, currentWindow: true}, tabs => {
         let tabId = tabs[0].id;
 
         let promises = [];
         for (let api of ["pageAction", "browserAction"]) {
           // helper function to run setIcon and check if it fails
           let assertSetIconThrows = function(detail, error, message) {
             detail.tabId = tabId;
             promises.push(
@@ -250,26 +250,26 @@ add_task(function* testInvalidIconSizes(
           };
 
           let imageData = new ImageData(1, 1);
 
           // test invalid icon size inputs
           for (let type of ["path", "imageData"]) {
             let img = type == "imageData" ? imageData : "test.png";
 
-            assertSetIconThrows({ [type]: { "abcdef": img } });
-            assertSetIconThrows({ [type]: { "48px": img } });
-            assertSetIconThrows({ [type]: { "20.5": img } });
-            assertSetIconThrows({ [type]: { "5.0": img } });
-            assertSetIconThrows({ [type]: { "-300": img } });
-            assertSetIconThrows({ [type]: { "abc": img, "5": img }});
+            assertSetIconThrows({[type]: {"abcdef": img}});
+            assertSetIconThrows({[type]: {"48px": img}});
+            assertSetIconThrows({[type]: {"20.5": img}});
+            assertSetIconThrows({[type]: {"5.0": img}});
+            assertSetIconThrows({[type]: {"-300": img}});
+            assertSetIconThrows({[type]: {"abc": img, "5": img}});
           }
 
-          assertSetIconThrows({ imageData: { "abcdef": imageData }, path: {"5": "test.png"} });
-          assertSetIconThrows({ path: { "abcdef": "test.png" }, imageData: {"5": imageData} });
+          assertSetIconThrows({imageData: {"abcdef": imageData}, path: {"5": "test.png"}});
+          assertSetIconThrows({path: {"abcdef": "test.png"}, imageData: {"5": imageData}});
         }
 
         Promise.all(promises).then(() => {
           browser.test.notifyPass("setIcon with invalid icon size");
         });
       });
     }
   });
@@ -282,32 +282,32 @@ add_task(function* testInvalidIconSizes(
 
 // Test that default icon details in the manifest.json file are handled
 // correctly.
 add_task(function* testDefaultDetails() {
   // TODO: Test localized variants.
   let icons = [
     "foo/bar.png",
     "/foo/bar.png",
-    { "19": "foo/bar.png" },
-    { "38": "foo/bar.png" },
-    { "19": "foo/bar.png", "38": "baz/quux.png" },
+    {"19": "foo/bar.png"},
+    {"38": "foo/bar.png"},
+    {"19": "foo/bar.png", "38": "baz/quux.png"},
   ];
 
   let expectedURL = new RegExp(String.raw`^moz-extension://[^/]+/foo/bar\.png$`);
 
   for (let icon of icons) {
     let extension = ExtensionTestUtils.loadExtension({
       manifest: {
-        "browser_action": { "default_icon": icon },
-        "page_action": { "default_icon": icon },
+        "browser_action": {"default_icon": icon},
+        "page_action": {"default_icon": icon},
       },
 
       background: function() {
-        browser.tabs.query({ active: true, currentWindow: true }, tabs => {
+        browser.tabs.query({active: true, currentWindow: true}, tabs => {
           let tabId = tabs[0].id;
 
           browser.pageAction.show(tabId);
           browser.test.sendMessage("ready");
         });
       }
     });
 
@@ -340,17 +340,17 @@ add_task(function* testSecureURLsDenied(
 
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "browser_action": {},
       "page_action": {},
     },
 
     background: function() {
-      browser.tabs.query({ active: true, currentWindow: true }, tabs => {
+      browser.tabs.query({active: true, currentWindow: true}, tabs => {
         let tabId = tabs[0].id;
 
         let urls = ["chrome://browser/content/browser.xul",
                     "javascript:true"];
 
         let promises = [];
         for (let url of urls) {
           for (let api of ["pageAction", "browserAction"]) {
--- a/browser/components/extensions/test/browser/browser_ext_browserAction_popup.js
+++ b/browser/components/extensions/test/browser/browser_ext_browserAction_popup.js
@@ -25,44 +25,44 @@ function* testInArea(area) {
       },
 
       "data/background.html": `<script src="background.js"></script>`,
 
       "data/background.js": function() {
         let sendClick;
         let tests = [
           () => {
-            sendClick({ expectEvent: false, expectPopup: "a" });
+            sendClick({expectEvent: false, expectPopup: "a"});
           },
           () => {
-            sendClick({ expectEvent: false, expectPopup: "a" });
+            sendClick({expectEvent: false, expectPopup: "a"});
           },
           () => {
-            browser.browserAction.setPopup({ popup: "popup-b.html" });
-            sendClick({ expectEvent: false, expectPopup: "b" });
+            browser.browserAction.setPopup({popup: "popup-b.html"});
+            sendClick({expectEvent: false, expectPopup: "b"});
           },
           () => {
-            sendClick({ expectEvent: false, expectPopup: "b" });
+            sendClick({expectEvent: false, expectPopup: "b"});
           },
           () => {
-            browser.browserAction.setPopup({ popup: "" });
-            sendClick({ expectEvent: true, expectPopup: null });
+            browser.browserAction.setPopup({popup: ""});
+            sendClick({expectEvent: true, expectPopup: null});
           },
           () => {
-            sendClick({ expectEvent: true, expectPopup: null });
+            sendClick({expectEvent: true, expectPopup: null});
           },
           () => {
-            browser.browserAction.setPopup({ popup: "/popup-a.html" });
-            sendClick({ expectEvent: false, expectPopup: "a" });
+            browser.browserAction.setPopup({popup: "/popup-a.html"});
+            sendClick({expectEvent: false, expectPopup: "a"});
           },
         ];
 
         let expect = {};
-        sendClick = ({ expectEvent, expectPopup }) => {
-          expect = { event: expectEvent, popup: expectPopup };
+        sendClick = ({expectEvent, expectPopup}) => {
+          expect = {event: expectEvent, popup: expectPopup};
           browser.test.sendMessage("send-click");
         };
 
         browser.runtime.onMessage.addListener(msg => {
           if (expect.popup) {
             browser.test.assertEq(msg, `from-popup-${expect.popup}`,
                                   "expected popup opened");
           } else {
--- a/browser/components/extensions/test/browser/browser_ext_contentscript_connect.js
+++ b/browser/components/extensions/test/browser/browser_ext_contentscript_connect.js
@@ -38,17 +38,17 @@ add_task(function* () {
 
           port_messages_received++;
           browser.test.assertEq(2, port_messages_received, "2 port messages received");
 
           browser.test.notifyPass("contentscript_connect.pass");
         });
       });
 
-      browser.tabs.executeScript({ file: "script.js" });
+      browser.tabs.executeScript({file: "script.js"});
     },
 
     files: {
       "script.js": function() {
         let port = browser.runtime.connect();
         port.postMessage("port message");
       },
     },
--- a/browser/components/extensions/test/browser/browser_ext_contextMenus.js
+++ b/browser/components/extensions/test/browser/browser_ext_contextMenus.js
@@ -17,49 +17,49 @@ add_task(function* () {
     },
 
     background: function() {
       // A generic onclick callback function.
       function genericOnClick(info) {
         browser.test.sendMessage("menuItemClick", JSON.stringify(info));
       }
 
-      browser.contextMenus.create({ contexts: ["all"], type: "separator" });
+      browser.contextMenus.create({contexts: ["all"], type: "separator"});
 
       let contexts = ["page", "selection", "image"];
       for (let i = 0; i < contexts.length; i++) {
         let context = contexts[i];
         let title = context;
-        browser.contextMenus.create({ title: title, contexts: [context], id: "ext-" + context,
-                                      onclick: genericOnClick });
+        browser.contextMenus.create({title: title, contexts: [context], id: "ext-" + context,
+                                     onclick: genericOnClick});
         if (context == "selection") {
           browser.contextMenus.update("ext-selection", {
             title: "selection is: '%s'",
             onclick: (info) => {
               browser.contextMenus.removeAll();
               genericOnClick(info);
             },
           });
         }
       }
 
-      let parent = browser.contextMenus.create({ title: "parent" });
+      let parent = browser.contextMenus.create({title: "parent"});
       browser.contextMenus.create(
-        { title: "child1", parentId: parent, onclick: genericOnClick });
+        {title: "child1", parentId: parent, onclick: genericOnClick});
       let child2 = browser.contextMenus.create(
-        { title: "child2", parentId: parent, onclick: genericOnClick });
+        {title: "child2", parentId: parent, onclick: genericOnClick});
 
-      let parentToDel = browser.contextMenus.create({ title: "parentToDel" });
+      let parentToDel = browser.contextMenus.create({title: "parentToDel"});
       browser.contextMenus.create(
-        { title: "child1", parentId: parentToDel, onclick: genericOnClick });
+        {title: "child1", parentId: parentToDel, onclick: genericOnClick});
       browser.contextMenus.create(
-        { title: "child2", parentId: parentToDel, onclick: genericOnClick });
+        {title: "child2", parentId: parentToDel, onclick: genericOnClick});
       browser.contextMenus.remove(parentToDel);
 
-      browser.contextMenus.update(parent, { parentId: child2 }).then(
+      browser.contextMenus.update(parent, {parentId: child2}).then(
         () => {
           browser.test.notifyFail();
         },
         () => {
           browser.test.notifyPass();
         });
     },
   });
@@ -76,17 +76,17 @@ add_task(function* () {
 
   yield extension.startup();
   yield extension.awaitFinish();
 
   // Bring up context menu
   let contentAreaContextMenu = document.getElementById("contentAreaContextMenu");
   let popupShownPromise = BrowserTestUtils.waitForEvent(contentAreaContextMenu, "popupshown");
   yield BrowserTestUtils.synthesizeMouseAtCenter("#img1",
-    { type: "contextmenu", button: 2 }, gBrowser.selectedBrowser);
+    {type: "contextmenu", button: 2}, gBrowser.selectedBrowser);
   yield popupShownPromise;
 
   // Check some menu items
   let items = contentAreaContextMenu.getElementsByAttribute("ext-type", "top-level-menu");
   is(items.length, 1, "top level item was found (context=image)");
   let topItem = items.item(0);
   let top = topItem.childNodes[0];
 
@@ -129,17 +129,17 @@ add_task(function* () {
     range.setStart(textNode, 0);
     range.setEnd(textNode, 100);
     selection.addRange(range);
   });
 
   // Bring up context menu again
   popupShownPromise = BrowserTestUtils.waitForEvent(contentAreaContextMenu, "popupshown");
   yield BrowserTestUtils.synthesizeMouse(null, 1, 1,
-    { type: "contextmenu", button: 2 }, gBrowser.selectedBrowser);
+    {type: "contextmenu", button: 2}, gBrowser.selectedBrowser);
   yield popupShownPromise;
 
   items = contentAreaContextMenu.getElementsByAttribute("ext-type", "top-level-menu");
   is(items.length, 1, "top level item was found (context=selection)");
   top = items.item(0).childNodes[0];
 
   // Check some menu items
   items = top.getElementsByAttribute("label", "selection is: 'just some text 123456789012345678901234567890...'");
@@ -158,17 +158,17 @@ add_task(function* () {
   top.openPopup(topItem, "end_before", 0, 0, true, false);
   EventUtils.synthesizeMouseAtCenter(selectionItem, {});
   clickInfo = yield extension.awaitMessage("menuItemClick");
   checkClickInfo(clickInfo);
   yield popupHiddenPromise;
 
   popupShownPromise = BrowserTestUtils.waitForEvent(contentAreaContextMenu, "popupshown");
   yield BrowserTestUtils.synthesizeMouseAtCenter("#img1",
-    { type: "contextmenu", button: 2 }, gBrowser.selectedBrowser);
+    {type: "contextmenu", button: 2}, gBrowser.selectedBrowser);
   yield popupShownPromise;
 
   items = contentAreaContextMenu.getElementsByAttribute("ext-type", "top-level-menu");
   is(items.length, 0, "top level item was not found (after removeAll()");
 
   yield extension.unload();
 
   yield BrowserTestUtils.removeTab(tab1);
--- a/browser/components/extensions/test/browser/browser_ext_lastError.js
+++ b/browser/components/extensions/test/browser/browser_ext_lastError.js
@@ -32,17 +32,17 @@ add_task(function* testLastError() {
 
   // Check that we have no unexpected console messages when lastError is
   // checked.
   for (let api of ["extension", "runtime"]) {
     let waitForConsole = new Promise(resolve => {
       SimpleTest.monitorConsole(resolve, [{message: /Invalid extension ID/, forbid: true}]);
     });
 
-    yield sendMessage({ checkLastError: api });
+    yield sendMessage({checkLastError: api});
 
     SimpleTest.endMonitorConsole();
     yield waitForConsole;
   }
 
   // Check that we do have a console message when lastError is not checked.
   let waitForConsole = new Promise(resolve => {
     SimpleTest.monitorConsole(resolve, [{message: /Unchecked lastError value: Error: Invalid extension ID/}]);
--- a/browser/components/extensions/test/browser/browser_ext_pageAction_context.js
+++ b/browser/components/extensions/test/browser/browser_ext_pageAction_context.js
@@ -6,26 +6,26 @@ function* runTests(options) {
   function background(getTests) {
     let tabs;
     let tests;
 
     // Gets the current details of the page action, and returns a
     // promise that resolves to an object containing them.
     function getDetails() {
       return new Promise(resolve => {
-        return browser.tabs.query({ active: true, currentWindow: true }, resolve);
+        return browser.tabs.query({active: true, currentWindow: true}, resolve);
       }).then(([tab]) => {
         let tabId = tab.id;
         browser.test.log(`Get details: tab={id: ${tabId}, url: ${JSON.stringify(tab.url)}}`);
         return Promise.all([
           browser.pageAction.getTitle({tabId}),
           browser.pageAction.getPopup({tabId})]);
       }).then(details => {
-        return Promise.resolve({ title: details[0],
-                                 popup: details[1] });
+        return Promise.resolve({title: details[0],
+                                popup: details[1]});
       });
     }
 
 
     // Runs the next test in the `tests` array, checks the results,
     // and passes control back to the outer test scope.
     function nextTest() {
       let test = tests.shift();
@@ -54,17 +54,17 @@ function* runTests(options) {
         }
       });
     }
 
     function runTests() {
       tabs = [];
       tests = getTests(tabs);
 
-      browser.tabs.query({ active: true, currentWindow: true }, resultTabs => {
+      browser.tabs.query({active: true, currentWindow: true}, resultTabs => {
         tabs[0] = resultTabs[0].id;
 
         nextTest();
       });
     }
 
     browser.test.onMessage.addListener((msg) => {
       if (msg == "runTests") {
@@ -158,28 +158,28 @@ add_task(function* testTabSwitchContext(
         "default_title": "Default Title \u263a",
       },
 
       "permissions": ["tabs"],
     },
 
     getTests(tabs) {
       let details = [
-        { "icon": browser.runtime.getURL("default.png"),
-          "popup": browser.runtime.getURL("default.html"),
-          "title": "Default Title \u263a" },
-        { "icon": browser.runtime.getURL("1.png"),
-          "popup": browser.runtime.getURL("default.html"),
-          "title": "Default Title \u263a" },
-        { "icon": browser.runtime.getURL("2.png"),
-          "popup": browser.runtime.getURL("2.html"),
-          "title": "Title 2" },
-        { "icon": browser.runtime.getURL("2.png"),
-          "popup": browser.runtime.getURL("2.html"),
-          "title": "Default Title \u263a" },
+        {"icon": browser.runtime.getURL("default.png"),
+         "popup": browser.runtime.getURL("default.html"),
+         "title": "Default Title \u263a"},
+        {"icon": browser.runtime.getURL("1.png"),
+         "popup": browser.runtime.getURL("default.html"),
+         "title": "Default Title \u263a"},
+        {"icon": browser.runtime.getURL("2.png"),
+         "popup": browser.runtime.getURL("2.html"),
+         "title": "Title 2"},
+        {"icon": browser.runtime.getURL("2.png"),
+         "popup": browser.runtime.getURL("2.html"),
+         "title": "Default Title \u263a"},
       ];
 
       let promiseTabLoad = details => {
         return new Promise(resolve => {
           browser.tabs.onUpdated.addListener(function listener(tabId, changed) {
             if (tabId == details.id && changed.url == details.url) {
               browser.tabs.onUpdated.removeListener(listener);
               resolve();
@@ -196,75 +196,75 @@ add_task(function* testTabSwitchContext(
         },
         expect => {
           browser.test.log("Show the icon on the first tab, expect default properties.");
           browser.pageAction.show(tabs[0]);
           expect(details[0]);
         },
         expect => {
           browser.test.log("Change the icon. Expect default properties excluding the icon.");
-          browser.pageAction.setIcon({ tabId: tabs[0], path: "1.png" });
+          browser.pageAction.setIcon({tabId: tabs[0], path: "1.png"});
           expect(details[1]);
         },
         expect => {
           browser.test.log("Create a new tab. No icon visible.");
-          browser.tabs.create({ active: true, url: "about:blank?0" }, tab => {
-            tabLoadPromise = promiseTabLoad({ url: "about:blank?0", id: tab.id });
+          browser.tabs.create({active: true, url: "about:blank?0"}, tab => {
+            tabLoadPromise = promiseTabLoad({url: "about:blank?0", id: tab.id});
             tabs.push(tab.id);
             expect(null);
           });
         },
         expect => {
           browser.test.log("Await tab load. No icon visible.");
           tabLoadPromise.then(() => {
             expect(null);
           });
         },
         expect => {
           browser.test.log("Change properties. Expect new properties.");
           let tabId = tabs[1];
           browser.pageAction.show(tabId);
-          browser.pageAction.setIcon({ tabId, path: "2.png" });
-          browser.pageAction.setPopup({ tabId, popup: "2.html" });
-          browser.pageAction.setTitle({ tabId, title: "Title 2" });
+          browser.pageAction.setIcon({tabId, path: "2.png"});
+          browser.pageAction.setPopup({tabId, popup: "2.html"});
+          browser.pageAction.setTitle({tabId, title: "Title 2"});
 
           expect(details[2]);
         },
         expect => {
           browser.test.log("Clear the title. Expect default title.");
-          browser.pageAction.setTitle({ tabId: tabs[1], title: "" });
+          browser.pageAction.setTitle({tabId: tabs[1], title: ""});
 
           expect(details[3]);
         },
         expect => {
           browser.test.log("Navigate to a new page. Expect icon hidden.");
 
           // TODO: This listener should not be necessary, but the |tabs.update|
           // callback currently fires too early in e10s windows.
-          promiseTabLoad({ id: tabs[1], url: "about:blank?1" }).then(() => {
+          promiseTabLoad({id: tabs[1], url: "about:blank?1"}).then(() => {
             expect(null);
           });
 
-          browser.tabs.update(tabs[1], { url: "about:blank?1" });
+          browser.tabs.update(tabs[1], {url: "about:blank?1"});
         },
         expect => {
           browser.test.log("Show the icon. Expect default properties again.");
           browser.pageAction.show(tabs[1]);
           expect(details[0]);
         },
         expect => {
           browser.test.log("Switch back to the first tab. Expect previously set properties.");
-          browser.tabs.update(tabs[0], { active: true }, () => {
+          browser.tabs.update(tabs[0], {active: true}, () => {
             expect(details[1]);
           });
         },
         expect => {
           browser.test.log("Hide the icon on tab 2. Switch back, expect hidden.");
           browser.pageAction.hide(tabs[1]);
-          browser.tabs.update(tabs[1], { active: true }, () => {
+          browser.tabs.update(tabs[1], {active: true}, () => {
             expect(null);
           });
         },
         expect => {
           browser.test.log("Switch back to tab 1. Expect previous results again.");
           browser.tabs.remove(tabs[1], () => {
             expect(details[1]);
           });
@@ -288,40 +288,40 @@ add_task(function* testDefaultTitle() {
         "default_icon": "icon.png",
       },
 
       "permissions": ["tabs"],
     },
 
     getTests(tabs) {
       let details = [
-        { "title": "Foo Extension",
-          "popup": "",
-          "icon": browser.runtime.getURL("icon.png") },
-        { "title": "Foo Title",
-          "popup": "",
-          "icon": browser.runtime.getURL("icon.png") },
+        {"title": "Foo Extension",
+         "popup": "",
+         "icon": browser.runtime.getURL("icon.png")},
+        {"title": "Foo Title",
+         "popup": "",
+         "icon": browser.runtime.getURL("icon.png")},
       ];
 
       return [
         expect => {
           browser.test.log("Initial state. No icon visible.");
           expect(null);
         },
         expect => {
           browser.test.log("Show the icon on the first tab, expect extension title as default title.");
           browser.pageAction.show(tabs[0]);
           expect(details[0]);
         },
         expect => {
           browser.test.log("Change the title. Expect new title.");
-          browser.pageAction.setTitle({ tabId: tabs[0], title: "Foo Title" });
+          browser.pageAction.setTitle({tabId: tabs[0], title: "Foo Title"});
           expect(details[1]);
         },
         expect => {
           browser.test.log("Clear the title. Expect extension title.");
-          browser.pageAction.setTitle({ tabId: tabs[0], title: "" });
+          browser.pageAction.setTitle({tabId: tabs[0], title: ""});
           expect(details[0]);
         },
       ];
     },
   });
 });
--- a/browser/components/extensions/test/browser/browser_ext_pageAction_popup.js
+++ b/browser/components/extensions/test/browser/browser_ext_pageAction_popup.js
@@ -29,44 +29,44 @@ add_task(function* testPageActionPopup()
       "data/background.html": scriptPage("background.js"),
 
       "data/background.js": function() {
         let tabId;
 
         let sendClick;
         let tests = [
           () => {
-            sendClick({ expectEvent: false, expectPopup: "a" });
+            sendClick({expectEvent: false, expectPopup: "a"});
           },
           () => {
-            sendClick({ expectEvent: false, expectPopup: "a" });
+            sendClick({expectEvent: false, expectPopup: "a"});
           },
           () => {
-            browser.pageAction.setPopup({ tabId, popup: "popup-b.html" });
-            sendClick({ expectEvent: false, expectPopup: "b" });
+            browser.pageAction.setPopup({tabId, popup: "popup-b.html"});
+            sendClick({expectEvent: false, expectPopup: "b"});
           },
           () => {
-            sendClick({ expectEvent: false, expectPopup: "b" });
+            sendClick({expectEvent: false, expectPopup: "b"});
           },
           () => {
-            browser.pageAction.setPopup({ tabId, popup: "" });
-            sendClick({ expectEvent: true, expectPopup: null });
+            browser.pageAction.setPopup({tabId, popup: ""});
+            sendClick({expectEvent: true, expectPopup: null});
           },
           () => {
-            sendClick({ expectEvent: true, expectPopup: null });
+            sendClick({expectEvent: true, expectPopup: null});
           },
           () => {
-            browser.pageAction.setPopup({ tabId, popup: "/popup-a.html" });
-            sendClick({ expectEvent: false, expectPopup: "a" });
+            browser.pageAction.setPopup({tabId, popup: "/popup-a.html"});
+            sendClick({expectEvent: false, expectPopup: "a"});
           },
         ];
 
         let expect = {};
-        sendClick = ({ expectEvent, expectPopup }) => {
-          expect = { event: expectEvent, popup: expectPopup };
+        sendClick = ({expectEvent, expectPopup}) => {
+          expect = {event: expectEvent, popup: expectPopup};
           browser.test.sendMessage("send-click");
         };
 
         browser.runtime.onMessage.addListener(msg => {
           if (expect.popup) {
             browser.test.assertEq(msg, `from-popup-${expect.popup}`,
                                   "expected popup opened");
           } else {
@@ -96,17 +96,17 @@ add_task(function* testPageActionPopup()
           if (tests.length) {
             let test = tests.shift();
             test();
           } else {
             browser.test.notifyPass("pageaction-tests-done");
           }
         });
 
-        browser.tabs.query({ active: true, currentWindow: true }, tabs => {
+        browser.tabs.query({active: true, currentWindow: true}, tabs => {
           tabId = tabs[0].id;
 
           browser.pageAction.show(tabId);
           browser.test.sendMessage("next-test");
         });
       },
     },
   });
@@ -160,17 +160,17 @@ add_task(function* testPageActionSecurit
       // if we don't call it.
       SimpleTest.waitForExplicitFinish();
 
       SimpleTest.monitorConsole(resolve, messages);
     });
 
     let extension = ExtensionTestUtils.loadExtension({
       manifest: {
-        [api]: { "default_popup": URL },
+        [api]: {"default_popup": URL},
       },
     });
 
     yield Assert.rejects(extension.startup(),
                          null,
                          "Manifest rejected");
 
     SimpleTest.endMonitorConsole();
--- a/browser/components/extensions/test/browser/browser_ext_popup_api_injection.js
+++ b/browser/components/extensions/test/browser/browser_ext_popup_api_injection.js
@@ -22,25 +22,25 @@ add_task(function* testPageActionPopup()
 
       "popup-b.html": String.raw`<html><head><meta charset="utf-8"><script type="application/javascript">
         browser.test.sendMessage("from-popup-b");
       </script></head></html>`,
     },
 
     background: function() {
       let tabId;
-      browser.tabs.query({ active: true, currentWindow: true }, tabs => {
+      browser.tabs.query({active: true, currentWindow: true}, tabs => {
         tabId = tabs[0].id;
         browser.pageAction.show(tabId);
         browser.test.sendMessage("ready");
       });
 
       browser.test.onMessage.addListener(() => {
-        browser.browserAction.setPopup({ popup: "/popup-a.html" });
-        browser.pageAction.setPopup({ tabId, popup: "popup-b.html" });
+        browser.browserAction.setPopup({popup: "/popup-a.html"});
+        browser.pageAction.setPopup({tabId, popup: "popup-b.html"});
 
         browser.test.sendMessage("ok");
       });
     },
   });
 
   let promiseConsoleMessage = pattern => new Promise(resolve => {
     Services.console.registerListener(function listener(msg) {
--- a/browser/components/extensions/test/browser/browser_ext_runtime_setUninstallURL.js
+++ b/browser/components/extensions/test/browser/browser_ext_runtime_setUninstallURL.js
@@ -1,12 +1,12 @@
 "use strict";
 
-let { AddonManager } = Components.utils.import("resource://gre/modules/AddonManager.jsm", {});
-let { Extension } = Components.utils.import("resource://gre/modules/Extension.jsm", {});
+let {AddonManager} = Components.utils.import("resource://gre/modules/AddonManager.jsm", {});
+let {Extension} = Components.utils.import("resource://gre/modules/Extension.jsm", {});
 
 function install(url) {
   return new Promise((resolve, reject) => {
     AddonManager.getInstallForURL(url, (install) => {
       install.addListener({
         onInstallEnded: (i, addon) => resolve(addon),
         onInstallFailed: () => reject(),
       });
@@ -73,34 +73,34 @@ add_task(function* test_setuninstallurl_
 });
 
 // Test the documented behavior of setUninstallURL() that passing an
 // empty string is equivalent to not setting an uninstall URL
 // (i.e., no new tab is opened upon uninstall)
 add_task(function* test_setuninstall_empty_url() {
   function backgroundScript() {
     browser.runtime.setUninstallURL("")
-      .then(() => browser.tabs.create({ url: "http://example.com/addon_loaded" }));
+      .then(() => browser.tabs.create({url: "http://example.com/addon_loaded"}));
   }
 
   let addon = yield makeAndInstallXPI("test_uinstallurl2@tests.mozilla.org",
                                       backgroundScript,
                                       "http://example.com/addon_loaded");
 
   addon.uninstall(true);
   info("uninstalled");
 
   // no need to explicitly check for the absence of a new tab,
   // BrowserTestUtils will eventually complain if one is opened.
 });
 
 add_task(function* test_setuninstallurl() {
   function backgroundScript() {
     browser.runtime.setUninstallURL("http://example.com/addon_uninstalled")
-      .then(() => browser.tabs.create({ url: "http://example.com/addon_loaded" }));
+      .then(() => browser.tabs.create({url: "http://example.com/addon_loaded"}));
   }
 
   let addon = yield makeAndInstallXPI("test_uinstallurl@tests.mozilla.org",
                                       backgroundScript,
                                       "http://example.com/addon_loaded");
 
   // look for a new tab with the uninstall url.
   let uninstallPromise = BrowserTestUtils.waitForNewTab(gBrowser, "http://example.com/addon_uninstalled");
--- a/browser/components/extensions/test/browser/browser_ext_tab_runtimeConnect.js
+++ b/browser/components/extensions/test/browser/browser_ext_tab_runtimeConnect.js
@@ -33,26 +33,26 @@ add_task(function* () {
             browser.test.assertTrue(!!msg.tabReceived, "'background to tab' reply port message received");
             browser.test.assertEq("background to tab port message", msg.tabReceived, "reply port content contains the message received");
 
             browser.test.notifyPass("tabRuntimeConnect.pass");
           }
         });
       });
 
-      browser.tabs.create({ url: "tab.html" },
+      browser.tabs.create({url: "tab.html"},
                           (tab) => { tabId = tab.id; });
     },
 
     files: {
       "tab.js": function() {
-        let port = browser.runtime.connect({ name: "tab-connection-name"});
+        let port = browser.runtime.connect({name: "tab-connection-name"});
         port.postMessage("tab to background port message");
         port.onMessage.addListener((msg) => {
-          port.postMessage({ tabReceived: msg });
+          port.postMessage({tabReceived: msg});
         });
       },
       "tab.html": `
         <!DOCTYPE html>
         <html>
           <head>
             <title>test tab extension page</title>
             <meta charset="utf-8">
--- a/browser/components/extensions/test/browser/browser_ext_tabs_audio.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_audio.js
@@ -44,36 +44,36 @@ add_task(function* () {
         deferred[tabId] = {resolve, reject};
         browser.test.sendMessage("change-tab", tabId, attr, on);
       });
     }
 
 
     let windowId;
     let tabIds;
-    promiseTabs.query({ lastFocusedWindow: true }).then(tabs => {
+    promiseTabs.query({lastFocusedWindow: true}).then(tabs => {
       browser.test.assertEq(tabs.length, 3, "We have three tabs");
 
       for (let tab of tabs) {
         // Note: We want to check that these are actual boolean values, not
         // just that they evaluate as false.
         browser.test.assertEq(false, tab.mutedInfo.muted, "Tab is not muted");
         browser.test.assertEq(undefined, tab.mutedInfo.reason, "Tab has no muted info reason");
         browser.test.assertEq(false, tab.audible, "Tab is not audible");
       }
 
       windowId = tabs[0].windowId;
       tabIds = [tabs[1].id, tabs[2].id];
 
       browser.test.log("Test initial queries for muted and audible return no tabs");
       return Promise.all([
-        promiseTabs.query({ windowId, audible: false }),
-        promiseTabs.query({ windowId, audible: true }),
-        promiseTabs.query({ windowId, muted: true }),
-        promiseTabs.query({ windowId, muted: false }),
+        promiseTabs.query({windowId, audible: false}),
+        promiseTabs.query({windowId, audible: true}),
+        promiseTabs.query({windowId, muted: true}),
+        promiseTabs.query({windowId, muted: false}),
       ]);
     }).then(([silent, audible, muted, nonMuted]) => {
       browser.test.assertEq(3, silent.length, "Three silent tabs");
       browser.test.assertEq(0, audible.length, "No audible tabs");
 
       browser.test.assertEq(0, muted.length, "No muted tabs");
       browser.test.assertEq(3, nonMuted.length, "Three non-muted tabs");
 
@@ -90,20 +90,20 @@ add_task(function* () {
         browser.test.assertEq("user", obj.mutedInfo.reason, "Tab was muted by the user");
       }
 
       browser.test.assertEq(true, audible.changeInfo.audible, "Tab audible state changed");
       browser.test.assertEq(true, audible.tab.audible, "Tab is audible");
 
       browser.test.log("Re-check queries. Expect one audible and one muted tab");
       return Promise.all([
-        promiseTabs.query({ windowId, audible: false }),
-        promiseTabs.query({ windowId, audible: true }),
-        promiseTabs.query({ windowId, muted: true }),
-        promiseTabs.query({ windowId, muted: false }),
+        promiseTabs.query({windowId, audible: false}),
+        promiseTabs.query({windowId, audible: true}),
+        promiseTabs.query({windowId, muted: true}),
+        promiseTabs.query({windowId, muted: false}),
       ]);
     }).then(([silent, audible, muted, nonMuted]) => {
       browser.test.assertEq(2, silent.length, "Two silent tabs");
       browser.test.assertEq(1, audible.length, "One audible tab");
 
       browser.test.assertEq(1, muted.length, "One muted tab");
       browser.test.assertEq(2, nonMuted.length, "Two non-muted tabs");
 
@@ -111,18 +111,18 @@ add_task(function* () {
       browser.test.assertEq("user", muted[0].mutedInfo.reason, "Tab was muted by the user");
 
       browser.test.assertEq(true, audible[0].audible, "Tab is audible");
 
       browser.test.log("Toggle muted internally on two tabs, and check results");
       return Promise.all([
         promiseUpdated(tabIds[0], "mutedInfo"),
         promiseUpdated(tabIds[1], "mutedInfo"),
-        promiseTabs.update(tabIds[0], { muted: false }),
-        promiseTabs.update(tabIds[1], { muted: true }),
+        promiseTabs.update(tabIds[0], {muted: false}),
+        promiseTabs.update(tabIds[1], {muted: true}),
       ]);
     }).then(([unmuted, muted]) => {
       for (let obj of [unmuted.changeInfo, unmuted.tab]) {
         browser.test.assertEq(false, obj.mutedInfo.muted, "Tab is not muted");
       }
       for (let obj of [muted.changeInfo, muted.tab]) {
         browser.test.assertEq(true, obj.mutedInfo.muted, "Tab is muted");
       }
--- a/browser/components/extensions/test/browser/browser_ext_tabs_captureVisibleTab.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_captureVisibleTab.js
@@ -34,38 +34,38 @@ function* runTest(options) {
         return new Promise(resolve => {
           browser.tabs[method](...args, resolve);
         });
       };
     });
 
     browser.test.log(`Test color ${options.color} at fullZoom=${options.fullZoom}`);
 
-    promiseTabs.query({ currentWindow: true, active: true }).then(([tab]) => {
+    promiseTabs.query({currentWindow: true, active: true}).then(([tab]) => {
       return Promise.all([
-        promiseTabs.captureVisibleTab(tab.windowId, { format: "jpeg", quality: 95 }),
-        promiseTabs.captureVisibleTab(tab.windowId, { format: "png", quality: 95 }),
-        promiseTabs.captureVisibleTab(tab.windowId, { quality: 95 }),
+        promiseTabs.captureVisibleTab(tab.windowId, {format: "jpeg", quality: 95}),
+        promiseTabs.captureVisibleTab(tab.windowId, {format: "png", quality: 95}),
+        promiseTabs.captureVisibleTab(tab.windowId, {quality: 95}),
         promiseTabs.captureVisibleTab(tab.windowId),
       ]).then(([jpeg, png, ...pngs]) => {
         browser.test.assertTrue(pngs.every(url => url == png), "All PNGs are identical");
 
         browser.test.assertTrue(jpeg.startsWith("data:image/jpeg;base64,"), "jpeg is JPEG");
         browser.test.assertTrue(png.startsWith("data:image/png;base64,"), "png is PNG");
 
         let promises = [jpeg, png].map(url => new Promise(resolve => {
           let img = new Image();
           img.src = url;
           img.onload = () => resolve(img);
         }));
         return Promise.all(promises);
       }).then(([jpeg, png]) => {
         let tabDims = `${tab.width}\u00d7${tab.height}`;
 
-        let images = { jpeg, png };
+        let images = {jpeg, png};
         for (let format of Object.keys(images)) {
           let img = images[format];
 
           let dims = `${img.width}\u00d7${img.height}`;
           browser.test.assertEq(tabDims, dims, `${format} dimensions are correct`);
 
           let canvas = document.createElement("canvas");
           canvas.width = img.width;
@@ -73,27 +73,27 @@ function* runTest(options) {
           canvas.mozOpaque = true;
 
           let ctx = canvas.getContext("2d");
           ctx.drawImage(img, 0, 0);
 
           // Check the colors of the first and last pixels of the image, to make
           // sure we capture the entire frame, and scale it correctly.
           let coords = [
-            { x: 0, y: 0,
-              color: options.color },
-            { x: img.width - 1,
-              y: img.height - 1,
-              color: options.color },
-            { x: img.width / 2 | 0,
-              y: img.height / 2 | 0,
-              color: options.neutral },
+            {x: 0, y: 0,
+             color: options.color},
+            {x: img.width - 1,
+             y: img.height - 1,
+             color: options.color},
+            {x: img.width / 2 | 0,
+             y: img.height / 2 | 0,
+             color: options.neutral},
           ];
 
-          for (let { x, y, color } of coords) {
+          for (let {x, y, color} of coords) {
             let imageData = ctx.getImageData(x, y, 1, 1).data;
 
             if (format == "png") {
               browser.test.assertEq(`rgba(${color},255)`, `rgba(${[...imageData]})`, `${format} image color is correct at (${x}, ${y})`);
             } else {
               // Allow for some deviation in JPEG version due to lossy compression.
               const SLOP = 2;
 
@@ -128,33 +128,33 @@ function* runTest(options) {
   yield extension.awaitFinish("captureVisibleTab");
 
   yield extension.unload();
 
   yield BrowserTestUtils.removeTab(tab);
 }
 
 add_task(function* testCaptureVisibleTab() {
-  yield runTest({ color: [0, 0, 0], fullZoom: 1 });
+  yield runTest({color: [0, 0, 0], fullZoom: 1});
 
-  yield runTest({ color: [0, 0, 0], fullZoom: 2 });
+  yield runTest({color: [0, 0, 0], fullZoom: 2});
 
-  yield runTest({ color: [0, 0, 0], fullZoom: 0.5 });
+  yield runTest({color: [0, 0, 0], fullZoom: 0.5});
 
-  yield runTest({ color: [255, 255, 255], fullZoom: 1 });
+  yield runTest({color: [255, 255, 255], fullZoom: 1});
 });
 
 add_task(function* testCaptureVisibleTabPermissions() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "permissions": ["tabs"],
     },
 
     background: function(x) {
-      browser.tabs.query({ currentWindow: true, active: true }, tab => {
+      browser.tabs.query({currentWindow: true, active: true}, tab => {
         browser.tabs.captureVisibleTab(tab.windowId).then(
           () => {
             browser.test.notifyFail("captureVisibleTabPermissions");
           },
           (e) => {
             browser.test.assertEq("The <all_urls> permission is required to use the captureVisibleTab API",
                                   e.message, "Expected permissions error message");
             browser.test.notifyPass("captureVisibleTabPermissions");
--- a/browser/components/extensions/test/browser/browser_ext_tabs_create.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_create.js
@@ -14,17 +14,17 @@ add_task(function* () {
   registerCleanupFunction(() => {
     SpecialPowers.clearUserPref("browser.newtab.preload");
   });
 
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "permissions": ["tabs"],
 
-      "background": { "page": "bg/background.html" },
+      "background": {"page": "bg/background.html"},
     },
 
     files: {
       "bg/blank.html": `<html><head><meta charset="utf-8"></head></html>`,
 
       "bg/background.html": `<html><head>
         <meta charset="utf-8">
         <script src="background.js"></script>
@@ -40,58 +40,58 @@ add_task(function* () {
             windowId: activeWindow,
             active: true,
             pinned: false,
             url: "about:newtab",
           };
 
           let tests = [
             {
-              create: { url: "http://example.com/" },
-              result: { url: "http://example.com/" },
+              create: {url: "http://example.com/"},
+              result: {url: "http://example.com/"},
             },
             {
-              create: { url: "blank.html" },
-              result: { url: browser.runtime.getURL("bg/blank.html") },
+              create: {url: "blank.html"},
+              result: {url: browser.runtime.getURL("bg/blank.html")},
             },
             {
               create: {},
-              result: { url: "about:newtab" },
+              result: {url: "about:newtab"},
             },
             {
-              create: { active: false },
-              result: { active: false },
+              create: {active: false},
+              result: {active: false},
             },
             {
-              create: { active: true },
-              result: { active: true },
+              create: {active: true},
+              result: {active: true},
             },
             {
-              create: { pinned: true },
-              result: { pinned: true, index: 0 },
+              create: {pinned: true},
+              result: {pinned: true, index: 0},
             },
             {
-              create: { pinned: true, active: true },
-              result: { pinned: true, active: true, index: 0 },
+              create: {pinned: true, active: true},
+              result: {pinned: true, active: true, index: 0},
             },
             {
-              create: { pinned: true, active: false },
-              result: { pinned: true, active: false, index: 0 },
+              create: {pinned: true, active: false},
+              result: {pinned: true, active: false, index: 0},
             },
             {
-              create: { index: 1 },
-              result: { index: 1 },
+              create: {index: 1},
+              result: {index: 1},
             },
             {
-              create: { index: 1, active: false },
-              result: { index: 1, active: false },
+              create: {index: 1, active: false},
+              result: {index: 1, active: false},
             },
             {
-              create: { windowId: activeWindow },
-              result: { windowId: activeWindow },
+              create: {windowId: activeWindow},
+              result: {windowId: activeWindow},
             },
           ];
 
           function nextTest() {
             if (!tests.length) {
               browser.test.notifyPass("tabs.create");
               return;
             }
@@ -136,26 +136,26 @@ add_task(function* () {
               }
 
               return updatedPromise;
             }).then(url => {
               browser.test.assertEq(expected.url, url, `Expected value for tab.url`);
 
               return browser.tabs.remove(tabId);
             }).then(() => {
-              return browser.tabs.update(activeTab, { active: true });
+              return browser.tabs.update(activeTab, {active: true});
             }).then(() => {
               nextTest();
             });
           }
 
           nextTest();
         }
 
-        browser.tabs.query({ active: true, currentWindow: true }, tabs => {
+        browser.tabs.query({active: true, currentWindow: true}, tabs => {
           activeTab = tabs[0].id;
           activeWindow = tabs[0].windowId;
 
           runTests();
         });
       },
     },
   });
--- a/browser/components/extensions/test/browser/browser_ext_tabs_executeScript_bad.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_executeScript_bad.js
@@ -9,17 +9,17 @@ function* testHasNoPermission(params) {
     browser.runtime.onMessage.addListener((msg, sender) => {
       browser.test.assertEq(msg, "second script ran", "second script ran");
       browser.test.notifyPass("executeScript");
     });
 
     browser.test.onMessage.addListener(msg => {
       browser.test.assertEq(msg, "execute-script");
 
-      browser.tabs.query({ currentWindow: true }, tabs => {
+      browser.tabs.query({currentWindow: true}, tabs => {
         browser.tabs.executeScript({
           file: "script.js",
         });
 
         // Execute a script we know we have permissions for in the
         // second tab, in the hopes that it will execute after the
         // first one. This has intermittent failure written all over
         // it, but it's just about the best we can do until we
@@ -65,22 +65,22 @@ function* testHasNoPermission(params) {
 }
 
 add_task(function* testBadPermissions() {
   let tab1 = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
   let tab2 = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://mochi.test:8888/");
 
   info("Test no special permissions");
   yield testHasNoPermission({
-    manifest: { "permissions": ["http://example.com/"] },
+    manifest: {"permissions": ["http://example.com/"]},
   });
 
   info("Test tabs permissions");
   yield testHasNoPermission({
-    manifest: { "permissions": ["http://example.com/", "tabs"] },
+    manifest: {"permissions": ["http://example.com/", "tabs"]},
   });
 
   info("Test active tab, browser action, no click");
   yield testHasNoPermission({
     manifest: {
       "permissions": ["http://example.com/", "activeTab"],
       "browser_action": {},
     },
@@ -89,31 +89,31 @@ add_task(function* testBadPermissions() 
   info("Test active tab, page action, no click");
   yield testHasNoPermission({
     manifest: {
       "permissions": ["http://example.com/", "activeTab"],
       "page_action": {},
     },
     contentSetup() {
       return new Promise(resolve => {
-        browser.tabs.query({ active: true, currentWindow: true }, tabs => {
+        browser.tabs.query({active: true, currentWindow: true}, tabs => {
           browser.pageAction.show(tabs[0].id);
           resolve();
         });
       });
     },
   });
 
   yield BrowserTestUtils.removeTab(tab2);
   yield BrowserTestUtils.removeTab(tab1);
 });
 
 add_task(function* testBadURL() {
   function background() {
-    browser.tabs.query({ currentWindow: true }, tabs => {
+    browser.tabs.query({currentWindow: true}, tabs => {
       let promises = [
         new Promise(resolve => {
           browser.tabs.executeScript({
             file: "http://example.com/script.js",
           }, result => {
             browser.test.assertEq(undefined, result, "Result value");
 
             browser.test.assertTrue(browser.extension.lastError instanceof Error,
--- a/browser/components/extensions/test/browser/browser_ext_tabs_executeScript_good.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_executeScript_good.js
@@ -56,27 +56,27 @@ function* testHasPermission(params) {
   yield extension.unload();
 }
 
 add_task(function* testGoodPermissions() {
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://mochi.test:8888/", true);
 
   info("Test explicit host permission");
   yield testHasPermission({
-    manifest: { "permissions": ["http://mochi.test/"] },
+    manifest: {"permissions": ["http://mochi.test/"]},
   });
 
   info("Test explicit host subdomain permission");
   yield testHasPermission({
-    manifest: { "permissions": ["http://*.mochi.test/"] },
+    manifest: {"permissions": ["http://*.mochi.test/"]},
   });
 
   info("Test explicit <all_urls> permission");
   yield testHasPermission({
-    manifest: { "permissions": ["<all_urls>"] },
+    manifest: {"permissions": ["<all_urls>"]},
   });
 
   info("Test activeTab permission with a browser action click");
   yield testHasPermission({
     manifest: {
       "permissions": ["activeTab"],
       "browser_action": {},
     },
@@ -93,69 +93,69 @@ add_task(function* testGoodPermissions()
   info("Test activeTab permission with a page action click");
   yield testHasPermission({
     manifest: {
       "permissions": ["activeTab"],
       "page_action": {},
     },
     contentSetup() {
       return new Promise(resolve => {
-        browser.tabs.query({ active: true, currentWindow: true }, tabs => {
+        browser.tabs.query({active: true, currentWindow: true}, tabs => {
           browser.pageAction.show(tabs[0].id);
           resolve();
         });
       });
     },
     setup: clickPageAction,
     tearDown: closePageAction,
   });
 
   info("Test activeTab permission with a browser action w/popup click");
   yield testHasPermission({
     manifest: {
       "permissions": ["activeTab"],
-      "browser_action": { "default_popup": "_blank.html" },
+      "browser_action": {"default_popup": "_blank.html"},
     },
     setup: clickBrowserAction,
     tearDown: closeBrowserAction,
   });
 
   info("Test activeTab permission with a page action w/popup click");
   yield testHasPermission({
     manifest: {
       "permissions": ["activeTab"],
-      "page_action": { "default_popup": "_blank.html" },
+      "page_action": {"default_popup": "_blank.html"},
     },
     contentSetup() {
       return new Promise(resolve => {
-        browser.tabs.query({ active: true, currentWindow: true }, tabs => {
+        browser.tabs.query({active: true, currentWindow: true}, tabs => {
           browser.pageAction.show(tabs[0].id);
           resolve();
         });
       });
     },
     setup: clickPageAction,
     tearDown: closePageAction,
   });
 
   info("Test activeTab permission with a context menu click");
   yield testHasPermission({
     manifest: {
       "permissions": ["activeTab", "contextMenus"],
     },
     contentSetup() {
-      browser.contextMenus.create({ title: "activeTab", contexts: ["all"] });
+      browser.contextMenus.create({title: "activeTab", contexts: ["all"]});
       return Promise.resolve();
     },
     setup: function* (extension) {
       let contextMenu = document.getElementById("contentAreaContextMenu");
       let awaitPopupShown = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
       let awaitPopupHidden = BrowserTestUtils.waitForEvent(contextMenu, "popuphidden");
 
-      yield BrowserTestUtils.synthesizeMouseAtCenter("a[href]", { type: "contextmenu", button: 2 },
+      yield BrowserTestUtils.synthesizeMouseAtCenter("a[href]", {type: "contextmenu", button: 2},
                                                      gBrowser.selectedBrowser);
       yield awaitPopupShown;
 
       let item = contextMenu.querySelector("[label=activeTab]");
 
       yield EventUtils.synthesizeMouseAtCenter(item, {}, window);
 
       yield awaitPopupHidden;
--- a/browser/components/extensions/test/browser/browser_ext_tabs_getCurrent.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_getCurrent.js
@@ -2,41 +2,41 @@
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
 add_task(function* () {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "permissions": ["tabs"],
 
-      "browser_action": { "default_popup": "popup.html" },
+      "browser_action": {"default_popup": "popup.html"},
     },
 
     files: {
       "tab.js": function() {
         let url = document.location.href;
 
         browser.tabs.getCurrent(currentTab => {
           browser.test.assertEq(currentTab.url, url, "getCurrent in non-active background tab");
 
           // Activate the tab.
-          browser.tabs.onActivated.addListener(function listener({ tabId }) {
+          browser.tabs.onActivated.addListener(function listener({tabId}) {
             if (tabId == currentTab.id) {
               browser.tabs.onActivated.removeListener(listener);
 
               browser.tabs.getCurrent(currentTab => {
                 browser.test.assertEq(currentTab.id, tabId, "in active background tab");
                 browser.test.assertEq(currentTab.url, url, "getCurrent in non-active background tab");
 
                 browser.test.sendMessage("tab-finished");
                 browser.tabs.remove(tabId);
               });
             }
           });
-          browser.tabs.update(currentTab.id, { active: true });
+          browser.tabs.update(currentTab.id, {active: true});
         });
       },
 
       "popup.js": function() {
         browser.tabs.getCurrent(tab => {
           browser.test.assertEq(tab, undefined, "getCurrent in popup script");
           browser.test.sendMessage("popup-finished");
         });
@@ -47,17 +47,17 @@ add_task(function* () {
     },
 
     background: function() {
       browser.tabs.getCurrent(tab => {
         browser.test.assertEq(tab, undefined, "getCurrent in background script");
         browser.test.sendMessage("background-finished");
       });
 
-      browser.tabs.create({ url: "tab.html", active: false });
+      browser.tabs.create({url: "tab.html", active: false});
     },
   });
 
   yield extension.startup();
 
   yield extension.awaitMessage("background-finished");
   yield extension.awaitMessage("tab-finished");
 
--- a/browser/components/extensions/test/browser/browser_ext_tabs_insertCSS.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_insertCSS.js
@@ -57,17 +57,17 @@ add_task(function* testExecuteScript() {
     }
 
     function next() {
       if (!promises.length) {
         browser.test.notifyPass("insertCSS");
         return;
       }
 
-      let { promise, background, foreground } = promises.shift();
+      let {promise, background, foreground} = promises.shift();
       new Promise(promise).then(() => {
         browser.tabs.executeScript({
           code: `(${checkCSS})()`,
         }, result => {
           browser.test.assertEq(background, result[0], "Expected background color");
           browser.test.assertEq(foreground, result[1], "Expected foreground color");
           next();
         });
--- a/browser/components/extensions/test/browser/browser_ext_tabs_move.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_move.js
@@ -15,17 +15,17 @@ add_task(function* () {
 
     background: function() {
       browser.tabs.query({
         lastFocusedWindow: true,
       }, function(tabs) {
         let tab = tabs[0];
         browser.tabs.move(tab.id, {index: 0});
         browser.tabs.query(
-          { lastFocusedWindow: true },
+          {lastFocusedWindow: true},
           tabs => {
             browser.test.assertEq(tabs[0].url, tab.url, "should be first tab");
             browser.test.notifyPass("tabs.move.single");
           });
       });
     },
   });
 
@@ -35,22 +35,22 @@ add_task(function* () {
 
   extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "permissions": ["tabs"],
     },
 
     background: function() {
       browser.tabs.query(
-        { lastFocusedWindow: true },
+        {lastFocusedWindow: true},
         tabs => {
           tabs.sort(function(a, b) { return a.url > b.url; });
           browser.tabs.move(tabs.map(tab => tab.id), {index: 0});
           browser.tabs.query(
-            { lastFocusedWindow: true },
+            {lastFocusedWindow: true},
             tabs => {
               browser.test.assertEq(tabs[0].url, "about:blank", "should be first tab");
               browser.test.assertEq(tabs[1].url, "about:config", "should be second tab");
               browser.test.assertEq(tabs[2].url, "about:robots", "should be third tab");
               browser.test.notifyPass("tabs.move.multiple");
             });
         });
     },
@@ -62,23 +62,23 @@ add_task(function* () {
 
   extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "permissions": ["tabs"],
     },
 
     background: function() {
       browser.tabs.query(
-        { lastFocusedWindow: true },
+        {lastFocusedWindow: true},
         tabs => {
           let tab = tabs[0];
           // Assuming that tab.id of 12345 does not exist.
           browser.tabs.move([12345, tab.id], {index: 0});
           browser.tabs.query(
-            { lastFocusedWindow: true },
+            {lastFocusedWindow: true},
             tabs => {
               browser.test.assertEq(tabs[0].url, tab.url, "should be first tab");
               browser.test.notifyPass("tabs.move.invalid");
             });
         });
     },
   });
 
@@ -88,22 +88,22 @@ add_task(function* () {
 
   extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "permissions": ["tabs"],
     },
 
     background: function() {
       browser.tabs.query(
-        { lastFocusedWindow: true },
+        {lastFocusedWindow: true},
         tabs => {
           let tab = tabs[0];
           browser.tabs.move(tab.id, {index: -1});
           browser.tabs.query(
-            { lastFocusedWindow: true },
+            {lastFocusedWindow: true},
             tabs => {
               browser.test.assertEq(tabs[2].url, tab.url, "should be last tab");
               browser.test.notifyPass("tabs.move.last");
             });
         });
     },
   });
 
--- a/browser/components/extensions/test/browser/browser_ext_tabs_move_window.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_move_window.js
@@ -16,17 +16,17 @@ add_task(function* () {
       browser.tabs.query({
         url: "<all_urls>",
       }, function(tabs) {
         let destination = tabs[0];
         let source = tabs[1]; // skip over about:blank in window1
         browser.tabs.move(source.id, {windowId: destination.windowId, index: 0});
 
         browser.tabs.query(
-          { url: "<all_urls>" },
+          {url: "<all_urls>"},
           tabs => {
             browser.test.assertEq(tabs[0].url, "http://example.com/");
             browser.test.assertEq(tabs[0].windowId, destination.windowId);
             browser.test.notifyPass("tabs.move.window");
           });
       });
     },
   });
@@ -49,24 +49,24 @@ add_task(function* () {
 
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "permissions": ["tabs"],
     },
 
     background: function() {
       browser.tabs.query(
-        { url: "<all_urls>" },
+        {url: "<all_urls>"},
         tabs => {
           let destination = tabs[0];
           let source = tabs[1]; // remember, pinning moves it to the left.
           browser.tabs.move(source.id, {windowId: destination.windowId, index: 0});
 
           browser.tabs.query(
-            { url: "<all_urls>" },
+            {url: "<all_urls>"},
             tabs => {
               browser.test.assertEq(true, tabs[0].pinned);
               browser.test.notifyPass("tabs.move.pin");
             });
         });
     },
   });
 
@@ -89,23 +89,23 @@ add_task(function* () {
 
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "permissions": ["tabs"],
     },
 
     background: function() {
       browser.tabs.query(
-        { url: "<all_urls>" },
+        {url: "<all_urls>"},
         tabs => {
           let move1 = tabs[1];
           let move3 = tabs[3];
           browser.tabs.move([move1.id, move3.id], {index: 0});
           browser.tabs.query(
-            { url: "<all_urls>" },
+            {url: "<all_urls>"},
             tabs => {
               browser.test.assertEq(tabs[0].url, move1.url);
               browser.test.assertEq(tabs[2].url, move3.url);
               browser.test.notifyPass("tabs.move.multiple");
             });
         });
     },
   });
--- a/browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js
@@ -18,19 +18,19 @@ add_task(function* () {
         "run_at": "document_start",
       }],
     },
 
     background: function() {
       let pageURL = "http://mochi.test:8888/browser/browser/components/extensions/test/browser/context_tabs_onUpdated_page.html";
 
       let expectedSequence = [
-        { status: "loading" },
-        { status: "loading", url: pageURL },
-        { status: "complete" },
+        {status: "loading"},
+        {status: "loading", url: pageURL},
+        {status: "complete"},
       ];
       let collectedSequence = [];
 
       browser.tabs.onUpdated.addListener(function(tabId, updatedInfo) {
         collectedSequence.push(updatedInfo);
       });
 
       browser.runtime.onMessage.addListener(function() {
@@ -55,17 +55,17 @@ add_task(function* () {
               );
             }
           }
         }
 
         browser.test.notifyPass("tabs.onUpdated");
       });
 
-      browser.tabs.create({ url: pageURL });
+      browser.tabs.create({url: pageURL});
     },
     files: {
       "content-script.js": `
         window.addEventListener("message", function(evt) {
           if (evt.data == "frame-updated") {
             browser.runtime.sendMessage("load-completed");
           }
         }, true);
--- a/browser/components/extensions/test/browser/browser_ext_tabs_sendMessage.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_sendMessage.js
@@ -4,17 +4,17 @@
 
 add_task(function* tabsSendMessageNoExceptionOnNonExistentTab() {
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "permissions": ["tabs"],
     },
 
     background: function() {
-      browser.tabs.create({ url: "about:robots"}, tab => {
+      browser.tabs.create({url: "about:robots"}, tab => {
         let exception;
         try {
           browser.tabs.sendMessage(tab.id, "message");
           browser.tabs.sendMessage(tab.id + 100, "message");
         } catch (e) {
           exception = e;
         }
 
--- a/browser/components/extensions/test/browser/browser_ext_webNavigation_getFrames.js
+++ b/browser/components/extensions/test/browser/browser_ext_webNavigation_getFrames.js
@@ -3,25 +3,25 @@
 "use strict";
 
 add_task(function* testWebNavigationGetNonExistentTab() {
   let extension = ExtensionTestUtils.loadExtension({
     background: "(" + function() {
       let results = [
         // There is no "tabId = 0" because the id assigned by TabManager (defined in ext-utils.js)
         // starts from 1.
-        browser.webNavigation.getAllFrames({ tabId: 0 }).then(() => {
+        browser.webNavigation.getAllFrames({tabId: 0}).then(() => {
           browser.test.fail("getAllFrames Promise should be rejected on error");
         }, (error) => {
           browser.test.assertEq("No tab found with tabId: 0", error.message,
                                 "getAllFrames rejected Promise should pass the expected error");
         }),
         // There is no "tabId = 0" because the id assigned by TabManager (defined in ext-utils.js)
         // starts from 1, processId is currently marked as optional and it is ignored.
-        browser.webNavigation.getFrame({ tabId: 0, frameId: 15, processId: 20 }).then(() => {
+        browser.webNavigation.getFrame({tabId: 0, frameId: 15, processId: 20}).then(() => {
           browser.test.fail("getFrame Promise should be rejected on error");
         }, (error) => {
           browser.test.assertEq("No tab found with tabId: 0", error.message,
                                 "getFrame rejected Promise should pass the expected error");
         }),
       ];
 
       Promise.all(results).then(() => {
@@ -52,21 +52,21 @@ add_task(function* testWebNavigationFram
       browser.webNavigation.onCompleted.addListener((details) => {
         collectedDetails.push(details);
 
         if (details.frameId !== 0) {
           // wait for the top level iframe to be complete
           return;
         }
 
-        browser.webNavigation.getAllFrames({ tabId }).then((getAllFramesDetails) => {
+        browser.webNavigation.getAllFrames({tabId}).then((getAllFramesDetails) => {
           let getFramePromises = getAllFramesDetails.map((frameDetail) => {
-            let { frameId } = frameDetail;
+            let {frameId} = frameDetail;
             // processId is currently marked as optional and it is ignored.
-            return browser.webNavigation.getFrame({ tabId, frameId, processId: 0 });
+            return browser.webNavigation.getFrame({tabId, frameId, processId: 0});
           });
 
           Promise.all(getFramePromises).then((getFrameResults) => {
             browser.test.sendMessage("webNavigationFrames.done", {
               collectedDetails, getAllFramesDetails, getFrameResults,
             });
           }, () => {
             browser.test.assertTrue(false, "None of the getFrame promises should have been rejected");
@@ -76,29 +76,29 @@ add_task(function* testWebNavigationFram
           let nonExistentFrameId = Math.floor(Math.random() * 10000);
 
           // Increment the picked random nonExistentFrameId until it doesn't exists.
           while (getAllFramesDetails.filter((details) => details.frameId == nonExistentFrameId).length > 0) {
             nonExistentFrameId += 1;
           }
 
           // Check that getFrame Promise is rejected with the expected error message on nonexistent frameId.
-          browser.webNavigation.getFrame({ tabId, frameId: nonExistentFrameId, processId: 20 }).then(() => {
+          browser.webNavigation.getFrame({tabId, frameId: nonExistentFrameId, processId: 20}).then(() => {
             browser.test.fail("getFrame promise should be rejected for an unexistent frameId");
           }, (error) => {
             browser.test.assertEq(`No frame found with frameId: ${nonExistentFrameId}`, error.message,
                                   "getFrame promise should be rejected with the expected error message on unexistent frameId");
           }).then(() => {
             browser.tabs.remove(tabId);
             browser.test.sendMessage("webNavigationFrames.done");
           });
         });
       });
 
-      browser.tabs.create({ url: "tab.html" }, (tab) => {
+      browser.tabs.create({url: "tab.html"}, (tab) => {
         tabId = tab.id;
       });
     } + ")();",
     manifest: {
       permissions: ["webNavigation", "tabs"],
     },
     files: {
       "tab.html": `
--- a/toolkit/components/extensions/.eslintrc
+++ b/toolkit/components/extensions/.eslintrc
@@ -38,19 +38,22 @@
     // "arrow-body-style": [2, "as-needed"],
 
     // Require spacing around =>
     "arrow-spacing": 2,
 
     // Always require spacing around a single line block
     "block-spacing": 1,
 
+    // Forbid spaces inside the curly brackets of object literals.
+    "object-curly-spacing": [2, "never"],
+
     // Enforce one true brace style (opening brace on the same line) and avoid
     // start and end braces on the same line.
-    "brace-style": [2, "1tbs", { "allowSingleLine": true }],
+    "brace-style": [2, "1tbs", {"allowSingleLine": true}],
 
     // No space before always a space after a comma
     "comma-spacing": [2, {"before": false, "after": true}],
 
     // Commas at the end of the line not the start
     "comma-style": 2,
 
     // Don't require spaces around computed properties
@@ -64,20 +67,20 @@
 
     // Always require a trailing EOL
     "eol-last": 2,
 
     // Require function* name()
     "generator-star-spacing": [2, {"before": false, "after": true}],
 
     // Two space indent
-    "indent": [2, 2, { "SwitchCase": 1 }],
+    "indent": [2, 2, {"SwitchCase": 1}],
 
     // Space after colon not before in property declarations
-    "key-spacing": [2, { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
+    "key-spacing": [2, {"beforeColon": false, "afterColon": true, "mode": "minimum"}],
 
     // Unix linebreaks
     "linebreak-style": [2, "unix"],
 
     // Always require parenthesis for new calls
     "new-parens": 2,
 
     // Use [] instead of Array()
@@ -184,17 +187,17 @@
 
     // No unreachable statements
     "no-unreachable": 2,
 
     // No expressions where a statement is expected
     "no-unused-expressions": 2,
 
     // No declaring variables that are never used
-    "no-unused-vars": [2, { "args": "none", "varsIgnorePattern": "^(Cc|Ci|Cr|Cu|EXPORTED_SYMBOLS)$" }],
+    "no-unused-vars": [2, {"args": "none", "varsIgnorePattern": "^(Cc|Ci|Cr|Cu|EXPORTED_SYMBOLS)$"}],
 
     // No using variables before defined
     "no-use-before-define": 2,
 
     // No using with
     "no-with": 2,
 
     // Always require semicolon at end of statement
@@ -202,33 +205,33 @@
 
     // Require space after keywords
     "space-after-keywords": 2,
 
     // Require space before blocks
     "space-before-blocks": 2,
 
     // Never use spaces before function parentheses
-    "space-before-function-paren": [2, { "anonymous": "never", "named": "never" }],
+    "space-before-function-paren": [2, {"anonymous": "never", "named": "never"}],
 
     // Require spaces before finally, catch, etc.
     "space-before-keywords": [2, "always"],
 
     // No space padding in parentheses
     "space-in-parens": [2, "never"],
 
     // Require spaces around operators, except for a|0.
     "space-infix-ops": [2, {"int32Hint": true}],
 
 
     // Require spaces after return, throw and case
     "space-return-throw-case": 2,
 
     // ++ and -- should not need spacing
-    "space-unary-ops": [1, { "nonwords": false }],
+    "space-unary-ops": [1, {"nonwords": false}],
 
     // No comparisons to NaN
     "use-isnan": 2,
 
     // Only check typeof against valid results
     "valid-typeof": 2,
 
     // Disallow using variables outside the blocks they are defined (especially
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -411,17 +411,17 @@ GlobalManager = {
             let promise;
             try {
               promise = findPath(path)[name](...args);
             } catch (e) {
               if (e instanceof context.cloneScope.Error) {
                 promise = Promise.reject(e);
               } else {
                 Cu.reportError(e);
-                promise = Promise.reject({ message: "An unexpected error occurred" });
+                promise = Promise.reject({message: "An unexpected error occurred"});
               }
             }
 
             return context.wrapPromise(promise || Promise.resolve(), callback);
           },
 
           getProperty(path, name) {
             return findPath(path)[name];
@@ -446,17 +446,17 @@ GlobalManager = {
 
       injectObject("browser", null);
       injectObject("chrome", () => {});
     };
 
     let id = ExtensionManagement.getAddonIdForWindow(contentWindow);
 
     // We don't inject privileged APIs into sub-frames of a UI page.
-    const { FULL_PRIVILEGES } = ExtensionManagement.API_LEVELS;
+    const {FULL_PRIVILEGES} = ExtensionManagement.API_LEVELS;
     if (ExtensionManagement.getAPILevelForWindow(contentWindow, id) !== FULL_PRIVILEGES) {
       return;
     }
 
     // We don't inject privileged APIs if the addonId is null
     // or doesn't exist.
     if (!this.extensionMap.has(id)) {
       return;
@@ -606,17 +606,17 @@ ExtensionData.prototype = {
 
       NetUtil.asyncFetch({uri, loadUsingSystemPrincipal: true}, (inputStream, status) => {
         if (!Components.isSuccessCode(status)) {
           reject(new Error(status));
           return;
         }
         try {
           let text = NetUtil.readInputStreamToString(inputStream, inputStream.available(),
-                                                     { charset: "utf-8" });
+                                                     {charset: "utf-8"});
           resolve(JSON.parse(text));
         } catch (e) {
           reject(e);
         }
       });
     });
   },
 
@@ -763,17 +763,17 @@ ExtensionData.prototype = {
   // If no locales are unavailable, resolves to |null|.
   initLocale: Task.async(function* (locale = this.defaultLocale) {
     if (locale == null) {
       return null;
     }
 
     let promises = [this.readLocaleFile(locale)];
 
-    let { defaultLocale } = this;
+    let {defaultLocale} = this;
     if (locale != defaultLocale && !this.localeData.has(defaultLocale)) {
       promises.push(this.readLocaleFile(defaultLocale));
     }
 
     let results = yield Promise.all(promises);
 
     this.localeData.selectedLocale = locale;
     return results[0];
@@ -1095,17 +1095,17 @@ Extension.prototype = extend(Object.crea
   // Reads the locale file for the given Gecko-compatible locale code, or if
   // no locale is given, the available locale closest to the UI locale.
   // Sets the currently selected locale on success.
   initLocale: Task.async(function* (locale = undefined) {
     if (locale === undefined) {
       let locales = yield this.promiseLocales();
 
       let localeList = Array.from(locales.keys(), locale => {
-        return { name: locale, locales: [locale] };
+        return {name: locale, locales: [locale]};
       });
 
       let match = Locale.findClosestLocale(localeList);
       locale = match ? match.name : this.defaultLocale;
     }
 
     return ExtensionData.prototype.initLocale.call(this, locale);
   }),
@@ -1188,17 +1188,17 @@ Extension.prototype = extend(Object.crea
     for (let obj of this.onShutdown) {
       obj.close();
     }
 
     Management.emit("shutdown", this);
 
     Services.ppmm.broadcastAsyncMessage("Extension:Shutdown", {id: this.id});
 
-    MessageChannel.abortResponses({ extensionId: this.id });
+    MessageChannel.abortResponses({extensionId: this.id});
 
     ExtensionManagement.shutdownExtension(this.uuid);
 
     this.cleanupGeneratedFile();
   },
 
   observe(subject, topic, data) {
     if (topic == "xpcom-shutdown") {
--- a/toolkit/components/extensions/ExtensionContent.jsm
+++ b/toolkit/components/extensions/ExtensionContent.jsm
@@ -238,17 +238,17 @@ var ExtensionManager;
 
 // Scope in which extension content script code can run. It uses
 // Cu.Sandbox to run the code. There is a separate scope for each
 // frame.
 class ExtensionContext extends BaseContext {
   constructor(extensionId, contentWindow, contextOptions = {}) {
     super();
 
-    let { isExtensionPage } = contextOptions;
+    let {isExtensionPage} = contextOptions;
 
     this.isExtensionPage = isExtensionPage;
     this.extension = ExtensionManager.get(extensionId);
     this.extensionId = extensionId;
     this.contentWindow = contentWindow;
 
     let utils = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIDOMWindowUtils);
@@ -336,18 +336,18 @@ class ExtensionContext extends BaseConte
 
   close() {
     super.unload();
 
     // Overwrite the content script APIs with an empty object if the APIs objects are still
     // defined in the content window (See Bug 1214658 for rationale).
     if (this.isExtensionPage && !Cu.isDeadWrapper(this.contentWindow) &&
         Cu.waiveXrays(this.contentWindow).browser === this.chromeObj) {
-      Cu.createObjectIn(this.contentWindow, { defineAs: "browser" });
-      Cu.createObjectIn(this.contentWindow, { defineAs: "chrome" });
+      Cu.createObjectIn(this.contentWindow, {defineAs: "browser"});
+      Cu.createObjectIn(this.contentWindow, {defineAs: "chrome"});
     }
     Cu.nukeSandbox(this.sandbox);
     this.sandbox = null;
   }
 }
 
 function windowId(window) {
   return window.QueryInterface(Ci.nsIInterfaceRequestor)
@@ -399,33 +399,33 @@ var DocumentManager = {
       // was called on (i.e., not frames for social or sidebars).
       let mm = getWindowMessageManager(window);
       if (!mm || !ExtensionContent.globals.has(mm)) {
         return;
       }
 
       // Enable the content script APIs should be available in subframes' window
       // if it is recognized as a valid addon id (see Bug 1214658 for rationale).
-      const { CONTENTSCRIPT_PRIVILEGES } = ExtensionManagement.API_LEVELS;
+      const {CONTENTSCRIPT_PRIVILEGES} = ExtensionManagement.API_LEVELS;
       let extensionId = ExtensionManagement.getAddonIdForWindow(window);
 
       if (ExtensionManagement.getAPILevelForWindow(window, extensionId) == CONTENTSCRIPT_PRIVILEGES &&
           ExtensionManager.get(extensionId)) {
         DocumentManager.getExtensionPageContext(extensionId, window);
       }
 
       this.trigger("document_start", window);
       /* eslint-disable mozilla/balanced-listeners */
       window.addEventListener("DOMContentLoaded", this, true);
       window.addEventListener("load", this, true);
       /* eslint-enable mozilla/balanced-listeners */
     } else if (topic == "inner-window-destroyed") {
       let windowId = subject.QueryInterface(Ci.nsISupportsPRUint64).data;
 
-      MessageChannel.abortResponses({ innerWindowID: windowId });
+      MessageChannel.abortResponses({innerWindowID: windowId});
 
       // Close any existent content-script context for the destroyed window.
       if (this.contentScriptWindows.has(windowId)) {
         let extensions = this.contentScriptWindows.get(windowId);
         for (let [, context] of extensions) {
           context.close();
         }
 
@@ -501,17 +501,17 @@ var DocumentManager = {
     return extensions.get(extensionId);
   },
 
   getExtensionPageContext(extensionId, window) {
     let winId = windowId(window);
 
     let context = this.extensionPageWindows.get(winId);
     if (!context) {
-      let context = new ExtensionContext(extensionId, window, { isExtensionPage: true });
+      let context = new ExtensionContext(extensionId, window, {isExtensionPage: true});
       this.extensionPageWindows.set(winId, context);
     }
 
     return context;
   },
 
   startupExtension(extensionId) {
     if (this.extensionCount == 0) {
@@ -548,17 +548,17 @@ var DocumentManager = {
     // Clean up iframe extension page contexts on extension shutdown.
     for (let [winId, context] of this.extensionPageWindows) {
       if (context.extensionId == extensionId) {
         context.close();
         this.extensionPageWindows.delete(winId);
       }
     }
 
-    MessageChannel.abortResponses({ extensionId });
+    MessageChannel.abortResponses({extensionId});
 
     this.extensionCount--;
     if (this.extensionCount == 0) {
       this.uninit();
     }
   },
 
   trigger(when, window) {
@@ -676,33 +676,33 @@ class ExtensionGlobal {
 
     this.broker = new MessageBroker([global]);
 
     this.windowId = global.content
                           .QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIDOMWindowUtils)
                           .outerWindowID;
 
-    global.sendAsyncMessage("Extension:TopWindowID", { windowId: this.windowId });
+    global.sendAsyncMessage("Extension:TopWindowID", {windowId: this.windowId});
   }
 
   uninit() {
-    this.global.sendAsyncMessage("Extension:RemoveTopWindowID", { windowId: this.windowId });
+    this.global.sendAsyncMessage("Extension:RemoveTopWindowID", {windowId: this.windowId});
   }
 
   get messageFilter() {
     return {
       innerWindowID: this.global.content
                          .QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsIDOMWindowUtils)
                          .currentInnerWindowID,
     };
   }
 
-  receiveMessage({ target, messageName, recipient, data }) {
+  receiveMessage({target, messageName, recipient, data}) {
     switch (messageName) {
       case "Extension:Capture":
         return this.handleExtensionCapture(data.width, data.height, data.options);
       case "Extension:Execute":
         return this.handleExtensionExecute(target, recipient, data.options);
       case "WebNavigation:GetFrame":
         return this.handleWebNavigationGetFrame(data.options);
       case "WebNavigation:GetAllFrames":
@@ -729,22 +729,22 @@ class ExtensionGlobal {
     ctx.drawWindow(win, win.scrollX, win.scrollY, win.innerWidth, win.innerHeight, "#fff");
 
     return canvas.toDataURL(`image/${options.format}`, options.quality / 100);
   }
 
   handleExtensionExecute(target, recipient, options) {
     let deferred = PromiseUtils.defer();
     let script = new Script(options, deferred);
-    let { extensionId } = recipient;
+    let {extensionId} = recipient;
     DocumentManager.executeScript(target, extensionId, script);
     return deferred.promise;
   }
 
-  handleWebNavigationGetFrame({ frameId }) {
+  handleWebNavigationGetFrame({frameId}) {
     return WebNavigationFrames.getFrame(this.global.docShell, frameId);
   }
 
   handleWebNavigationGetAllFrames() {
     return WebNavigationFrames.getAllFrames(this.global.docShell);
   }
 }
 
--- a/toolkit/components/extensions/ExtensionManagement.jsm
+++ b/toolkit/components/extensions/ExtensionManagement.jsm
@@ -223,17 +223,17 @@ const API_LEVELS = Object.freeze({
   NO_PRIVILEGES: 0,
   CONTENTSCRIPT_PRIVILEGES: 1,
   FULL_PRIVILEGES: 2,
 });
 
 // Finds the API Level ("FULL_PRIVILEGES", "CONTENTSCRIPT_PRIVILEGES", "NO_PRIVILEGES")
 // with a given a window object.
 function getAPILevelForWindow(window, addonId) {
-  const { NO_PRIVILEGES, CONTENTSCRIPT_PRIVILEGES, FULL_PRIVILEGES } = API_LEVELS;
+  const {NO_PRIVILEGES, CONTENTSCRIPT_PRIVILEGES, FULL_PRIVILEGES} = API_LEVELS;
 
   // Non WebExtension URLs and WebExtension URLs from a different extension
   // has no access to APIs.
   if (!addonId && getAddonIdForWindow(window) != addonId) {
     return NO_PRIVILEGES;
   }
 
   let docShell = window.QueryInterface(Ci.nsIInterfaceRequestor)
--- a/toolkit/components/extensions/MessageChannel.jsm
+++ b/toolkit/components/extensions/MessageChannel.jsm
@@ -144,26 +144,26 @@ class FilteringMessageManager {
 
     this.handlers = new Map();
   }
 
   /**
    * Receives a message from our message manager, maps it to a handler, and
    * passes the result to our message callback.
    */
-  receiveMessage({ data, target }) {
+  receiveMessage({data, target}) {
     let handlers = Array.from(this.getHandlers(data.messageName, data.recipient));
 
     let result = {};
     if (handlers.length == 0) {
-      result.error = { result: MessageChannel.RESULT_NO_HANDLER,
-                       message: "No matching message handler" };
+      result.error = {result: MessageChannel.RESULT_NO_HANDLER,
+                      message: "No matching message handler"};
     } else if (handlers.length > 1) {
-      result.error = { result: MessageChannel.RESULT_MULTIPLE_HANDLERS,
-                       message: `Multiple matching handlers for ${data.messageName}` };
+      result.error = {result: MessageChannel.RESULT_MULTIPLE_HANDLERS,
+                      message: `Multiple matching handlers for ${data.messageName}`};
     } else {
       result.handler = handlers[0];
     }
 
     data.target = target;
     this.callback(result, data);
   }
 
@@ -409,17 +409,17 @@ this.MessageChannel = {
    *    A structured-clone-compatible object to identify the message
    *    sender. This object may also be used as a filter to prematurely
    *    abort responses when the sender is being destroyed.
    *    @see `abortResponses`.
    * @returns Promise
    */
   sendMessage(target, messageName, data, recipient = {}, sender = {}) {
     let channelId = gChannelId++;
-    let message = { messageName, channelId, sender, recipient, data };
+    let message = {messageName, channelId, sender, recipient, data};
 
     let deferred = PromiseUtils.defer();
     deferred.messageFilter = {};
     deferred.sender = recipient;
     deferred.messageManager = target;
 
     this._addPendingResponse(deferred);
 
@@ -441,21 +441,21 @@ this.MessageChannel = {
   /**
    * Handles dispatching message callbacks from the message brokers to their
    * appropriate `MessageReceivers`, and routing the responses back to the
    * original senders.
    *
    * Each handler object is a `MessageReceiver` object as passed to
    * `addListener`.
    */
-  _handleMessage({ handler, error }, data) {
+  _handleMessage({handler, error}, data) {
     // The target passed to `receiveMessage` is sometimes a message manager
     // owner instead of a message manager, so make sure to convert it to a
     // message manager first if necessary.
-    let { target } = data;
+    let {target} = data;
     if (!(target instanceof Ci.nsIMessageSender)) {
       target = target.messageManager;
     }
 
     let deferred = {
       sender: data.sender,
       messageManager: target,
     };
@@ -508,17 +508,17 @@ this.MessageChannel = {
   },
 
   /**
    * Handles message callbacks from the response brokers.
    *
    * Each handler object is a deferred object created by `sendMessage`, and
    * should be resolved or rejected based on the contents of the response.
    */
-  _handleResponse({ handler, error }, data) {
+  _handleResponse({handler, error}, data) {
     if (error) {
       // If we have an error at this point, we have handler to report it to,
       // so just log it.
       Cu.reportError(error.message);
     } else if (data.result === this.RESULT_SUCCESS) {
       handler.resolve(data.value);
     } else {
       handler.reject(data.error);
--- a/toolkit/components/extensions/ext-alarms.js
+++ b/toolkit/components/extensions/ext-alarms.js
@@ -1,11 +1,11 @@
 "use strict";
 
-var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/ExtensionUtils.jsm");
 var {
   EventManager,
 } = ExtensionUtils;
 
 // WeakMap[Extension -> Set[Alarm]]
 var alarmsMap = new WeakMap();
--- a/toolkit/components/extensions/ext-backgroundPage.js
+++ b/toolkit/components/extensions/ext-backgroundPage.js
@@ -1,11 +1,11 @@
 "use strict";
 
-var { interfaces: Ci, utils: Cu } = Components;
+var {interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 
 // WeakMap[Extension -> BackgroundPage]
 var backgroundPagesMap = new WeakMap();
 
 // Responsible for the background_page section of the manifest.
 function BackgroundPage(options, extension) {
--- a/toolkit/components/extensions/ext-cookies.js
+++ b/toolkit/components/extensions/ext-cookies.js
@@ -1,11 +1,11 @@
 "use strict";
 
-const { interfaces: Ci, utils: Cu } = Components;
+const {interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/ExtensionUtils.jsm");
 Cu.import("resource://gre/modules/NetUtil.jsm");
 
 var {
   EventManager,
 } = ExtensionUtils;
 
@@ -275,17 +275,17 @@ extensions.registerSchemaAPI("cookies", 
         let name = details.name !== null ? details.name : "";
         let value = details.value !== null ? details.value : "";
         let secure = details.secure !== null ? details.secure : false;
         let httpOnly = details.httpOnly !== null ? details.httpOnly : false;
         let isSession = details.expirationDate === null;
         let expiry = isSession ? 0 : details.expirationDate;
         // Ignore storeID.
 
-        let cookieAttrs = { host: details.domain, path: path, isSecure: secure };
+        let cookieAttrs = {host: details.domain, path: path, isSecure: secure};
         if (!checkSetCookiePermissions(extension, uri, cookieAttrs)) {
           return Promise.reject({message: `Permission denied to set cookie ${JSON.stringify(details)}`});
         }
 
         // The permission check may have modified the domain, so use
         // the new value instead.
         Services.cookies.add(cookieAttrs.host, path, name, value,
                              secure, httpOnly, isSession, expiry);
--- a/toolkit/components/extensions/ext-downloads.js
+++ b/toolkit/components/extensions/ext-downloads.js
@@ -1,11 +1,11 @@
 "use strict";
 
-var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/ExtensionUtils.jsm");
 const {
   ignoreEvent,
 } = ExtensionUtils;
 
 extensions.registerSchemaAPI("downloads", "downloads", (extension, context) => {
   return {
--- a/toolkit/components/extensions/ext-notifications.js
+++ b/toolkit/components/extensions/ext-notifications.js
@@ -1,11 +1,11 @@
 "use strict";
 
-var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/ExtensionUtils.jsm");
 var {
   EventManager,
   ignoreEvent,
 } = ExtensionUtils;
 
 // WeakMap[Extension -> Set[Notification]]
--- a/toolkit/components/extensions/ext-runtime.js
+++ b/toolkit/components/extensions/ext-runtime.js
@@ -1,11 +1,11 @@
 "use strict";
 
-var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
                                   "resource://gre/modules/AppConstants.jsm");
 
 Cu.import("resource://gre/modules/ExtensionUtils.jsm");
 var {
   EventManager,
@@ -43,17 +43,17 @@ extensions.registerSchemaAPI("runtime", 
         } else if (args.length == 2) {
           [message, responseCallback] = args;
         } else {
           [extensionId, message, options, responseCallback] = args;
         }
         let recipient = {extensionId: extensionId ? extensionId : extension.id};
 
         if (!GlobalManager.extensionMap.has(recipient.extensionId)) {
-          return context.wrapPromise(Promise.reject({ message: "Invalid extension ID" }),
+          return context.wrapPromise(Promise.reject({message: "Invalid extension ID"}),
                                      responseCallback);
         }
         return context.messenger.sendMessage(Services.cpmm, message, recipient, responseCallback);
       },
 
       get lastError() {
         return context.lastError;
       },
@@ -90,21 +90,21 @@ extensions.registerSchemaAPI("runtime", 
         if (url.length == 0) {
           return Promise.resolve();
         }
 
         let uri;
         try {
           uri = NetUtil.newURI(url);
         } catch (e) {
-          return Promise.reject({ message: `Invalid URL: ${JSON.stringify(url)}` });
+          return Promise.reject({message: `Invalid URL: ${JSON.stringify(url)}`});
         }
 
         if (uri.scheme != "http" && uri.scheme != "https") {
-          return Promise.reject({ message: "url must have the scheme http or https" });
+          return Promise.reject({message: "url must have the scheme http or https"});
         }
 
         extension.uninstallURL = url;
         return Promise.resolve();
       },
     },
   };
 });
--- a/toolkit/components/extensions/ext-storage.js
+++ b/toolkit/components/extensions/ext-storage.js
@@ -1,11 +1,11 @@
 "use strict";
 
-var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 XPCOMUtils.defineLazyModuleGetter(this, "ExtensionStorage",
                                   "resource://gre/modules/ExtensionStorage.jsm");
 
 Cu.import("resource://gre/modules/ExtensionUtils.jsm");
 var {
   EventManager,
 } = ExtensionUtils;
--- a/toolkit/components/extensions/ext-webNavigation.js
+++ b/toolkit/components/extensions/ext-webNavigation.js
@@ -1,11 +1,11 @@
 "use strict";
 
-var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "ExtensionManagement",
                                   "resource://gre/modules/ExtensionManagement.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "MatchPattern",
                                   "resource://gre/modules/MatchPattern.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "WebNavigation",
@@ -78,38 +78,38 @@ extensions.registerSchemaAPI("webNavigat
       onDOMContentLoaded: new WebNavigationEventManager(context, "onDOMContentLoaded").api(),
       onCompleted: new WebNavigationEventManager(context, "onCompleted").api(),
       onErrorOccurred: new WebNavigationEventManager(context, "onErrorOccurred").api(),
       onReferenceFragmentUpdated: new WebNavigationEventManager(context, "onReferenceFragmentUpdated").api(),
       onCreatedNavigationTarget: ignoreEvent(context, "webNavigation.onCreatedNavigationTarget"),
       getAllFrames(details) {
         let tab = TabManager.getTab(details.tabId);
         if (!tab) {
-          return Promise.reject({ message: `No tab found with tabId: ${details.tabId}`});
+          return Promise.reject({message: `No tab found with tabId: ${details.tabId}`});
         }
 
-        let { innerWindowID, messageManager } = tab.linkedBrowser;
-        let recipient = { innerWindowID };
+        let {innerWindowID, messageManager} = tab.linkedBrowser;
+        let recipient = {innerWindowID};
 
         return context.sendMessage(messageManager, "WebNavigation:GetAllFrames", {}, recipient)
                       .then((results) => results.map(convertGetFrameResult.bind(null, details.tabId)));
       },
       getFrame(details) {
         let tab = TabManager.getTab(details.tabId);
         if (!tab) {
-          return Promise.reject({ message: `No tab found with tabId: ${details.tabId}`});
+          return Promise.reject({message: `No tab found with tabId: ${details.tabId}`});
         }
 
         let recipient = {
           innerWindowID: tab.linkedBrowser.innerWindowID,
         };
 
         let mm = tab.linkedBrowser.messageManager;
-        return context.sendMessage(mm, "WebNavigation:GetFrame", { options: details }, recipient)
+        return context.sendMessage(mm, "WebNavigation:GetFrame", {options: details}, recipient)
                       .then((result) => {
                         return result ?
                           convertGetFrameResult(details.tabId, result) :
-                          Promise.reject({ message: `No frame found with frameId: ${details.frameId}`});
+                          Promise.reject({message: `No frame found with frameId: ${details.frameId}`});
                       });
       },
     },
   };
 });
--- a/toolkit/components/extensions/ext-webRequest.js
+++ b/toolkit/components/extensions/ext-webRequest.js
@@ -1,11 +1,11 @@
 "use strict";
 
-var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "MatchPattern",
                                   "resource://gre/modules/MatchPattern.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "WebRequest",
                                   "resource://gre/modules/WebRequest.jsm");
 
--- a/toolkit/components/extensions/test/mochitest/file_ext_test_api_injection.js
+++ b/toolkit/components/extensions/test/mochitest/file_ext_test_api_injection.js
@@ -1,12 +1,12 @@
 "use strict";
 
-var { interfaces: Ci } = Components;
+var {interfaces: Ci} = Components;
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 Services.console.registerListener(function listener(message) {
   if (/WebExt Privilege Escalation/.test(message.message)) {
     Services.console.unregisterListener(listener);
-    sendAsyncMessage("console-message", { message: message.message });
+    sendAsyncMessage("console-message", {message: message.message});
   }
 });
--- a/toolkit/components/extensions/test/mochitest/test_ext_background_runtime_connect_params.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_background_runtime_connect_params.html
@@ -14,17 +14,17 @@
 "use strict";
 
 function backgroundScript() {
   let detected_invalid_connect_params = 0;
   let received_ports_number = 0;
 
   const invalid_connect_params = [
     // too many params
-    ["fake-extensions-id", { name: "fake-conn-name" }, "unexpected third params"],
+    ["fake-extensions-id", {name: "fake-conn-name"}, "unexpected third params"],
     // invalid params format
     [{}, {}],
     ["fake-extensions-id", "invalid-connect-info-format"],
   ];
 
   const expected_detected_invalid_connect_params = invalid_connect_params.length;
   const expected_received_ports_number = 1;
 
@@ -51,17 +51,17 @@ function backgroundScript() {
   }
 
   browser.runtime.onConnect.addListener(countReceivedPorts);
 
   for (let params of invalid_connect_params) {
     assertInvalidConnectParamsException(params);
   }
 
-  browser.runtime.connect(browser.runtime.id, { name: "check-results"});
+  browser.runtime.connect(browser.runtime.id, {name: "check-results"});
 }
 
 let extensionData = {
   background: "(" + backgroundScript.toString() + ")()",
   manifest: {},
   files: {},
 };
 
--- a/toolkit/components/extensions/test/mochitest/test_ext_contentscript_create_iframe.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_contentscript_create_iframe.html
@@ -22,31 +22,31 @@
 </textarea>
 
 <script type="text/javascript">
 "use strict";
 
 add_task(function* test_contentscript_create_iframe() {
   function backgroundScript() {
     browser.runtime.onMessage.addListener((msg, sender) => {
-      let { name, availableAPIs, manifest, testGetManifest } = msg;
+      let {name, availableAPIs, manifest, testGetManifest} = msg;
       let hasExtTabsAPI = availableAPIs.indexOf("tabs") > 0;
       let hasExtWindowsAPI = availableAPIs.indexOf("windows") > 0;
 
       browser.test.assertFalse(hasExtTabsAPI, "the created iframe should not be able to use privileged APIs (tabs)");
       browser.test.assertFalse(hasExtWindowsAPI, "the created iframe should not be able to use privileged APIs (windows)");
 
-      let { applications: { gecko: { id: expectedManifestGeckoId } } } = chrome.runtime.getManifest();
-      let { applications: { gecko: { id: actualManifestGeckoId } } } = manifest;
+      let {applications: {gecko: {id: expectedManifestGeckoId}}} = chrome.runtime.getManifest();
+      let {applications: {gecko: {id: actualManifestGeckoId}}} = manifest;
 
       browser.test.assertEq(actualManifestGeckoId, expectedManifestGeckoId,
                             "the add-on manifest should be accessible from the created iframe"
       );
 
-      let { applications: { gecko: { id: testGetManifestGeckoId } } } = testGetManifest;
+      let {applications: {gecko: {id: testGetManifestGeckoId}}} = testGetManifest;
 
       browser.test.assertEq(testGetManifestGeckoId, expectedManifestGeckoId,
                               "GET_MANIFEST() returns manifest data before extension unload"
       );
 
       browser.test.sendMessage(name);
     });
   }
--- a/toolkit/components/extensions/test/mochitest/test_ext_cookies_permissions.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_cookies_permissions.html
@@ -31,40 +31,40 @@ function* testCookies(options) {
     let changed = [];
     browser.cookies.onChanged.addListener(event => {
       changed.push(`${event.cookie.name}:${event.cause}`);
     });
     browser.test.sendMessage("change-cookies");
 
 
     // Try to access some cookies in various ways.
-    let { url, domain, secure } = options;
+    let {url, domain, secure} = options;
 
     let failures = 0;
     let tallyFailure = error => {
       failures++;
     };
 
     awaitChanges.then(() => {
-      return browser.cookies.get({ url, name: "foo" });
+      return browser.cookies.get({url, name: "foo"});
     }).then(cookie => {
       browser.test.assertEq(options.shouldPass, cookie != null, "should pass == get cookie");
 
-      return browser.cookies.getAll({ domain });
+      return browser.cookies.getAll({domain});
     }).then(cookies => {
       if (options.shouldPass) {
         browser.test.assertEq(2, cookies.length, "expected number of cookies");
       } else {
         browser.test.assertEq(0, cookies.length, "expected number of cookies");
       }
 
       return Promise.all([
-        browser.cookies.set({ url, domain, secure, name: "foo", "value": "baz", expirationDate: options.expiry }).catch(tallyFailure),
-        browser.cookies.set({ url, domain, secure, name: "bar", "value": "quux", expirationDate: options.expiry }).catch(tallyFailure),
-        browser.cookies.remove({ url, name: "deleted" }),
+        browser.cookies.set({url, domain, secure, name: "foo", "value": "baz", expirationDate: options.expiry}).catch(tallyFailure),
+        browser.cookies.set({url, domain, secure, name: "bar", "value": "quux", expirationDate: options.expiry}).catch(tallyFailure),
+        browser.cookies.remove({url, name: "deleted"}),
       ]);
     }).then(() => {
       if (options.shouldPass) {
         // The order of eviction events isn't guaranteed, so just check that
         // it's there somewhere.
         let evicted = changed.indexOf("evicted:evicted");
         if (evicted < 0) {
           browser.test.fail("got no eviction event");
--- a/toolkit/components/extensions/test/mochitest/test_ext_i18n.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_i18n.html
@@ -57,18 +57,18 @@ add_task(function* test_i18n() {
     assertEq("$foo", values[5], "Non-placeholder token that should be ignored");
   }
 
   let extension = ExtensionTestUtils.loadExtension({
     manifest: {
       "default_locale": "jp",
 
       content_scripts: [
-        { "matches": ["http://mochi.test/*/file_sample.html"],
-          "js": ["content.js"] },
+        {"matches": ["http://mochi.test/*/file_sample.html"],
+         "js": ["content.js"]},
       ],
     },
 
 
     files: {
       "_locales/en_US/messages.json": {
         "foo": {
           "message": "Foo.",
--- a/toolkit/components/extensions/test/xpcshell/head.js
+++ b/toolkit/components/extensions/test/xpcshell/head.js
@@ -1,10 +1,10 @@
 "use strict";
 
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
+const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
                                   "resource://gre/modules/NetUtil.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Services",
                                   "resource://gre/modules/Services.jsm");
--- a/toolkit/components/extensions/test/xpcshell/test_ext_schemas.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_schemas.js
@@ -379,38 +379,38 @@ add_task(function* () {
 
   Assert.throws(() => root.testing.bar(11, true, 10),
                 /Incorrect argument types/,
                 "should throw with too many arguments");
 
   root.testing.bar(true);
   verify("call", "testing", "bar", [null, true]);
 
-  root.testing.baz({ prop1: "hello", prop2: 22 });
-  verify("call", "testing", "baz", [{ prop1: "hello", prop2: 22 }]);
+  root.testing.baz({prop1: "hello", prop2: 22});
+  verify("call", "testing", "baz", [{prop1: "hello", prop2: 22}]);
 
-  root.testing.baz({ prop1: "hello" });
-  verify("call", "testing", "baz", [{ prop1: "hello", prop2: null }]);
+  root.testing.baz({prop1: "hello"});
+  verify("call", "testing", "baz", [{prop1: "hello", prop2: null}]);
 
-  root.testing.baz({ prop1: "hello", prop2: null });
-  verify("call", "testing", "baz", [{ prop1: "hello", prop2: null }]);
+  root.testing.baz({prop1: "hello", prop2: null});
+  verify("call", "testing", "baz", [{prop1: "hello", prop2: null}]);
 
-  Assert.throws(() => root.testing.baz({ prop2: 12 }),
+  Assert.throws(() => root.testing.baz({prop2: 12}),
                 /Property "prop1" is required/,
                 "should throw without required property");
 
-  Assert.throws(() => root.testing.baz({ prop1: "hi", prop3: 12 }),
+  Assert.throws(() => root.testing.baz({prop1: "hi", prop3: 12}),
                 /Property "prop3" is unsupported by Firefox/,
                 "should throw with unsupported property");
 
-  Assert.throws(() => root.testing.baz({ prop1: "hi", prop4: 12 }),
+  Assert.throws(() => root.testing.baz({prop1: "hi", prop4: 12}),
                 /Unexpected property "prop4"/,
                 "should throw with unexpected property");
 
-  Assert.throws(() => root.testing.baz({ prop1: 12 }),
+  Assert.throws(() => root.testing.baz({prop1: 12}),
                 /Expected string instead of 12/,
                 "should throw with wrong type");
 
   root.testing.qux("value2");
   verify("call", "testing", "qux", ["value2"]);
 
   Assert.throws(() => root.testing.qux("value4"),
                 /Invalid enumeration value "value4"/,
--- a/toolkit/components/extensions/test/xpcshell/test_locale_converter.js
+++ b/toolkit/components/extensions/test/xpcshell/test_locale_converter.js
@@ -113,13 +113,13 @@ add_task(function* testInvalidUUID() {
     return e.result === Cr.NS_ERROR_INVALID_ARG && /Invalid context/.test(e);
   };
 
   Assert.throws(() => {
     convService.convert(stream, FROM_TYPE, TO_TYPE, uri);
   }, expectInvalidContextException);
 
   Assert.throws(() => {
-    let listener = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener]) };
+    let listener = {QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamListener])};
 
     convService.asyncConvertData(FROM_TYPE, TO_TYPE, listener, uri);
   }, expectInvalidContextException);
 });
--- a/toolkit/modules/addons/MatchPattern.jsm
+++ b/toolkit/modules/addons/MatchPattern.jsm
@@ -148,17 +148,17 @@ MatchPattern.prototype = {
     // for. This means that our normal host matching checks won't work,
     // since the pattern "*://*.foo.example.com/" doesn't match ".example.com",
     // but it does match "bar.foo.example.com", which can read cookies
     // with the domain ".example.com".
     //
     // So, instead, we need to manually check our filters, and accept any
     // with hosts that end with our cookie's host.
 
-    let { host, isSecure } = cookie;
+    let {host, isSecure} = cookie;
 
     for (let matcher of this.matchers) {
       let schemes = matcher.schemes;
       if (schemes.includes("https") || (!isSecure && schemes.includes("http"))) {
         if (matcher.host.endsWith(host)) {
           return true;
         }
       }
--- a/toolkit/modules/addons/WebRequest.jsm
+++ b/toolkit/modules/addons/WebRequest.jsm
@@ -427,17 +427,17 @@ HttpObserverManager = {
       }
     }
 
     this.runChannelListener(channel, loadContext, "headersReceived");
   },
 
   onChannelReplaced(oldChannel, newChannel) {
     this.runChannelListener(oldChannel, this.getLoadContext(oldChannel),
-                            "onRedirect", { redirectUrl: newChannel.URI.spec });
+                            "onRedirect", {redirectUrl: newChannel.URI.spec});
   },
 
   onStartRequest(channel, loadContext) {
     this.runChannelListener(channel, loadContext, "onStart");
   },
 
   onStopRequest(channel, loadContext) {
     this.runChannelListener(channel, loadContext, "onStop");