Bug 1561435 - Format accessible/, a=automatic-formatting
authorVictor Porof <vporof@mozilla.com>
Fri, 05 Jul 2019 09:45:34 +0200
changeset 481363 59f51c65dbf0c25ac557546d970c32648ab5d007
parent 481362 cffdfed81a70f820dcec61752edcf6349e583aba
child 481364 e78cfc62325608065dbb0819d2ceecf38fb0e233
push id36243
push uservporof@mozilla.com
push dateFri, 05 Jul 2019 14:04:25 +0000
treeherdermozilla-central@041abaa4aa85 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatic-formatting
bugs1561435
milestone69.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 1561435 - Format accessible/, a=automatic-formatting # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D35895
.eslintrc.js
.prettierignore
accessible/jsat/AccessFu.jsm
accessible/jsat/Constants.jsm
accessible/jsat/ContentControl.jsm
accessible/jsat/EventManager.jsm
accessible/jsat/Traversal.jsm
accessible/jsat/Utils.jsm
accessible/jsat/content-script.js
accessible/tests/browser/bounds/browser_test_resolution.js
accessible/tests/browser/bounds/browser_test_zoom.js
accessible/tests/browser/bounds/browser_test_zoom_text.js
accessible/tests/browser/bounds/head.js
accessible/tests/browser/browser_shutdown_acc_reference.js
accessible/tests/browser/browser_shutdown_doc_acc_reference.js
accessible/tests/browser/browser_shutdown_multi_acc_reference_doc.js
accessible/tests/browser/browser_shutdown_multi_acc_reference_obj.js
accessible/tests/browser/browser_shutdown_multi_proxy_acc_reference_doc.js
accessible/tests/browser/browser_shutdown_multi_proxy_acc_reference_obj.js
accessible/tests/browser/browser_shutdown_multi_reference.js
accessible/tests/browser/browser_shutdown_parent_own_reference.js
accessible/tests/browser/browser_shutdown_pref.js
accessible/tests/browser/browser_shutdown_proxy_acc_reference.js
accessible/tests/browser/browser_shutdown_proxy_doc_acc_reference.js
accessible/tests/browser/browser_shutdown_remote_no_reference.js
accessible/tests/browser/browser_shutdown_remote_only.js
accessible/tests/browser/browser_shutdown_remote_own_reference.js
accessible/tests/browser/browser_shutdown_scope_lifecycle.js
accessible/tests/browser/browser_shutdown_start_restart.js
accessible/tests/browser/e10s/browser_caching_attributes.js
accessible/tests/browser/e10s/browser_caching_description.js
accessible/tests/browser/e10s/browser_caching_name.js
accessible/tests/browser/e10s/browser_caching_relations.js
accessible/tests/browser/e10s/browser_caching_states.js
accessible/tests/browser/e10s/browser_caching_value.js
accessible/tests/browser/e10s/browser_events_announcement.js
accessible/tests/browser/e10s/browser_events_caretmove.js
accessible/tests/browser/e10s/browser_events_hide.js
accessible/tests/browser/e10s/browser_events_show.js
accessible/tests/browser/e10s/browser_events_statechange.js
accessible/tests/browser/e10s/browser_events_textchange.js
accessible/tests/browser/e10s/browser_events_vcchange.js
accessible/tests/browser/e10s/browser_treeupdate_ariadialog.js
accessible/tests/browser/e10s/browser_treeupdate_ariaowns.js
accessible/tests/browser/e10s/browser_treeupdate_canvas.js
accessible/tests/browser/e10s/browser_treeupdate_cssoverflow.js
accessible/tests/browser/e10s/browser_treeupdate_doc.js
accessible/tests/browser/e10s/browser_treeupdate_gencontent.js
accessible/tests/browser/e10s/browser_treeupdate_hidden.js
accessible/tests/browser/e10s/browser_treeupdate_imagemap.js
accessible/tests/browser/e10s/browser_treeupdate_list.js
accessible/tests/browser/e10s/browser_treeupdate_list_editabledoc.js
accessible/tests/browser/e10s/browser_treeupdate_listener.js
accessible/tests/browser/e10s/browser_treeupdate_optgroup.js
accessible/tests/browser/e10s/browser_treeupdate_removal.js
accessible/tests/browser/e10s/browser_treeupdate_table.js
accessible/tests/browser/e10s/browser_treeupdate_textleaf.js
accessible/tests/browser/e10s/browser_treeupdate_visibility.js
accessible/tests/browser/e10s/browser_treeupdate_whitespace.js
accessible/tests/browser/e10s/head.js
accessible/tests/browser/events.js
accessible/tests/browser/events/browser_test_docload.js
accessible/tests/browser/events/browser_test_focus_browserui.js
accessible/tests/browser/events/browser_test_focus_dialog.js
accessible/tests/browser/events/browser_test_focus_urlbar.js
accessible/tests/browser/events/browser_test_scrolling.js
accessible/tests/browser/events/browser_test_textcaret.js
accessible/tests/browser/events/head.js
accessible/tests/browser/general/browser_test_doc_creation.js
accessible/tests/browser/general/browser_test_urlbar.js
accessible/tests/browser/general/head.js
accessible/tests/browser/head.js
accessible/tests/browser/scroll/browser_test_zoom_text.js
accessible/tests/browser/scroll/head.js
accessible/tests/browser/shared-head.js
accessible/tests/browser/states/browser_test_link.js
accessible/tests/browser/states/browser_test_visibility.js
accessible/tests/browser/states/head.js
accessible/tests/browser/tree/browser_aria_owns.js
accessible/tests/browser/tree/head.js
accessible/tests/mochitest/actions.js
accessible/tests/mochitest/attributes.js
accessible/tests/mochitest/autocomplete.js
accessible/tests/mochitest/browser.js
accessible/tests/mochitest/common.js
accessible/tests/mochitest/editabletext/editabletext.js
accessible/tests/mochitest/events.js
accessible/tests/mochitest/grid.js
accessible/tests/mochitest/hyperlink/hyperlink.js
accessible/tests/mochitest/jsat/jsatcommon.js
accessible/tests/mochitest/jsat/output.js
accessible/tests/mochitest/layout.js
accessible/tests/mochitest/name.js
accessible/tests/mochitest/name/markup.js
accessible/tests/mochitest/pivot.js
accessible/tests/mochitest/relations.js
accessible/tests/mochitest/role.js
accessible/tests/mochitest/selectable.js
accessible/tests/mochitest/states.js
accessible/tests/mochitest/table.js
accessible/tests/mochitest/text.js
accessible/tests/mochitest/treeview.js
accessible/tests/mochitest/value.js
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -39,17 +39,16 @@ module.exports = {
   "extends": [
     "plugin:mozilla/recommended"
   ],
   "plugins": [
     "mozilla"
   ],
   "overrides": [{
       "files": [
-        "accessible/**",
         "browser/**",
         "build/**",
         "caps/**",
         "chrome/**",
         "config/**",
         "devtools/**",
         "docshell/**",
         "dom/**",
--- a/.prettierignore
+++ b/.prettierignore
@@ -35,17 +35,16 @@ security/manager/ssl/security-prefs.js
 services/common/services-common.js
 services/sync/services-sync.js
 services/sync/tests/unit/prefs_test_prefs_store.js
 testing/marionette/prefs/marionette.js
 toolkit/components/telemetry/datareporting-prefs.js
 toolkit/components/telemetry/healthreport-prefs.js
 
 # Ignore all top-level directories for now.
-accessible/**
 browser/**
 build/**
 caps/**
 chrome/**
 config/**
 docshell/**
 dom/**
 editor/**
--- a/accessible/jsat/AccessFu.jsm
+++ b/accessible/jsat/AccessFu.jsm
@@ -1,20 +1,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["AccessFu"];
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {Logger, Utils} = ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
-ChromeUtils.defineModuleGetter(this, "Rect",
-                               "resource://gre/modules/Geometry.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Logger, Utils } = ChromeUtils.import(
+  "resource://gre/modules/accessibility/Utils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Rect",
+  "resource://gre/modules/Geometry.jsm"
+);
 
 const GECKOVIEW_MESSAGE = {
   ACTIVATE: "GeckoView:AccessibilityActivate",
   BY_GRANULARITY: "GeckoView:AccessibilityByGranularity",
   CLIPBOARD: "GeckoView:AccessibilityClipboard",
   CURSOR_TO_FOCUSED: "GeckoView:AccessibilityCursorToFocused",
   EXPLORE_BY_TOUCH: "GeckoView:AccessibilityExploreByTouch",
   LONG_PRESS: "GeckoView:AccessibilityLongPress",
@@ -116,35 +121,38 @@ var AccessFu = {
 
     win.addEventListener("TabSelect", this);
     if (win.WindowEventDispatcher && !this._eventDispatcherListeners.has(win)) {
       const listener = (event, data, callback) => {
         this.onEvent(event, data, callback, win);
       };
       this._eventDispatcherListeners.set(win, listener);
       // desktop mochitests don't have this.
-      win.WindowEventDispatcher.registerListener(listener,
-        Object.values(GECKOVIEW_MESSAGE));
+      win.WindowEventDispatcher.registerListener(
+        listener,
+        Object.values(GECKOVIEW_MESSAGE)
+      );
     }
   },
 
   _detachWindow: function _detachWindow(win) {
     let mm = win.messageManager;
     mm.broadcastAsyncMessage("AccessFu:Stop");
     mm.removeDelayedFrameScript(FRAME_SCRIPT);
     for (let messageName of Object.values(ACCESSFU_MESSAGE)) {
       mm.removeMessageListener(messageName, this);
     }
 
     win.removeEventListener("TabSelect", this);
     if (win.WindowEventDispatcher && this._eventDispatcherListeners.has(win)) {
       // desktop mochitests don't have this.
       win.WindowEventDispatcher.unregisterListener(
         this._eventDispatcherListeners.get(win),
-        Object.values(GECKOVIEW_MESSAGE));
+        Object.values(GECKOVIEW_MESSAGE)
+      );
       this._eventDispatcherListeners.delete(win);
     }
   },
 
   onEvent(event, data, callback, win) {
     switch (event) {
       case GECKOVIEW_MESSAGE.SETTINGS:
         if (data.enabled) {
@@ -152,17 +160,18 @@ var AccessFu = {
         } else {
           this._disable();
         }
         break;
       case GECKOVIEW_MESSAGE.NEXT:
       case GECKOVIEW_MESSAGE.PREVIOUS: {
         let rule = "Simple";
         if (data && data.rule && data.rule.length) {
-          rule = data.rule.substr(0, 1).toUpperCase() +
+          rule =
+            data.rule.substr(0, 1).toUpperCase() +
             data.rule.substr(1).toLowerCase();
         }
         let method = event.replace(/GeckoView:Accessibility(\w+)/, "move$1");
         this.Input.moveCursor(method, rule, "gesture", win);
         break;
       }
       case GECKOVIEW_MESSAGE.ACTIVATE:
         this.Input.activateCurrent(data, win);
@@ -193,37 +202,41 @@ var AccessFu = {
         break;
     }
   },
 
   observe: function observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "domwindowopened": {
         let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
-        win.addEventListener("load", () => {
-          this._attachWindow(win);
-        }, { once: true });
+        win.addEventListener(
+          "load",
+          () => {
+            this._attachWindow(win);
+          },
+          { once: true }
+        );
         break;
       }
     }
   },
 
   _handleEvent: function _handleEvent(aEvent) {
     switch (aEvent.type) {
-      case "TabSelect":
-      {
+      case "TabSelect": {
         if (this._focused) {
           // We delay this for half a second so the awesomebar could close,
           // and we could use the current coordinates for the content item.
           // XXX TODO figure out how to avoid magic wait here.
           this.autoMove({
             delay: 500,
             forcePresent: true,
             noOpIfOnScreen: true,
-            moveMethod: "moveFirst" });
+            moveMethod: "moveFirst",
+          });
         }
         break;
       }
       default:
         break;
     }
   },
 
@@ -242,46 +255,58 @@ var AccessFu = {
 
   /**
    * Adjusts the given bounds that are defined in device display pixels
    * to client-relative CSS pixels of the chrome window.
    * @param {Rect} aJsonBounds the bounds to adjust
    * @param {Window} aWindow the window containing the item
    */
   screenToClientBounds(aJsonBounds, aWindow) {
-      let bounds = new Rect(aJsonBounds.left, aJsonBounds.top,
-                            aJsonBounds.right - aJsonBounds.left,
-                            aJsonBounds.bottom - aJsonBounds.top);
-      let { devicePixelRatio, mozInnerScreenX, mozInnerScreenY } = aWindow;
+    let bounds = new Rect(
+      aJsonBounds.left,
+      aJsonBounds.top,
+      aJsonBounds.right - aJsonBounds.left,
+      aJsonBounds.bottom - aJsonBounds.top
+    );
+    let { devicePixelRatio, mozInnerScreenX, mozInnerScreenY } = aWindow;
 
-      bounds = bounds.scale(1 / devicePixelRatio, 1 / devicePixelRatio);
-      bounds = bounds.translate(-mozInnerScreenX, -mozInnerScreenY);
-      return bounds.expandToIntegers();
-    },
+    bounds = bounds.scale(1 / devicePixelRatio, 1 / devicePixelRatio);
+    bounds = bounds.translate(-mozInnerScreenX, -mozInnerScreenY);
+    return bounds.expandToIntegers();
+  },
 };
 
 var Input = {
   moveToPoint: function moveToPoint(aRule, aX, aY, aWindow) {
     Logger.debug("moveToPoint", aX, aY);
     const mm = Utils.getCurrentMessageManager(aWindow);
-    mm.sendAsyncMessage("AccessFu:MoveToPoint",
-      {rule: aRule, x: aX, y: aY, origin: "top"});
+    mm.sendAsyncMessage("AccessFu:MoveToPoint", {
+      rule: aRule,
+      x: aX,
+      y: aY,
+      origin: "top",
+    });
   },
 
   moveCursor: function moveCursor(aAction, aRule, aInputType, aWindow) {
     const mm = Utils.getCurrentMessageManager(aWindow);
-    mm.sendAsyncMessage("AccessFu:MoveCursor",
-                        { action: aAction, rule: aRule,
-                          origin: "top", inputType: aInputType });
+    mm.sendAsyncMessage("AccessFu:MoveCursor", {
+      action: aAction,
+      rule: aRule,
+      origin: "top",
+      inputType: aInputType,
+    });
   },
 
   androidScroll: function androidScroll(aDirection, aWindow) {
     const mm = Utils.getCurrentMessageManager(aWindow);
-    mm.sendAsyncMessage("AccessFu:AndroidScroll",
-                        { direction: aDirection, origin: "top" });
+    mm.sendAsyncMessage("AccessFu:AndroidScroll", {
+      direction: aDirection,
+      origin: "top",
+    });
   },
 
   moveByGranularity: function moveByGranularity(aDetails, aWindow) {
     const mm = Utils.getCurrentMessageManager(aWindow);
     mm.sendAsyncMessage("AccessFu:MoveByGranularity", aDetails);
   },
 
   setSelection: function setSelection(aDetails, aWindow) {
@@ -300,14 +325,23 @@ var Input = {
   },
 
   doScroll: function doScroll(aDetails, aBrowser) {
     let horizontal = aDetails.horizontal;
     let page = aDetails.page;
     let win = aBrowser.ownerGlobal;
     let winUtils = win.windowUtils;
     let p = AccessFu.screenToClientBounds(aDetails.bounds, win).center();
-    winUtils.sendWheelEvent(p.x, p.y,
-      horizontal ? page : 0, horizontal ? 0 : page, 0,
-      win.WheelEvent.DOM_DELTA_PAGE, 0, 0, 0, 0);
+    winUtils.sendWheelEvent(
+      p.x,
+      p.y,
+      horizontal ? page : 0,
+      horizontal ? 0 : page,
+      0,
+      win.WheelEvent.DOM_DELTA_PAGE,
+      0,
+      0,
+      0,
+      0
+    );
   },
 };
 AccessFu.Input = Input;
--- a/accessible/jsat/Constants.jsm
+++ b/accessible/jsat/Constants.jsm
@@ -1,9 +1,11 @@
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 const AndroidEvents = {
   VIEW_CLICKED: 0x01,
   VIEW_LONG_CLICKED: 0x02,
   VIEW_SELECTED: 0x04,
   VIEW_FOCUSED: 0x08,
   VIEW_TEXT_CHANGED: 0x10,
   WINDOW_STATE_CHANGED: 0x20,
@@ -16,58 +18,56 @@ const AndroidEvents = {
   VIEW_ACCESSIBILITY_FOCUSED: 0x8000,
   VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY: 0x20000,
 };
 
 function ConstantsMap(aObject, aPrefix, aMap = {}, aModifier = null) {
   let offset = aPrefix.length;
   for (var name in aObject) {
     if (name.indexOf(aPrefix) === 0) {
-      aMap[name.slice(offset)] = aModifier ?
-        aModifier(aObject[name]) : aObject[name];
+      aMap[name.slice(offset)] = aModifier
+        ? aModifier(aObject[name])
+        : aObject[name];
     }
   }
 
   return aMap;
 }
 
-XPCOMUtils.defineLazyGetter(
-  this, "Roles",
-  function() {
-    return ConstantsMap(Ci.nsIAccessibleRole, "ROLE_");
-  });
+XPCOMUtils.defineLazyGetter(this, "Roles", function() {
+  return ConstantsMap(Ci.nsIAccessibleRole, "ROLE_");
+});
+
+XPCOMUtils.defineLazyGetter(this, "Events", function() {
+  return ConstantsMap(Ci.nsIAccessibleEvent, "EVENT_");
+});
 
-XPCOMUtils.defineLazyGetter(
-  this, "Events",
-  function() {
-    return ConstantsMap(Ci.nsIAccessibleEvent, "EVENT_");
-  });
+XPCOMUtils.defineLazyGetter(this, "Relations", function() {
+  return ConstantsMap(Ci.nsIAccessibleRelation, "RELATION_");
+});
 
-XPCOMUtils.defineLazyGetter(
-  this, "Relations",
-  function() {
-    return ConstantsMap(Ci.nsIAccessibleRelation, "RELATION_");
-  });
+XPCOMUtils.defineLazyGetter(this, "Prefilters", function() {
+  return ConstantsMap(Ci.nsIAccessibleTraversalRule, "PREFILTER_");
+});
+
+XPCOMUtils.defineLazyGetter(this, "Filters", function() {
+  return ConstantsMap(Ci.nsIAccessibleTraversalRule, "FILTER_");
+});
 
-XPCOMUtils.defineLazyGetter(
-  this, "Prefilters",
-  function() {
-    return ConstantsMap(Ci.nsIAccessibleTraversalRule, "PREFILTER_");
+XPCOMUtils.defineLazyGetter(this, "States", function() {
+  let statesMap = ConstantsMap(Ci.nsIAccessibleStates, "STATE_", {}, val => {
+    return { base: val, extended: 0 };
   });
-
-XPCOMUtils.defineLazyGetter(
-  this, "Filters",
-  function() {
-    return ConstantsMap(Ci.nsIAccessibleTraversalRule, "FILTER_");
+  ConstantsMap(Ci.nsIAccessibleStates, "EXT_STATE_", statesMap, val => {
+    return { base: 0, extended: val };
   });
+  return statesMap;
+});
 
-XPCOMUtils.defineLazyGetter(
-  this, "States",
-  function() {
-    let statesMap = ConstantsMap(Ci.nsIAccessibleStates, "STATE_", {},
-                                 (val) => { return { base: val, extended: 0 }; });
-    ConstantsMap(Ci.nsIAccessibleStates, "EXT_STATE_", statesMap,
-                 (val) => { return { base: 0, extended: val }; });
-    return statesMap;
-  });
-
-var EXPORTED_SYMBOLS = ["Roles", "Events", "Relations",
-                        "Filters", "States", "Prefilters", "AndroidEvents"];
+var EXPORTED_SYMBOLS = [
+  "Roles",
+  "Events",
+  "Relations",
+  "Filters",
+  "States",
+  "Prefilters",
+  "AndroidEvents",
+];
--- a/accessible/jsat/ContentControl.jsm
+++ b/accessible/jsat/ContentControl.jsm
@@ -1,24 +1,42 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.defineModuleGetter(this, "Utils",
-  "resource://gre/modules/accessibility/Utils.jsm");
-ChromeUtils.defineModuleGetter(this, "Logger",
-  "resource://gre/modules/accessibility/Utils.jsm");
-ChromeUtils.defineModuleGetter(this, "Roles",
-  "resource://gre/modules/accessibility/Constants.jsm");
-ChromeUtils.defineModuleGetter(this, "States",
-  "resource://gre/modules/accessibility/Constants.jsm");
-ChromeUtils.defineModuleGetter(this, "TraversalRules",
-  "resource://gre/modules/accessibility/Traversal.jsm");
-ChromeUtils.defineModuleGetter(this, "TraversalHelper",
-  "resource://gre/modules/accessibility/Traversal.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "Utils",
+  "resource://gre/modules/accessibility/Utils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Logger",
+  "resource://gre/modules/accessibility/Utils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Roles",
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "States",
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "TraversalRules",
+  "resource://gre/modules/accessibility/Traversal.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "TraversalHelper",
+  "resource://gre/modules/accessibility/Traversal.jsm"
+);
 
 var EXPORTED_SYMBOLS = ["ContentControl"];
 
 const MOVEMENT_GRANULARITY_CHARACTER = 1;
 const MOVEMENT_GRANULARITY_WORD = 2;
 const MOVEMENT_GRANULARITY_LINE = 4;
 
 const CLIPBOARD_COPY = 0x4000;
@@ -26,25 +44,27 @@ const CLIPBOARD_PASTE = 0x8000;
 const CLIPBOARD_CUT = 0x10000;
 
 function ContentControl(aContentScope) {
   this._contentScope = Cu.getWeakReference(aContentScope);
   this._childMessageSenders = new WeakMap();
 }
 
 this.ContentControl.prototype = {
-  messagesOfInterest: ["AccessFu:Activate",
-                       "AccessFu:AndroidScroll",
-                       "AccessFu:AutoMove",
-                       "AccessFu:ClearCursor",
-                       "AccessFu:Clipboard",
-                       "AccessFu:MoveByGranularity",
-                       "AccessFu:MoveCursor",
-                       "AccessFu:MoveToPoint",
-                       "AccessFu:SetSelection"],
+  messagesOfInterest: [
+    "AccessFu:Activate",
+    "AccessFu:AndroidScroll",
+    "AccessFu:AutoMove",
+    "AccessFu:ClearCursor",
+    "AccessFu:Clipboard",
+    "AccessFu:MoveByGranularity",
+    "AccessFu:MoveCursor",
+    "AccessFu:MoveToPoint",
+    "AccessFu:SetSelection",
+  ],
 
   start: function cc_start() {
     let cs = this._contentScope.get();
     for (let message of this.messagesOfInterest) {
       cs.addMessageListener(message, this);
     }
   },
 
@@ -64,34 +84,38 @@ this.ContentControl.prototype = {
   },
 
   get vc() {
     return Utils.getVirtualCursor(this.document);
   },
 
   receiveMessage: function cc_receiveMessage(aMessage) {
     Logger.debug(() => {
-      return ["ContentControl.receiveMessage",
+      return [
+        "ContentControl.receiveMessage",
         aMessage.name,
-        JSON.stringify(aMessage.json)];
+        JSON.stringify(aMessage.json),
+      ];
     });
 
     // If we get an explicit message, we should immediately cancel any autoMove
     this.cancelAutoMove();
 
     try {
       let func = this["handle" + aMessage.name.slice(9)]; // 'AccessFu:'.length
       if (func) {
         func.bind(this)(aMessage);
       } else {
         Logger.warning("ContentControl: Unhandled message:", aMessage.name);
       }
     } catch (x) {
       Logger.logException(
-        x, "Error handling message: " + JSON.stringify(aMessage.json));
+        x,
+        "Error handling message: " + JSON.stringify(aMessage.json)
+      );
     }
   },
 
   handleAndroidScroll: function cc_handleAndroidScroll(aMessage) {
     let vc = this.vc;
     let position = vc.position;
 
     if (aMessage.json.origin != "child" && this.sendToChild(vc, aMessage)) {
@@ -100,20 +124,21 @@ this.ContentControl.prototype = {
     }
 
     // Counter-intuitive, but scrolling backward (ie. up), actually should
     // increase range values.
     if (this.adjustRange(position, aMessage.json.direction === "backward")) {
       return;
     }
 
-    this._contentScope.get().sendAsyncMessage("AccessFu:DoScroll",
-      { bounds: Utils.getBounds(position),
-        page: aMessage.json.direction === "forward" ? 1 : -1,
-        horizontal: false });
+    this._contentScope.get().sendAsyncMessage("AccessFu:DoScroll", {
+      bounds: Utils.getBounds(position),
+      page: aMessage.json.direction === "forward" ? 1 : -1,
+      horizontal: false,
+    });
   },
 
   handleMoveCursor: function cc_handleMoveCursor(aMessage) {
     let origin = aMessage.json.origin;
     let action = aMessage.json.action;
     let adjustRange = aMessage.json.adjustRange;
     let vc = this.vc;
 
@@ -127,33 +152,37 @@ this.ContentControl.prototype = {
     }
 
     let moved = TraversalHelper.move(vc, action, aMessage.json.rule);
 
     if (moved) {
       if (origin === "child") {
         // We just stepped out of a child, clear child cursor.
         Utils.getMessageManagerForFrame(aMessage.target).sendAsyncMessage(
-          "AccessFu:ClearCursor", {});
+          "AccessFu:ClearCursor",
+          {}
+        );
       } else {
         // We potentially landed on a new child cursor. If so, we want to
         // either be on the first or last item in the child doc.
         let childAction = action;
         if (action === "moveNext") {
           childAction = "moveFirst";
         } else if (action === "movePrevious") {
           childAction = "moveLast";
         }
 
         // Attempt to forward move to a potential child cursor in our
         // new position.
         this.sendToChild(vc, aMessage, { action: childAction }, true);
       }
-    } else if (!this._childMessageSenders.has(aMessage.target) &&
-               origin !== "top") {
+    } else if (
+      !this._childMessageSenders.has(aMessage.target) &&
+      origin !== "top"
+    ) {
       // We failed to move, and the message is not from a parent, so forward
       // to it.
       this.sendToParent(aMessage);
     }
   },
 
   handleMoveToPoint: function cc_handleMoveToPoint(aMessage) {
     let [x, y] = [aMessage.json.x, aMessage.json.y];
@@ -171,17 +200,17 @@ this.ContentControl.prototype = {
     this.document.activeElement.blur();
   },
 
   handleAutoMove: function cc_handleAutoMove(aMessage) {
     this.autoMove(null, aMessage.json);
   },
 
   handleActivate: function cc_handleActivate(aMessage) {
-    let activateAccessible = (aAccessible) => {
+    let activateAccessible = aAccessible => {
       Logger.debug(() => {
         return ["activateAccessible", Logger.accessibleToString(aAccessible)];
       });
 
       if (aAccessible.actionCount > 0) {
         aAccessible.doAction(0);
       } else {
         let control = Utils.getEmbeddedControl(aAccessible);
@@ -189,51 +218,76 @@ this.ContentControl.prototype = {
           control.doAction(0);
         }
 
         // XXX Some mobile widget sets do not expose actions properly
         // (via ARIA roles, etc.), so we need to generate a click.
         // Could possibly be made simpler in the future. Maybe core
         // engine could expose nsCoreUtiles::DispatchMouseEvent()?
         let docAcc = Utils.AccService.getAccessibleFor(this.document);
-        let docX = {}, docY = {}, docW = {}, docH = {};
+        let docX = {},
+          docY = {},
+          docW = {},
+          docH = {};
         docAcc.getBounds(docX, docY, docW, docH);
 
-        let objX = {}, objY = {}, objW = {}, objH = {};
+        let objX = {},
+          objY = {},
+          objW = {},
+          objH = {};
         aAccessible.getBounds(objX, objY, objW, objH);
 
-        let x = Math.round((objX.value - docX.value) + objW.value / 2);
-        let y = Math.round((objY.value - docY.value) + objH.value / 2);
+        let x = Math.round(objX.value - docX.value + objW.value / 2);
+        let y = Math.round(objY.value - docY.value + objH.value / 2);
 
         let node = aAccessible.DOMNode || aAccessible.parent.DOMNode;
 
         for (let eventType of ["mousedown", "mouseup"]) {
           let evt = this.document.createEvent("MouseEvents");
-          evt.initMouseEvent(eventType, true, true, this.window,
-            x, y, 0, 0, 0, false, false, false, false, 0, null);
+          evt.initMouseEvent(
+            eventType,
+            true,
+            true,
+            this.window,
+            x,
+            y,
+            0,
+            0,
+            0,
+            false,
+            false,
+            false,
+            false,
+            0,
+            null
+          );
           node.dispatchEvent(evt);
         }
       }
     };
 
     let focusedAcc = Utils.AccService.getAccessibleFor(
-      this.document.activeElement);
-    if (focusedAcc && this.vc.position === focusedAcc
-        && focusedAcc.role === Roles.ENTRY) {
+      this.document.activeElement
+    );
+    if (
+      focusedAcc &&
+      this.vc.position === focusedAcc &&
+      focusedAcc.role === Roles.ENTRY
+    ) {
       let accText = focusedAcc.QueryInterface(Ci.nsIAccessibleText);
       let newOffset = aMessage.json.offset;
       if (newOffset >= 0 && newOffset <= accText.characterCount) {
         accText.caretOffset = newOffset;
       }
 
       return;
     }
 
     // recursively find a descendant that is activatable.
-    let getActivatableDescendant = (aAccessible) => {
+    let getActivatableDescendant = aAccessible => {
       if (aAccessible.actionCount > 0) {
         return aAccessible;
       }
 
       for (let acc = aAccessible.firstChild; acc; acc = acc.nextSibling) {
         let activatable = getActivatableDescendant(acc);
         if (activatable) {
           return activatable;
@@ -268,30 +322,42 @@ this.ContentControl.prototype = {
       elem[aStepUp ? "stepDown" : "stepUp"]();
       let evt = this.document.createEvent("UIEvent");
       evt.initEvent("change", true, true);
       elem.dispatchEvent(evt);
     } else {
       let evt = this.document.createEvent("KeyboardEvent");
       let keycode = aStepUp ? evt.DOM_VK_DOWN : evt.DOM_VK_UP;
       evt.initKeyEvent(
-        "keypress", false, true, null, false, false, false, false, keycode, 0);
+        "keypress",
+        false,
+        true,
+        null,
+        false,
+        false,
+        false,
+        false,
+        keycode,
+        0
+      );
       elem.dispatchEvent(evt);
     }
 
     return true;
   },
 
   handleMoveByGranularity: function cc_handleMoveByGranularity(aMessage) {
     const { direction, granularity, select } = aMessage.json;
-    const focusedAcc =
-      Utils.AccService.getAccessibleFor(this.document.activeElement);
+    const focusedAcc = Utils.AccService.getAccessibleFor(
+      this.document.activeElement
+    );
     const editable =
-      focusedAcc && Utils.getState(focusedAcc).contains(States.EDITABLE) ?
-      focusedAcc.QueryInterface(Ci.nsIAccessibleText) : null;
+      focusedAcc && Utils.getState(focusedAcc).contains(States.EDITABLE)
+        ? focusedAcc.QueryInterface(Ci.nsIAccessibleText)
+        : null;
 
     if (editable) {
       const caretOffset = editable.caretOffset;
       this.vc.setTextRange(editable, caretOffset, caretOffset, false);
     }
 
     let pivotGranularity;
     switch (granularity) {
@@ -310,49 +376,51 @@ this.ContentControl.prototype = {
 
     if (direction === "Previous") {
       this.vc.movePreviousByText(pivotGranularity);
     } else if (direction === "Next") {
       this.vc.moveNextByText(pivotGranularity);
     }
 
     if (editable) {
-      const newOffset = direction === "Next" ?
-        this.vc.endOffset : this.vc.startOffset;
+      const newOffset =
+        direction === "Next" ? this.vc.endOffset : this.vc.startOffset;
       if (select) {
         let anchor = editable.caretOffset;
         if (editable.selectionCount) {
           const [startSel, endSel] = Utils.getTextSelection(editable);
           anchor = startSel == anchor ? endSel : startSel;
         }
         editable.setSelectionBounds(0, anchor, newOffset);
       } else {
         editable.caretOffset = newOffset;
       }
     }
   },
 
   handleSetSelection: function cc_handleSetSelection(aMessage) {
     const { start, end } = aMessage.json;
-    const focusedAcc =
-      Utils.AccService.getAccessibleFor(this.document.activeElement);
+    const focusedAcc = Utils.AccService.getAccessibleFor(
+      this.document.activeElement
+    );
     if (focusedAcc) {
       const accText = focusedAcc.QueryInterface(Ci.nsIAccessibleText);
       if (start == end) {
         accText.caretOffset = start;
       } else {
         accText.setSelectionBounds(0, start, end);
       }
     }
   },
 
   handleClipboard: function cc_handleClipboard(aMessage) {
     const { action } = aMessage.json;
-    const focusedAcc =
-      Utils.AccService.getAccessibleFor(this.document.activeElement);
+    const focusedAcc = Utils.AccService.getAccessibleFor(
+      this.document.activeElement
+    );
     if (focusedAcc) {
       const [startSel, endSel] = Utils.getTextSelection(focusedAcc);
       const editText = focusedAcc.QueryInterface(Ci.nsIAccessibleEditableText);
       switch (action) {
         case CLIPBOARD_COPY:
           if (startSel != endSel) {
             editText.copyText(startSel, endSel);
           }
@@ -384,18 +452,22 @@ this.ContentControl.prototype = {
       }
 
       return mm;
     }
 
     return null;
   },
 
-  sendToChild: function cc_sendToChild(aVirtualCursor, aMessage, aReplacer,
-                                       aFocus) {
+  sendToChild: function cc_sendToChild(
+    aVirtualCursor,
+    aMessage,
+    aReplacer,
+    aFocus
+  ) {
     let position = aVirtualCursor.position;
     let mm = this.getChildCursor(position);
     if (!mm) {
       return false;
     }
 
     if (aFocus) {
       position.takeFocus();
@@ -431,60 +503,73 @@ this.ContentControl.prototype = {
    * - moveMethod: pivot move method to use, default is 'moveNext',
    */
   autoMove: function cc_autoMove(aAnchor, aOptions = {}) {
     this.cancelAutoMove();
 
     let moveFunc = () => {
       let vc = this.vc;
       let acc = aAnchor;
-      let rule = aOptions.onScreenOnly ?
-        TraversalRules.SimpleOnScreen : TraversalRules.Simple;
+      let rule = aOptions.onScreenOnly
+        ? TraversalRules.SimpleOnScreen
+        : TraversalRules.Simple;
 
-      if (aOptions.noOpIfOnScreen &&
-        Utils.isAliveAndVisible(vc.position, true)) {
+      if (
+        aOptions.noOpIfOnScreen &&
+        Utils.isAliveAndVisible(vc.position, true)
+      ) {
         return;
       }
 
       if (aOptions.moveToFocused) {
-        acc = Utils.AccService.getAccessibleFor(
-          this.document.activeElement) || acc;
+        acc =
+          Utils.AccService.getAccessibleFor(this.document.activeElement) || acc;
       }
 
       let moved = false;
       let moveMethod = aOptions.moveMethod || "moveNext"; // default is moveNext
       let moveFirstOrLast = moveMethod in ["moveFirst", "moveLast"];
       if (!moveFirstOrLast || acc) {
         // We either need next/previous or there is an anchor we need to use.
-        moved = vc[moveFirstOrLast ? "moveNext" : moveMethod](rule, acc, true,
-                                                              true);
+        moved = vc[moveFirstOrLast ? "moveNext" : moveMethod](
+          rule,
+          acc,
+          true,
+          true
+        );
       }
       if (moveFirstOrLast && !moved) {
         // We move to first/last after no anchor move happened or succeeded.
         moved = vc[moveMethod](rule, true);
       }
 
-      this.sendToChild(vc, {
-        name: "AccessFu:AutoMove",
-        json: {
-          moveMethod: aOptions.moveMethod,
-          moveToFocused: aOptions.moveToFocused,
-          noOpIfOnScreen: true,
+      this.sendToChild(
+        vc,
+        {
+          name: "AccessFu:AutoMove",
+          json: {
+            moveMethod: aOptions.moveMethod,
+            moveToFocused: aOptions.moveToFocused,
+            noOpIfOnScreen: true,
+          },
         },
-      }, null, true);
+        null,
+        true
+      );
     };
 
     if (aOptions.delay) {
       this._autoMove = this.window.setTimeout(moveFunc, aOptions.delay);
     } else {
       moveFunc();
     }
   },
 
   cancelAutoMove: function cc_cancelAutoMove() {
     this.window.clearTimeout(this._autoMove);
     this._autoMove = 0;
   },
 
-  QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference,
+  QueryInterface: ChromeUtils.generateQI([
+    Ci.nsISupportsWeakReference,
     Ci.nsIMessageListener,
   ]),
 };
--- a/accessible/jsat/EventManager.jsm
+++ b/accessible/jsat/EventManager.jsm
@@ -1,33 +1,46 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-ChromeUtils.defineModuleGetter(this, "Services",
-  "resource://gre/modules/Services.jsm");
-ChromeUtils.defineModuleGetter(this, "Utils",
-  "resource://gre/modules/accessibility/Utils.jsm");
-ChromeUtils.defineModuleGetter(this, "Logger",
-  "resource://gre/modules/accessibility/Utils.jsm");
-ChromeUtils.defineModuleGetter(this, "Events",
-  "resource://gre/modules/accessibility/Constants.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "Services",
+  "resource://gre/modules/Services.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Utils",
+  "resource://gre/modules/accessibility/Utils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Logger",
+  "resource://gre/modules/accessibility/Utils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Events",
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
 
 var EXPORTED_SYMBOLS = ["EventManager"];
 
 function EventManager(aContentScope) {
   this.contentScope = aContentScope;
   this.addEventListener = this.contentScope.addEventListener.bind(
-    this.contentScope);
+    this.contentScope
+  );
   this.removeEventListener = this.contentScope.removeEventListener.bind(
-    this.contentScope);
-  this.sendMsgFunc = this.contentScope.sendAsyncMessage.bind(
-    this.contentScope);
+    this.contentScope
+  );
+  this.sendMsgFunc = this.contentScope.sendAsyncMessage.bind(this.contentScope);
 }
 
 this.EventManager.prototype = {
   start: function start() {
     try {
       if (!this._started) {
         Logger.debug("EventManager.start");
 
@@ -60,77 +73,82 @@ this.EventManager.prototype = {
   },
 
   get contentControl() {
     return this.contentScope._jsat_contentControl;
   },
 
   handleAccEvent: function handleAccEvent(aEvent) {
     Logger.debug(() => {
-      return ["A11yEvent", Logger.eventToString(aEvent),
-              Logger.accessibleToString(aEvent.accessible)];
+      return [
+        "A11yEvent",
+        Logger.eventToString(aEvent),
+        Logger.accessibleToString(aEvent.accessible),
+      ];
     });
 
     // Don't bother with non-content events in firefox.
-    if (Utils.MozBuildApp == "browser" &&
-        aEvent.eventType != Events.VIRTUALCURSOR_CHANGED &&
-        // XXX Bug 442005 results in DocAccessible::getDocType returning
-        // NS_ERROR_FAILURE. Checking for aEvent.accessibleDocument.docType ==
-        // 'window' does not currently work.
-        (aEvent.accessibleDocument.DOMDocument.doctype &&
-         aEvent.accessibleDocument.DOMDocument.doctype.name === "window")) {
+    if (
+      Utils.MozBuildApp == "browser" &&
+      aEvent.eventType != Events.VIRTUALCURSOR_CHANGED &&
+      // XXX Bug 442005 results in DocAccessible::getDocType returning
+      // NS_ERROR_FAILURE. Checking for aEvent.accessibleDocument.docType ==
+      // 'window' does not currently work.
+      (aEvent.accessibleDocument.DOMDocument.doctype &&
+        aEvent.accessibleDocument.DOMDocument.doctype.name === "window")
+    ) {
       return;
     }
 
     switch (aEvent.eventType) {
-      case Events.TEXT_CARET_MOVED:
-      {
-        if (aEvent.accessible != aEvent.accessibleDocument &&
-            !aEvent.isFromUserInput) {
+      case Events.TEXT_CARET_MOVED: {
+        if (
+          aEvent.accessible != aEvent.accessibleDocument &&
+          !aEvent.isFromUserInput
+        ) {
           // If caret moves in document without direct user
           // we are probably stepping through results in find-in-page.
-          let acc = Utils.getTextLeafForOffset(aEvent.accessible,
-            aEvent.QueryInterface(Ci.nsIAccessibleCaretMoveEvent).caretOffset);
+          let acc = Utils.getTextLeafForOffset(
+            aEvent.accessible,
+            aEvent.QueryInterface(Ci.nsIAccessibleCaretMoveEvent).caretOffset
+          );
           this.contentControl.autoMove(acc);
         }
         break;
       }
-      case Events.NAME_CHANGE:
-      {
+      case Events.NAME_CHANGE: {
         // XXX: Port to Android
         break;
       }
-      case Events.SCROLLING_START:
-      {
+      case Events.SCROLLING_START: {
         this.contentControl.autoMove(aEvent.accessible);
         break;
       }
-      case Events.SHOW:
-      {
+      case Events.SHOW: {
         // XXX: Port to Android
         break;
       }
-      case Events.HIDE:
-      {
+      case Events.HIDE: {
         // XXX: Port to Android
         break;
       }
-      case Events.VALUE_CHANGE:
-      {
+      case Events.VALUE_CHANGE: {
         // XXX: Port to Android
         break;
       }
     }
   },
 
-  QueryInterface: ChromeUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObserver]),
+  QueryInterface: ChromeUtils.generateQI([
+    Ci.nsISupportsWeakReference,
+    Ci.nsIObserver,
+  ]),
 };
 
 const AccessibilityEventObserver = {
-
   /**
    * A WeakMap containing [content, EventManager] pairs.
    */
   eventManagers: new WeakMap(),
 
   /**
    * A total number of registered eventManagers.
    */
@@ -175,36 +193,40 @@ const AccessibilityEventObserver = {
    */
   addListener: function addListener(aEventManager) {
     let content = aEventManager.contentScope.content;
     if (!this.eventManagers.has(content)) {
       this.listenerCount++;
     }
     this.eventManagers.set(content, aEventManager);
     // Since at least one EventManager was registered, start listening.
-    Logger.debug("AccessibilityEventObserver.addListener. Total:",
-      this.listenerCount);
+    Logger.debug(
+      "AccessibilityEventObserver.addListener. Total:",
+      this.listenerCount
+    );
     this.start();
   },
 
   /**
    * Unregister an EventManager and, optionally, stop listening to the
    * 'accessible-event' messages.
    *
    * @param aEventManager EventManager
    *        An EventManager object that was stopped in the specific content.
    */
   removeListener: function removeListener(aEventManager) {
     let content = aEventManager.contentScope.content;
     if (!this.eventManagers.delete(content)) {
       return;
     }
     this.listenerCount--;
-    Logger.debug("AccessibilityEventObserver.removeListener. Total:",
-      this.listenerCount);
+    Logger.debug(
+      "AccessibilityEventObserver.removeListener. Total:",
+      this.listenerCount
+    );
     if (this.listenerCount === 0) {
       // If there are no EventManagers registered at the moment, stop listening
       // to the 'accessible-event' messages.
       this.stop();
     }
   },
 
   /**
@@ -232,39 +254,46 @@ const AccessibilityEventObserver = {
   observe: function observe(aSubject, aTopic, aData) {
     if (aTopic !== "accessible-event") {
       return;
     }
     let event = aSubject.QueryInterface(Ci.nsIAccessibleEvent);
     if (!event.accessibleDocument) {
       Logger.warning(
         "AccessibilityEventObserver.observe: no accessible document:",
-        Logger.eventToString(event), "accessible:",
-        Logger.accessibleToString(event.accessible));
+        Logger.eventToString(event),
+        "accessible:",
+        Logger.accessibleToString(event.accessible)
+      );
       return;
     }
     let content;
     try {
       content = event.accessibleDocument.window;
     } catch (e) {
       Logger.warning(
         "AccessibilityEventObserver.observe: no window for accessible document:",
-        Logger.eventToString(event), "accessible:",
-        Logger.accessibleToString(event.accessible));
+        Logger.eventToString(event),
+        "accessible:",
+        Logger.accessibleToString(event.accessible)
+      );
       return;
     }
     // Match the content window to its EventManager.
     let eventManager = this.getListener(content);
     if (!eventManager || !eventManager._started) {
       if (Utils.MozBuildApp === "browser" && !content.isChromeWindow) {
         Logger.warning(
           "AccessibilityEventObserver.observe: ignored event:",
-          Logger.eventToString(event), "accessible:",
-          Logger.accessibleToString(event.accessible), "document:",
-          Logger.accessibleToString(event.accessibleDocument));
+          Logger.eventToString(event),
+          "accessible:",
+          Logger.accessibleToString(event.accessible),
+          "document:",
+          Logger.accessibleToString(event.accessibleDocument)
+        );
       }
       return;
     }
     try {
       eventManager.handleAccEvent(event);
     } catch (x) {
       Logger.logException(x, "Error handing accessible event");
     }
--- a/accessible/jsat/Traversal.jsm
+++ b/accessible/jsat/Traversal.jsm
@@ -1,100 +1,121 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["TraversalRules", "TraversalHelper"]; // jshint ignore:line
 
-const {PrefCache, Utils} = ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
-ChromeUtils.defineModuleGetter(this, "Roles", // jshint ignore:line
-  "resource://gre/modules/accessibility/Constants.jsm");
-ChromeUtils.defineModuleGetter(this, "Filters", // jshint ignore:line
-  "resource://gre/modules/accessibility/Constants.jsm");
-ChromeUtils.defineModuleGetter(this, "States", // jshint ignore:line
-  "resource://gre/modules/accessibility/Constants.jsm");
-ChromeUtils.defineModuleGetter(this, "Prefilters", // jshint ignore:line
-  "resource://gre/modules/accessibility/Constants.jsm");
+const { PrefCache, Utils } = ChromeUtils.import(
+  "resource://gre/modules/accessibility/Utils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Roles", // jshint ignore:line
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Filters", // jshint ignore:line
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "States", // jshint ignore:line
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Prefilters", // jshint ignore:line
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
 
-var gSkipEmptyImages = new PrefCache("accessibility.accessfu.skip_empty_images");
+var gSkipEmptyImages = new PrefCache(
+  "accessibility.accessfu.skip_empty_images"
+);
 
 function BaseTraversalRule(aRoles, aMatchFunc, aPreFilter, aContainerRule) {
   this._explicitMatchRoles = new Set(aRoles);
   this._matchRoles = aRoles;
   if (aRoles.length) {
     if (!aRoles.includes(Roles.LABEL)) {
       this._matchRoles.push(Roles.LABEL);
     }
     if (!aRoles.includes(Roles.INTERNAL_FRAME)) {
       // Used for traversing in to child OOP frames.
       this._matchRoles.push(Roles.INTERNAL_FRAME);
     }
   }
-  this._matchFunc = aMatchFunc || function() { return Filters.MATCH; };
+  this._matchFunc =
+    aMatchFunc ||
+    function() {
+      return Filters.MATCH;
+    };
   this.preFilter = aPreFilter || gSimplePreFilter;
   this.containerRule = aContainerRule;
 }
 
 BaseTraversalRule.prototype = {
-    getMatchRoles: function BaseTraversalRule_getmatchRoles() {
-      return this._matchRoles;
-    },
+  getMatchRoles: function BaseTraversalRule_getmatchRoles() {
+    return this._matchRoles;
+  },
 
-    match: function BaseTraversalRule_match(aAccessible) {
-      let role = aAccessible.role;
-      if (role == Roles.INTERNAL_FRAME) {
-        return (Utils.getMessageManagerForFrame(aAccessible.DOMNode)) ?
-          Filters.MATCH | Filters.IGNORE_SUBTREE : Filters.IGNORE;
-      }
+  match: function BaseTraversalRule_match(aAccessible) {
+    let role = aAccessible.role;
+    if (role == Roles.INTERNAL_FRAME) {
+      return Utils.getMessageManagerForFrame(aAccessible.DOMNode)
+        ? Filters.MATCH | Filters.IGNORE_SUBTREE
+        : Filters.IGNORE;
+    }
 
-      if (this._explicitMatchRoles.has(role) ||
-          !this._explicitMatchRoles.size) {
-        return this._matchFunc(aAccessible);
-      }
+    if (this._explicitMatchRoles.has(role) || !this._explicitMatchRoles.size) {
+      return this._matchFunc(aAccessible);
+    }
 
-      return Filters.IGNORE;
-    },
+    return Filters.IGNORE;
+  },
 
-    QueryInterface: ChromeUtils.generateQI([Ci.nsIAccessibleTraversalRule]),
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIAccessibleTraversalRule]),
 };
 
-var gSimpleTraversalRoles =
-  [Roles.MENUITEM,
-   Roles.LINK,
-   Roles.PAGETAB,
-   Roles.GRAPHIC,
-   Roles.STATICTEXT,
-   Roles.TEXT_LEAF,
-   Roles.PUSHBUTTON,
-   Roles.CHECKBUTTON,
-   Roles.RADIOBUTTON,
-   Roles.COMBOBOX,
-   Roles.PROGRESSBAR,
-   Roles.BUTTONDROPDOWN,
-   Roles.BUTTONMENU,
-   Roles.CHECK_MENU_ITEM,
-   Roles.PASSWORD_TEXT,
-   Roles.RADIO_MENU_ITEM,
-   Roles.TOGGLE_BUTTON,
-   Roles.ENTRY,
-   Roles.KEY,
-   Roles.HEADER,
-   Roles.HEADING,
-   Roles.SLIDER,
-   Roles.SPINBUTTON,
-   Roles.OPTION,
-   Roles.LISTITEM,
-   Roles.GRID_CELL,
-   Roles.COLUMNHEADER,
-   Roles.ROWHEADER,
-   Roles.STATUSBAR,
-   Roles.SWITCH,
-   Roles.MATHML_MATH];
+var gSimpleTraversalRoles = [
+  Roles.MENUITEM,
+  Roles.LINK,
+  Roles.PAGETAB,
+  Roles.GRAPHIC,
+  Roles.STATICTEXT,
+  Roles.TEXT_LEAF,
+  Roles.PUSHBUTTON,
+  Roles.CHECKBUTTON,
+  Roles.RADIOBUTTON,
+  Roles.COMBOBOX,
+  Roles.PROGRESSBAR,
+  Roles.BUTTONDROPDOWN,
+  Roles.BUTTONMENU,
+  Roles.CHECK_MENU_ITEM,
+  Roles.PASSWORD_TEXT,
+  Roles.RADIO_MENU_ITEM,
+  Roles.TOGGLE_BUTTON,
+  Roles.ENTRY,
+  Roles.KEY,
+  Roles.HEADER,
+  Roles.HEADING,
+  Roles.SLIDER,
+  Roles.SPINBUTTON,
+  Roles.OPTION,
+  Roles.LISTITEM,
+  Roles.GRID_CELL,
+  Roles.COLUMNHEADER,
+  Roles.ROWHEADER,
+  Roles.STATUSBAR,
+  Roles.SWITCH,
+  Roles.MATHML_MATH,
+];
 
 var gSimpleMatchFunc = function gSimpleMatchFunc(aAccessible) {
   // An object is simple, if it either has a single child lineage,
   // or has a flat subtree.
   function isSingleLineage(acc) {
     for (let child = acc; child; child = child.firstChild) {
       if (Utils.visibleChildCount(child) > 1) {
         return false;
@@ -113,100 +134,111 @@ var gSimpleMatchFunc = function gSimpleM
       if (Utils.visibleChildCount(child) > 0 || child.actionCount > 0) {
         return false;
       }
     }
     return true;
   }
 
   switch (aAccessible.role) {
-  case Roles.COMBOBOX:
-    // We don't want to ignore the subtree because this is often
-    // where the list box hangs out.
-    return Filters.MATCH;
-  case Roles.TEXT_LEAF:
-    {
+    case Roles.COMBOBOX:
+      // We don't want to ignore the subtree because this is often
+      // where the list box hangs out.
+      return Filters.MATCH;
+    case Roles.TEXT_LEAF: {
       // Nameless text leaves are boring, skip them.
       let name = aAccessible.name;
-      return (name && name.trim()) ? Filters.MATCH : Filters.IGNORE;
-    }
-  case Roles.STATICTEXT:
-    // Ignore prefix static text in list items. They are typically bullets or numbers.
-    return Utils.isListItemDecorator(aAccessible) ?
-      Filters.IGNORE : Filters.MATCH;
-  case Roles.GRAPHIC:
-    return TraversalRules._shouldSkipImage(aAccessible);
-  case Roles.HEADER:
-  case Roles.HEADING:
-  case Roles.COLUMNHEADER:
-  case Roles.ROWHEADER:
-  case Roles.STATUSBAR:
-    if ((aAccessible.childCount > 0 || aAccessible.name) &&
-        (isSingleLineage(aAccessible) || isFlatSubtree(aAccessible))) {
-      return Filters.MATCH | Filters.IGNORE_SUBTREE;
+      return name && name.trim() ? Filters.MATCH : Filters.IGNORE;
     }
-    return Filters.IGNORE;
-  case Roles.GRID_CELL:
-    return isSingleLineage(aAccessible) || isFlatSubtree(aAccessible) ?
-      Filters.MATCH | Filters.IGNORE_SUBTREE : Filters.IGNORE;
-  case Roles.LISTITEM:
-    {
-      let item = aAccessible.childCount === 2 &&
-        aAccessible.firstChild.role === Roles.STATICTEXT ?
-        aAccessible.lastChild : aAccessible;
-        return isSingleLineage(item) || isFlatSubtree(item) ?
-          Filters.MATCH | Filters.IGNORE_SUBTREE : Filters.IGNORE;
+    case Roles.STATICTEXT:
+      // Ignore prefix static text in list items. They are typically bullets or numbers.
+      return Utils.isListItemDecorator(aAccessible)
+        ? Filters.IGNORE
+        : Filters.MATCH;
+    case Roles.GRAPHIC:
+      return TraversalRules._shouldSkipImage(aAccessible);
+    case Roles.HEADER:
+    case Roles.HEADING:
+    case Roles.COLUMNHEADER:
+    case Roles.ROWHEADER:
+    case Roles.STATUSBAR:
+      if (
+        (aAccessible.childCount > 0 || aAccessible.name) &&
+        (isSingleLineage(aAccessible) || isFlatSubtree(aAccessible))
+      ) {
+        return Filters.MATCH | Filters.IGNORE_SUBTREE;
+      }
+      return Filters.IGNORE;
+    case Roles.GRID_CELL:
+      return isSingleLineage(aAccessible) || isFlatSubtree(aAccessible)
+        ? Filters.MATCH | Filters.IGNORE_SUBTREE
+        : Filters.IGNORE;
+    case Roles.LISTITEM: {
+      let item =
+        aAccessible.childCount === 2 &&
+        aAccessible.firstChild.role === Roles.STATICTEXT
+          ? aAccessible.lastChild
+          : aAccessible;
+      return isSingleLineage(item) || isFlatSubtree(item)
+        ? Filters.MATCH | Filters.IGNORE_SUBTREE
+        : Filters.IGNORE;
     }
-  default:
-    // Ignore the subtree, if there is one. So that we don't land on
-    // the same content that was already presented by its parent.
-    return Filters.MATCH |
-      Filters.IGNORE_SUBTREE;
+    default:
+      // Ignore the subtree, if there is one. So that we don't land on
+      // the same content that was already presented by its parent.
+      return Filters.MATCH | Filters.IGNORE_SUBTREE;
   }
 };
 
-var gSimplePreFilter = Prefilters.DEFUNCT |
+var gSimplePreFilter =
+  Prefilters.DEFUNCT |
   Prefilters.INVISIBLE |
   Prefilters.TRANSPARENT |
   Prefilters.PLATFORM_PRUNED;
 
-var TraversalRules = { // jshint ignore:line
+var TraversalRules = {
+  // jshint ignore:line
   Simple: new BaseTraversalRule(gSimpleTraversalRoles, gSimpleMatchFunc),
 
   SimpleOnScreen: new BaseTraversalRule(
-    gSimpleTraversalRoles, gSimpleMatchFunc,
-    gSimplePreFilter | Prefilters.OFFSCREEN),
+    gSimpleTraversalRoles,
+    gSimpleMatchFunc,
+    gSimplePreFilter | Prefilters.OFFSCREEN
+  ),
 
-  Anchor: new BaseTraversalRule(
-    [Roles.LINK],
-    function Anchor_match(aAccessible) {
-      // We want to ignore links, only focus named anchors.
-      if (Utils.getState(aAccessible).contains(States.LINKED)) {
-        return Filters.IGNORE;
-      }
-      return Filters.MATCH;
-    }),
+  Anchor: new BaseTraversalRule([Roles.LINK], function Anchor_match(
+    aAccessible
+  ) {
+    // We want to ignore links, only focus named anchors.
+    if (Utils.getState(aAccessible).contains(States.LINKED)) {
+      return Filters.IGNORE;
+    }
+    return Filters.MATCH;
+  }),
 
-  Button: new BaseTraversalRule(
-    [Roles.PUSHBUTTON,
-     Roles.SPINBUTTON,
-     Roles.TOGGLE_BUTTON,
-     Roles.BUTTONDROPDOWN,
-     Roles.BUTTONDROPDOWNGRID]),
+  Button: new BaseTraversalRule([
+    Roles.PUSHBUTTON,
+    Roles.SPINBUTTON,
+    Roles.TOGGLE_BUTTON,
+    Roles.BUTTONDROPDOWN,
+    Roles.BUTTONDROPDOWNGRID,
+  ]),
 
-  Combobox: new BaseTraversalRule(
-    [Roles.COMBOBOX,
-     Roles.LISTBOX]),
+  Combobox: new BaseTraversalRule([Roles.COMBOBOX, Roles.LISTBOX]),
 
   Landmark: new BaseTraversalRule(
     [],
     function Landmark_match(aAccessible) {
-      return Utils.getLandmarkName(aAccessible) ? Filters.MATCH :
-        Filters.IGNORE;
-    }, null, true),
+      return Utils.getLandmarkName(aAccessible)
+        ? Filters.MATCH
+        : Filters.IGNORE;
+    },
+    null,
+    true
+  ),
 
   /* A rule for Android's section navigation, lands on landmarks, regions, and
      on headings to aid navigation of traditionally structured documents */
   Section: new BaseTraversalRule(
     [],
     function Section_match(aAccessible) {
       if (aAccessible.role === Roles.HEADING) {
         return Filters.MATCH;
@@ -215,133 +247,141 @@ var TraversalRules = { // jshint ignore:
       let matchedRole = Utils.matchRoles(aAccessible, [
         "banner",
         "complementary",
         "contentinfo",
         "main",
         "navigation",
         "search",
         "region",
-        ]);
+      ]);
 
       return matchedRole ? Filters.MATCH : Filters.IGNORE;
-    }, null, true),
-
-  Entry: new BaseTraversalRule(
-    [Roles.ENTRY,
-     Roles.PASSWORD_TEXT]),
+    },
+    null,
+    true
+  ),
 
-  FormElement: new BaseTraversalRule(
-    [Roles.PUSHBUTTON,
-     Roles.SPINBUTTON,
-     Roles.TOGGLE_BUTTON,
-     Roles.BUTTONDROPDOWN,
-     Roles.BUTTONDROPDOWNGRID,
-     Roles.COMBOBOX,
-     Roles.LISTBOX,
-     Roles.ENTRY,
-     Roles.PASSWORD_TEXT,
-     Roles.PAGETAB,
-     Roles.RADIOBUTTON,
-     Roles.RADIO_MENU_ITEM,
-     Roles.SLIDER,
-     Roles.CHECKBUTTON,
-     Roles.CHECK_MENU_ITEM,
-     Roles.SWITCH]),
+  Entry: new BaseTraversalRule([Roles.ENTRY, Roles.PASSWORD_TEXT]),
 
-  Graphic: new BaseTraversalRule(
-    [Roles.GRAPHIC],
-    function Graphic_match(aAccessible) {
-      return TraversalRules._shouldSkipImage(aAccessible);
-    }),
-
-  Heading: new BaseTraversalRule(
-    [Roles.HEADING],
-    function Heading_match(aAccessible) {
-      return aAccessible.childCount > 0 ? Filters.MATCH : Filters.IGNORE;
-    }),
+  FormElement: new BaseTraversalRule([
+    Roles.PUSHBUTTON,
+    Roles.SPINBUTTON,
+    Roles.TOGGLE_BUTTON,
+    Roles.BUTTONDROPDOWN,
+    Roles.BUTTONDROPDOWNGRID,
+    Roles.COMBOBOX,
+    Roles.LISTBOX,
+    Roles.ENTRY,
+    Roles.PASSWORD_TEXT,
+    Roles.PAGETAB,
+    Roles.RADIOBUTTON,
+    Roles.RADIO_MENU_ITEM,
+    Roles.SLIDER,
+    Roles.CHECKBUTTON,
+    Roles.CHECK_MENU_ITEM,
+    Roles.SWITCH,
+  ]),
 
-  ListItem: new BaseTraversalRule(
-    [Roles.LISTITEM,
-     Roles.TERM]),
+  Graphic: new BaseTraversalRule([Roles.GRAPHIC], function Graphic_match(
+    aAccessible
+  ) {
+    return TraversalRules._shouldSkipImage(aAccessible);
+  }),
 
-  Link: new BaseTraversalRule(
-    [Roles.LINK],
-    function Link_match(aAccessible) {
-      // We want to ignore anchors, only focus real links.
-      if (Utils.getState(aAccessible).contains(States.LINKED)) {
-        return Filters.MATCH;
-      }
-      return Filters.IGNORE;
-    }),
+  Heading: new BaseTraversalRule([Roles.HEADING], function Heading_match(
+    aAccessible
+  ) {
+    return aAccessible.childCount > 0 ? Filters.MATCH : Filters.IGNORE;
+  }),
+
+  ListItem: new BaseTraversalRule([Roles.LISTITEM, Roles.TERM]),
+
+  Link: new BaseTraversalRule([Roles.LINK], function Link_match(aAccessible) {
+    // We want to ignore anchors, only focus real links.
+    if (Utils.getState(aAccessible).contains(States.LINKED)) {
+      return Filters.MATCH;
+    }
+    return Filters.IGNORE;
+  }),
 
   /* For TalkBack's "Control" granularity. Form conrols and links */
   Control: new BaseTraversalRule(
-    [Roles.PUSHBUTTON,
-     Roles.SPINBUTTON,
-     Roles.TOGGLE_BUTTON,
-     Roles.BUTTONDROPDOWN,
-     Roles.BUTTONDROPDOWNGRID,
-     Roles.COMBOBOX,
-     Roles.LISTBOX,
-     Roles.ENTRY,
-     Roles.PASSWORD_TEXT,
-     Roles.PAGETAB,
-     Roles.RADIOBUTTON,
-     Roles.RADIO_MENU_ITEM,
-     Roles.SLIDER,
-     Roles.CHECKBUTTON,
-     Roles.CHECK_MENU_ITEM,
-     Roles.SWITCH,
-     Roles.LINK,
-     Roles.MENUITEM],
+    [
+      Roles.PUSHBUTTON,
+      Roles.SPINBUTTON,
+      Roles.TOGGLE_BUTTON,
+      Roles.BUTTONDROPDOWN,
+      Roles.BUTTONDROPDOWNGRID,
+      Roles.COMBOBOX,
+      Roles.LISTBOX,
+      Roles.ENTRY,
+      Roles.PASSWORD_TEXT,
+      Roles.PAGETAB,
+      Roles.RADIOBUTTON,
+      Roles.RADIO_MENU_ITEM,
+      Roles.SLIDER,
+      Roles.CHECKBUTTON,
+      Roles.CHECK_MENU_ITEM,
+      Roles.SWITCH,
+      Roles.LINK,
+      Roles.MENUITEM,
+    ],
     function Control_match(aAccessible) {
       // We want to ignore anchors, only focus real links.
-      if (aAccessible.role == Roles.LINK &&
-          !Utils.getState(aAccessible).contains(States.LINKED)) {
+      if (
+        aAccessible.role == Roles.LINK &&
+        !Utils.getState(aAccessible).contains(States.LINKED)
+      ) {
         return Filters.IGNORE;
       }
       return Filters.MATCH;
-    }),
+    }
+  ),
 
   List: new BaseTraversalRule(
-    [Roles.LIST,
-     Roles.DEFINITION_LIST],
-    null, null, true),
+    [Roles.LIST, Roles.DEFINITION_LIST],
+    null,
+    null,
+    true
+  ),
 
-  PageTab: new BaseTraversalRule(
-    [Roles.PAGETAB]),
+  PageTab: new BaseTraversalRule([Roles.PAGETAB]),
 
   Paragraph: new BaseTraversalRule(
-    [Roles.PARAGRAPH,
-     Roles.SECTION],
+    [Roles.PARAGRAPH, Roles.SECTION],
     function Paragraph_match(aAccessible) {
-      for (let child = aAccessible.firstChild; child; child = child.nextSibling) {
+      for (
+        let child = aAccessible.firstChild;
+        child;
+        child = child.nextSibling
+      ) {
         if (child.role === Roles.TEXT_LEAF) {
           return Filters.MATCH | Filters.IGNORE_SUBTREE;
         }
       }
 
       return Filters.IGNORE;
-    }),
+    }
+  ),
 
-  RadioButton: new BaseTraversalRule(
-    [Roles.RADIOBUTTON,
-     Roles.RADIO_MENU_ITEM]),
+  RadioButton: new BaseTraversalRule([
+    Roles.RADIOBUTTON,
+    Roles.RADIO_MENU_ITEM,
+  ]),
 
-  Separator: new BaseTraversalRule(
-    [Roles.SEPARATOR]),
+  Separator: new BaseTraversalRule([Roles.SEPARATOR]),
+
+  Table: new BaseTraversalRule([Roles.TABLE]),
 
-  Table: new BaseTraversalRule(
-    [Roles.TABLE]),
-
-  Checkbox: new BaseTraversalRule(
-    [Roles.CHECKBUTTON,
-     Roles.CHECK_MENU_ITEM,
-     Roles.SWITCH /* A type of checkbox that represents on/off values */]),
+  Checkbox: new BaseTraversalRule([
+    Roles.CHECKBUTTON,
+    Roles.CHECK_MENU_ITEM,
+    Roles.SWITCH /* A type of checkbox that represents on/off values */,
+  ]),
 
   _shouldSkipImage: function _shouldSkipImage(aAccessible) {
     if (gSkipEmptyImages.value && aAccessible.name === "") {
       return Filters.IGNORE;
     }
     return Filters.MATCH;
   },
 };
@@ -385,10 +425,9 @@ var TraversalHelper = {
           break;
         }
       }
 
       return moved;
     }
     return aVirtualCursor[aMethod](rule);
   },
-
 };
--- a/accessible/jsat/Utils.jsm
+++ b/accessible/jsat/Utils.jsm
@@ -1,43 +1,66 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-ChromeUtils.defineModuleGetter(this, "Services", // jshint ignore:line
-  "resource://gre/modules/Services.jsm");
-ChromeUtils.defineModuleGetter(this, "Rect", // jshint ignore:line
-  "resource://gre/modules/Geometry.jsm");
-ChromeUtils.defineModuleGetter(this, "Roles", // jshint ignore:line
-  "resource://gre/modules/accessibility/Constants.jsm");
-ChromeUtils.defineModuleGetter(this, "Events", // jshint ignore:line
-  "resource://gre/modules/accessibility/Constants.jsm");
-ChromeUtils.defineModuleGetter(this, "Relations", // jshint ignore:line
-  "resource://gre/modules/accessibility/Constants.jsm");
-ChromeUtils.defineModuleGetter(this, "States", // jshint ignore:line
-  "resource://gre/modules/accessibility/Constants.jsm");
-ChromeUtils.defineModuleGetter(this, "PluralForm", // jshint ignore:line
-  "resource://gre/modules/PluralForm.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "Services", // jshint ignore:line
+  "resource://gre/modules/Services.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Rect", // jshint ignore:line
+  "resource://gre/modules/Geometry.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Roles", // jshint ignore:line
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Events", // jshint ignore:line
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Relations", // jshint ignore:line
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "States", // jshint ignore:line
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "PluralForm", // jshint ignore:line
+  "resource://gre/modules/PluralForm.jsm"
+);
 
 var EXPORTED_SYMBOLS = ["Utils", "Logger", "PivotContext", "PrefCache"]; // jshint ignore:line
 
-var Utils = { // jshint ignore:line
+var Utils = {
+  // jshint ignore:line
   _buildAppMap: {
     "{3c2e2abc-06d4-11e1-ac3b-374f68613e61}": "b2g",
     "{d1bfe7d9-c01e-4237-998b-7b5f960a4314}": "graphene",
     "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}": "browser",
     "{aa3c5121-dab2-40e2-81ca-7ea25febc110}": "mobile/android",
   },
 
   get AccService() {
     if (!this._AccService) {
-      this._AccService = Cc["@mozilla.org/accessibilityService;1"].
-        getService(Ci.nsIAccessibilityService);
+      this._AccService = Cc["@mozilla.org/accessibilityService;1"].getService(
+        Ci.nsIAccessibilityService
+      );
     }
 
     return this._AccService;
   },
 
   set MozBuildApp(value) {
     this._buildApp = value;
   },
@@ -47,63 +70,68 @@ var Utils = { // jshint ignore:line
       this._buildApp = this._buildAppMap[Services.appinfo.ID];
     }
     return this._buildApp;
   },
 
   get ScriptName() {
     if (!this._ScriptName) {
       this._ScriptName =
-        (Services.appinfo.processType == 2) ? "AccessFuContent" : "AccessFu";
+        Services.appinfo.processType == 2 ? "AccessFuContent" : "AccessFu";
     }
     return this._ScriptName;
   },
 
   get AndroidSdkVersion() {
     if (!this._AndroidSdkVersion) {
       if (Services.appinfo.OS == "Android") {
         this._AndroidSdkVersion = Services.sysinfo.getPropertyAsInt32(
-          "version");
+          "version"
+        );
       } else {
         // Most useful in desktop debugging.
         this._AndroidSdkVersion = 16;
       }
     }
     return this._AndroidSdkVersion;
   },
 
   set AndroidSdkVersion(value) {
     // When we want to mimic another version.
     this._AndroidSdkVersion = value;
   },
 
   getCurrentBrowser: function getCurrentBrowser(aWindow) {
-    return aWindow.document.querySelector("browser[type=content][primary=true]");
+    return aWindow.document.querySelector(
+      "browser[type=content][primary=true]"
+    );
   },
 
   get isContentProcess() {
     delete this.isContentProcess;
     this.isContentProcess =
       Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT;
     return this.isContentProcess;
   },
 
   localize: function localize(aOutput) {
     let outputArray = Array.isArray(aOutput) ? aOutput : [aOutput];
-    let localized =
-      outputArray.map(details => this.stringBundle.get(details));
+    let localized = outputArray.map(details => this.stringBundle.get(details));
     // Clean up the white space.
-    return localized.filter(word => word).map(word => word.trim()).
-      filter(trimmed => trimmed);
+    return localized
+      .filter(word => word)
+      .map(word => word.trim())
+      .filter(trimmed => trimmed);
   },
 
   get stringBundle() {
     delete this.stringBundle;
     let bundle = Services.strings.createBundle(
-      "chrome://global/locale/AccessFu.properties");
+      "chrome://global/locale/AccessFu.properties"
+    );
     this.stringBundle = {
       get: function stringBundle_get(aDetails = {}) {
         if (!aDetails || typeof aDetails === "string") {
           return aDetails;
         }
         let str = "";
         let string = aDetails.string;
         if (!string) {
@@ -145,22 +173,23 @@ var Utils = { // jshint ignore:line
       return null;
     }
   },
 
   getState: function getState(aAccessibleOrEvent) {
     if (aAccessibleOrEvent instanceof Ci.nsIAccessibleStateChangeEvent) {
       return new State(
         aAccessibleOrEvent.isExtraState ? 0 : aAccessibleOrEvent.state,
-        aAccessibleOrEvent.isExtraState ? aAccessibleOrEvent.state : 0);
+        aAccessibleOrEvent.isExtraState ? aAccessibleOrEvent.state : 0
+      );
     }
-      let state = {};
-      let extState = {};
-      aAccessibleOrEvent.getState(state, extState);
-      return new State(state.value, extState.value);
+    let state = {};
+    let extState = {};
+    aAccessibleOrEvent.getState(state, extState);
+    return new State(state.value, extState.value);
   },
 
   getAttributes: function getAttributes(aAccessible) {
     let attributes = {};
 
     if (aAccessible && aAccessible.attributes) {
       // Populate |attributes| object with |aAccessible|'s attribute key-value
       // pairs.
@@ -168,64 +197,86 @@ var Utils = { // jshint ignore:line
         attributes[attribute.key] = attribute.value;
       }
     }
 
     return attributes;
   },
 
   getVirtualCursor: function getVirtualCursor(aDocument) {
-    let doc = (aDocument instanceof Ci.nsIAccessible) ? aDocument :
-      this.AccService.getAccessibleFor(aDocument);
+    let doc =
+      aDocument instanceof Ci.nsIAccessible
+        ? aDocument
+        : this.AccService.getAccessibleFor(aDocument);
 
     return doc.QueryInterface(Ci.nsIAccessibleDocument).virtualCursor;
   },
 
   getContentResolution: function _getContentResolution(aAccessible) {
     return aAccessible.document.window.windowUtils.getResolution();
   },
 
   getBounds: function getBounds(aAccessible) {
-    let objX = {}, objY = {}, objW = {}, objH = {};
+    let objX = {},
+      objY = {},
+      objW = {},
+      objH = {};
     aAccessible.getBounds(objX, objY, objW, objH);
 
     return new Rect(objX.value, objY.value, objW.value, objH.value);
   },
 
   getTextSelection: function getTextSelection(aAccessible) {
     const accText = aAccessible.QueryInterface(Ci.nsIAccessibleText);
-    const start = {}, end = {};
+    const start = {},
+      end = {};
     if (accText.selectionCount) {
       accText.getSelectionBounds(0, start, end);
     } else {
       start.value = end.value = accText.caretOffset;
     }
 
     return [start.value, end.value];
   },
 
-  getTextBounds: function getTextBounds(aAccessible, aStart, aEnd,
-                                        aPreserveContentScale) {
+  getTextBounds: function getTextBounds(
+    aAccessible,
+    aStart,
+    aEnd,
+    aPreserveContentScale
+  ) {
     let accText = aAccessible.QueryInterface(Ci.nsIAccessibleText);
-    let objX = {}, objY = {}, objW = {}, objH = {};
-    accText.getRangeExtents(aStart, aEnd, objX, objY, objW, objH,
-      Ci.nsIAccessibleCoordinateType.COORDTYPE_SCREEN_RELATIVE);
+    let objX = {},
+      objY = {},
+      objW = {},
+      objH = {};
+    accText.getRangeExtents(
+      aStart,
+      aEnd,
+      objX,
+      objY,
+      objW,
+      objH,
+      Ci.nsIAccessibleCoordinateType.COORDTYPE_SCREEN_RELATIVE
+    );
 
     return new Rect(objX.value, objY.value, objW.value, objH.value);
   },
 
   isInSubtree: function isInSubtree(aAccessible, aSubTreeRoot) {
     let acc = aAccessible;
 
     // If aSubTreeRoot is an accessible document, we will only walk up the
     // ancestry of documents and skip everything else.
     if (aSubTreeRoot instanceof Ci.nsIAccessibleDocument) {
       while (acc) {
-        let parentDoc = acc instanceof Ci.nsIAccessibleDocument ?
-          acc.parentDocument : acc.document;
+        let parentDoc =
+          acc instanceof Ci.nsIAccessibleDocument
+            ? acc.parentDocument
+            : acc.document;
         if (parentDoc === aSubTreeRoot) {
           return true;
         }
         acc = parentDoc;
       }
       return false;
     }
 
@@ -255,18 +306,21 @@ var Utils = { // jshint ignore:line
 
   isAliveAndVisible: function isAliveAndVisible(aAccessible, aIsOnScreen) {
     if (!aAccessible) {
       return false;
     }
 
     try {
       let state = this.getState(aAccessible);
-      if (state.contains(States.DEFUNCT) || state.contains(States.INVISIBLE) ||
-          (aIsOnScreen && state.contains(States.OFFSCREEN))) {
+      if (
+        state.contains(States.DEFUNCT) ||
+        state.contains(States.INVISIBLE) ||
+        (aIsOnScreen && state.contains(States.OFFSCREEN))
+      ) {
         return false;
       }
     } catch (x) {
       return false;
     }
 
     return true;
   },
@@ -328,25 +382,30 @@ var Utils = { // jshint ignore:line
           return target;
         }
       }
     }
 
     return null;
   },
 
-  isListItemDecorator: function isListItemDecorator(aStaticText,
-                                                    aExcludeOrdered) {
+  isListItemDecorator: function isListItemDecorator(
+    aStaticText,
+    aExcludeOrdered
+  ) {
     let parent = aStaticText.parent;
     if (aExcludeOrdered && parent.parent.DOMNode.nodeName === "OL") {
       return false;
     }
 
-    return parent.role === Roles.LISTITEM && parent.childCount > 1 &&
-      aStaticText.indexInParent === 0;
+    return (
+      parent.role === Roles.LISTITEM &&
+      parent.childCount > 1 &&
+      aStaticText.indexInParent === 0
+    );
   },
 
   getTextLeafForOffset: function getTextLeafForOffset(aAccessible, aOffset) {
     let ht = aAccessible.QueryInterface(Ci.nsIAccessibleHyperText);
     let offset = 0;
     for (let child = aAccessible.firstChild; child; child = child.nextSibling) {
       if (ht.getLinkIndexAtOffset(offset) != -1) {
         // This is an embedded character, increment by one.
@@ -375,27 +434,30 @@ function State(aBase, aExtended) {
   this.extended = aExtended;
 }
 
 State.prototype = {
   contains: function State_contains(other) {
     return !!(this.base & other.base || this.extended & other.extended);
   },
   toString: function State_toString() {
-    let stateStrings = Utils.AccService.
-      getStringStates(this.base, this.extended);
+    let stateStrings = Utils.AccService.getStringStates(
+      this.base,
+      this.extended
+    );
     let statesArray = new Array(stateStrings.length);
     for (let i = 0; i < statesArray.length; i++) {
       statesArray[i] = stateStrings.item(i);
     }
     return "[" + statesArray.join(", ") + "]";
   },
 };
 
-var Logger = { // jshint ignore:line
+var Logger = {
+  // jshint ignore:line
   GESTURE: -1,
   DEBUG: 0,
   INFO: 1,
   WARNING: 2,
   ERROR: 3,
   _LEVEL_NAMES: ["GESTURE", "DEBUG", "INFO", "WARNING", "ERROR"],
 
   logLevel: 1, // INFO;
@@ -404,111 +466,140 @@ var Logger = { // jshint ignore:line
   useConsoleService: false,
 
   log: function log(aLogLevel) {
     if (aLogLevel < this.logLevel) {
       return;
     }
 
     let args = Array.prototype.slice.call(arguments, 1);
-    let message = (typeof(args[0]) === "function" ? args[0]() : args).join(" ");
-    message = "[" + Utils.ScriptName + "] " + this._LEVEL_NAMES[aLogLevel + 1] +
-      " " + message + "\n";
+    let message = (typeof args[0] === "function" ? args[0]() : args).join(" ");
+    message =
+      "[" +
+      Utils.ScriptName +
+      "] " +
+      this._LEVEL_NAMES[aLogLevel + 1] +
+      " " +
+      message +
+      "\n";
     dump(message);
     if (this.useConsoleService) {
       try {
         Services.console.logStringMessage(message);
       } catch (ex) {
         // There was an exception logging to the console service.
       }
     }
   },
 
   info: function info() {
     this.log.apply(
-      this, [this.INFO].concat(Array.prototype.slice.call(arguments)));
+      this,
+      [this.INFO].concat(Array.prototype.slice.call(arguments))
+    );
   },
 
   gesture: function gesture() {
     this.log.apply(
-      this, [this.GESTURE].concat(Array.prototype.slice.call(arguments)));
+      this,
+      [this.GESTURE].concat(Array.prototype.slice.call(arguments))
+    );
   },
 
   debug: function debug() {
     this.log.apply(
-      this, [this.DEBUG].concat(Array.prototype.slice.call(arguments)));
+      this,
+      [this.DEBUG].concat(Array.prototype.slice.call(arguments))
+    );
   },
 
   warning: function warning() {
     this.log.apply(
-      this, [this.WARNING].concat(Array.prototype.slice.call(arguments)));
+      this,
+      [this.WARNING].concat(Array.prototype.slice.call(arguments))
+    );
   },
 
   error: function error() {
     this.log.apply(
-      this, [this.ERROR].concat(Array.prototype.slice.call(arguments)));
+      this,
+      [this.ERROR].concat(Array.prototype.slice.call(arguments))
+    );
   },
 
   logException: function logException(
-    aException, aErrorMessage = "An exception has occured") {
+    aException,
+    aErrorMessage = "An exception has occured"
+  ) {
     try {
       let stackMessage = "";
       if (aException.stack) {
         stackMessage = "  " + aException.stack.replace(/\n/g, "\n  ");
       } else if (aException.location) {
         let frame = aException.location;
         let stackLines = [];
         while (frame && frame.lineNumber) {
           stackLines.push(
-            "  " + frame.name + "@" + frame.filename + ":" + frame.lineNumber);
+            "  " + frame.name + "@" + frame.filename + ":" + frame.lineNumber
+          );
           frame = frame.caller;
         }
         stackMessage = stackLines.join("\n");
       } else {
         stackMessage =
           "(" + aException.fileName + ":" + aException.lineNumber + ")";
       }
-      this.error(aErrorMessage + ":\n " +
-                 aException.message + "\n" +
-                 stackMessage);
+      this.error(
+        aErrorMessage + ":\n " + aException.message + "\n" + stackMessage
+      );
     } catch (x) {
       this.error(x);
     }
   },
 
   accessibleToString: function accessibleToString(aAccessible) {
     if (!aAccessible) {
       return "[ null ]";
     }
 
     try {
-      return "[ " + Utils.AccService.getStringRole(aAccessible.role) +
-        " | " + aAccessible.name + " ]";
+      return (
+        "[ " +
+        Utils.AccService.getStringRole(aAccessible.role) +
+        " | " +
+        aAccessible.name +
+        " ]"
+      );
     } catch (x) {
       return "[ defunct ]";
     }
   },
 
   eventToString: function eventToString(aEvent) {
     let str = Utils.AccService.getStringEventType(aEvent.eventType);
     if (aEvent.eventType == Events.STATE_CHANGE) {
       let event = aEvent.QueryInterface(Ci.nsIAccessibleStateChangeEvent);
-      let stateStrings = event.isExtraState ?
-        Utils.AccService.getStringStates(0, event.state) :
-        Utils.AccService.getStringStates(event.state, 0);
+      let stateStrings = event.isExtraState
+        ? Utils.AccService.getStringStates(0, event.state)
+        : Utils.AccService.getStringStates(event.state, 0);
       str += " (" + stateStrings.item(0) + ")";
     }
 
     if (aEvent.eventType == Events.VIRTUALCURSOR_CHANGED) {
       let event = aEvent.QueryInterface(
-        Ci.nsIAccessibleVirtualCursorChangeEvent);
-      let pivot = aEvent.accessible.QueryInterface(
-        Ci.nsIAccessibleDocument).virtualCursor;
-      str += " (" + this.accessibleToString(event.oldAccessible) + " -> " +
-        this.accessibleToString(pivot.position) + ")";
+        Ci.nsIAccessibleVirtualCursorChangeEvent
+      );
+      let pivot = aEvent.accessible.QueryInterface(Ci.nsIAccessibleDocument)
+        .virtualCursor;
+      str +=
+        " (" +
+        this.accessibleToString(event.oldAccessible) +
+        " -> " +
+        this.accessibleToString(pivot.position) +
+        ")";
     }
 
     return str;
   },
 
   statesToString: function statesToString(aAccessible) {
     return Utils.getState(aAccessible).toString();
   },
@@ -516,49 +607,58 @@ var Logger = { // jshint ignore:line
   dumpTree: function dumpTree(aLogLevel, aRootAccessible) {
     if (aLogLevel < this.logLevel) {
       return;
     }
 
     this._dumpTreeInternal(aLogLevel, aRootAccessible, 0);
   },
 
-  _dumpTreeInternal:
-    function _dumpTreeInternal(aLogLevel, aAccessible, aIndent) {
-      let indentStr = "";
-      for (let i = 0; i < aIndent; i++) {
-        indentStr += " ";
-      }
-      this.log(aLogLevel, indentStr,
-               this.accessibleToString(aAccessible),
-               "(" + this.statesToString(aAccessible) + ")");
-      for (let i = 0; i < aAccessible.childCount; i++) {
-        this._dumpTreeInternal(aLogLevel, aAccessible.getChildAt(i),
-          aIndent + 1);
-      }
-    },
+  _dumpTreeInternal: function _dumpTreeInternal(
+    aLogLevel,
+    aAccessible,
+    aIndent
+  ) {
+    let indentStr = "";
+    for (let i = 0; i < aIndent; i++) {
+      indentStr += " ";
+    }
+    this.log(
+      aLogLevel,
+      indentStr,
+      this.accessibleToString(aAccessible),
+      "(" + this.statesToString(aAccessible) + ")"
+    );
+    for (let i = 0; i < aAccessible.childCount; i++) {
+      this._dumpTreeInternal(aLogLevel, aAccessible.getChildAt(i), aIndent + 1);
+    }
+  },
 };
 
 /**
  * PivotContext: An object that generates and caches context information
  * for a given accessible and its relationship with another accessible.
  *
  * If the given accessible is a label for a nested control, then this
  * context will represent the nested control instead of the label.
  * With the exception of bounds calculation, which will use the containing
  * label. In this case the |accessible| field would be the embedded control,
  * and the |accessibleForBounds| field would be the label.
  */
-function PivotContext(aAccessible, aOldAccessible, // jshint ignore:line
-  aStartOffset, aEndOffset, aIgnoreAncestry = false,
-  aIncludeInvisible = false) {
+function PivotContext(
+  aAccessible,
+  aOldAccessible, // jshint ignore:line
+  aStartOffset,
+  aEndOffset,
+  aIgnoreAncestry = false,
+  aIncludeInvisible = false
+) {
   this._accessible = aAccessible;
   this._nestedControl = Utils.getEmbeddedControl(aAccessible);
-  this._oldAccessible =
-    this._isDefunct(aOldAccessible) ? null : aOldAccessible;
+  this._oldAccessible = this._isDefunct(aOldAccessible) ? null : aOldAccessible;
   this.startOffset = aStartOffset;
   this.endOffset = aEndOffset;
   this._ignoreAncestry = aIgnoreAncestry;
   this._includeInvisible = aIncludeInvisible;
 }
 
 PivotContext.prototype = {
   get accessible() {
@@ -580,44 +680,49 @@ PivotContext.prototype = {
   },
 
   get textAndAdjustedOffsets() {
     if (this.startOffset === -1 && this.endOffset === -1) {
       return null;
     }
 
     if (!this._textAndAdjustedOffsets) {
-      let result = {startOffset: this.startOffset,
-                    endOffset: this.endOffset,
-                    text: this._accessible.QueryInterface(Ci.nsIAccessibleText).
-                          getText(0,
-                            Ci.nsIAccessibleText.TEXT_OFFSET_END_OF_TEXT)};
+      let result = {
+        startOffset: this.startOffset,
+        endOffset: this.endOffset,
+        text: this._accessible
+          .QueryInterface(Ci.nsIAccessibleText)
+          .getText(0, Ci.nsIAccessibleText.TEXT_OFFSET_END_OF_TEXT),
+      };
       let hypertextAcc = this._accessible.QueryInterface(
-        Ci.nsIAccessibleHyperText);
+        Ci.nsIAccessibleHyperText
+      );
 
       // Iterate through the links in backwards order so text replacements don't
       // affect the offsets of links yet to be processed.
       for (let i = hypertextAcc.linkCount - 1; i >= 0; i--) {
         let link = hypertextAcc.getLinkAt(i);
         let linkText = "";
         if (link instanceof Ci.nsIAccessibleText) {
-          linkText = link.QueryInterface(Ci.nsIAccessibleText).
-                          getText(0,
-                            Ci.nsIAccessibleText.TEXT_OFFSET_END_OF_TEXT);
+          linkText = link
+            .QueryInterface(Ci.nsIAccessibleText)
+            .getText(0, Ci.nsIAccessibleText.TEXT_OFFSET_END_OF_TEXT);
         }
 
         let start = link.startIndex;
         let end = link.endIndex;
         for (let offset of ["startOffset", "endOffset"]) {
           if (this[offset] >= end) {
             result[offset] += linkText.length - (end - start);
           }
         }
-        result.text = result.text.substring(0, start) + linkText +
-                      result.text.substring(end);
+        result.text =
+          result.text.substring(0, start) +
+          linkText +
+          result.text.substring(end);
       }
 
       this._textAndAdjustedOffsets = result;
     }
 
     return this._textAndAdjustedOffsets;
   },
 
@@ -626,17 +731,17 @@ PivotContext.prototype = {
    * @param  {nsIAccessible} aAccessible.
    * @return {Array} Ancestry list.
    */
   _getAncestry: function _getAncestry(aAccessible) {
     let ancestry = [];
     let parent = aAccessible;
     try {
       while (parent && (parent = parent.parent)) {
-       ancestry.push(parent);
+        ancestry.push(parent);
       }
     } catch (x) {
       // A defunct accessible will raise an exception geting parent.
       Logger.debug("Failed to get parent:", x);
     }
     return ancestry.reverse();
   },
 
@@ -655,32 +760,35 @@ PivotContext.prototype = {
     return this._oldAncestry;
   },
 
   /**
    * A list of the current accessible's ancestry.
    */
   get currentAncestry() {
     if (!this._currentAncestry) {
-      this._currentAncestry = this._ignoreAncestry ? [] :
-        this._getAncestry(this.accessible);
+      this._currentAncestry = this._ignoreAncestry
+        ? []
+        : this._getAncestry(this.accessible);
     }
     return this._currentAncestry;
   },
 
   /*
    * This is a list of the accessible's ancestry up to the common ancestor
    * of the accessible and the old accessible. It is useful for giving the
    * user context as to where they are in the heirarchy.
    */
   get newAncestry() {
     if (!this._newAncestry) {
-      this._newAncestry = this._ignoreAncestry ? [] :
-        this.currentAncestry.filter(
-          (currentAncestor, i) => currentAncestor !== this.oldAncestry[i]);
+      this._newAncestry = this._ignoreAncestry
+        ? []
+        : this.currentAncestry.filter(
+            (currentAncestor, i) => currentAncestor !== this.oldAncestry[i]
+          );
     }
     return this._newAncestry;
   },
 
   /*
    * Traverse the accessible's subtree in pre or post order.
    * It only includes the accessible's visible chidren.
    * Note: needSubtree is a function argument that can be used to determine
@@ -711,27 +819,33 @@ PivotContext.prototype = {
   },
 
   /**
    * Get interaction hints for the context ancestry.
    * @return {Array} Array of interaction hints.
    */
   get interactionHints() {
     let hints = [];
-    this.newAncestry.concat(this.accessible).reverse().forEach(aAccessible => {
-      let hint = Utils.getAttributes(aAccessible)["moz-hint"];
-      if (hint) {
-        hints.push(hint);
-      } else if (aAccessible.actionCount > 0) {
-        hints.push({
-          string: Utils.AccService.getStringRole(
-            aAccessible.role).replace(/\s/g, "") + "-hint",
-        });
-      }
-    });
+    this.newAncestry
+      .concat(this.accessible)
+      .reverse()
+      .forEach(aAccessible => {
+        let hint = Utils.getAttributes(aAccessible)["moz-hint"];
+        if (hint) {
+          hints.push(hint);
+        } else if (aAccessible.actionCount > 0) {
+          hints.push({
+            string:
+              Utils.AccService.getStringRole(aAccessible.role).replace(
+                /\s/g,
+                ""
+              ) + "-hint",
+          });
+        }
+      });
     return hints;
   },
 
   /*
    * A subtree generator function, used to generate a flattened
    * list of the accessible's subtree in pre or post order.
    * It only includes the accessible's visible chidren.
    * @param {boolean} aPreorder A flag for traversal order. If true, traverse
@@ -753,42 +867,46 @@ PivotContext.prototype = {
       return this._cells.get(domNode);
     }
 
     let cellInfo = {};
     let getAccessibleCell = function getAccessibleCell(aAccessible) {
       if (!aAccessible) {
         return null;
       }
-      if (![
-            Roles.CELL,
-            Roles.COLUMNHEADER,
-            Roles.ROWHEADER,
-            Roles.MATHML_CELL,
-          ].includes(aAccessible.role)) {
-          return null;
+      if (
+        ![
+          Roles.CELL,
+          Roles.COLUMNHEADER,
+          Roles.ROWHEADER,
+          Roles.MATHML_CELL,
+        ].includes(aAccessible.role)
+      ) {
+        return null;
       }
       try {
         return aAccessible.QueryInterface(Ci.nsIAccessibleTableCell);
       } catch (x) {
         Logger.logException(x);
         return null;
       }
     };
     let getHeaders = function* getHeaders(aHeaderCells) {
-      for (let {name} of aHeaderCells.enumerate(Ci.nsIAccessible)) {
+      for (let { name } of aHeaderCells.enumerate(Ci.nsIAccessible)) {
         yield name;
       }
     };
 
     cellInfo.current = getAccessibleCell(aAccessible);
 
     if (!cellInfo.current) {
-      Logger.warning(aAccessible,
-        "does not support nsIAccessibleTableCell interface.");
+      Logger.warning(
+        aAccessible,
+        "does not support nsIAccessibleTableCell interface."
+      );
       this._cells.set(domNode, null);
       return null;
     }
 
     let table = cellInfo.current.table;
     if (table.isProbablyForLayout()) {
       this._cells.set(domNode, null);
       return null;
@@ -801,39 +919,45 @@ PivotContext.prototype = {
       let cell = getAccessibleCell(ancestor);
       if (cell && cell.table === table) {
         cellInfo.previous = cell;
       }
       ancestor = oldAncestry.shift();
     }
 
     if (cellInfo.previous) {
-      cellInfo.rowChanged = cellInfo.current.rowIndex !==
-        cellInfo.previous.rowIndex;
-      cellInfo.columnChanged = cellInfo.current.columnIndex !==
-        cellInfo.previous.columnIndex;
+      cellInfo.rowChanged =
+        cellInfo.current.rowIndex !== cellInfo.previous.rowIndex;
+      cellInfo.columnChanged =
+        cellInfo.current.columnIndex !== cellInfo.previous.columnIndex;
     } else {
       cellInfo.rowChanged = true;
       cellInfo.columnChanged = true;
     }
 
     cellInfo.rowExtent = cellInfo.current.rowExtent;
     cellInfo.columnExtent = cellInfo.current.columnExtent;
     cellInfo.columnIndex = cellInfo.current.columnIndex;
     cellInfo.rowIndex = cellInfo.current.rowIndex;
 
     cellInfo.columnHeaders = [];
-    if (cellInfo.columnChanged && cellInfo.current.role !==
-      Roles.COLUMNHEADER) {
-      cellInfo.columnHeaders = [...getHeaders(cellInfo.current.columnHeaderCells)];
+    if (
+      cellInfo.columnChanged &&
+      cellInfo.current.role !== Roles.COLUMNHEADER
+    ) {
+      cellInfo.columnHeaders = [
+        ...getHeaders(cellInfo.current.columnHeaderCells),
+      ];
     }
     cellInfo.rowHeaders = [];
-    if (cellInfo.rowChanged &&
-        (cellInfo.current.role === Roles.CELL ||
-         cellInfo.current.role === Roles.MATHML_CELL)) {
+    if (
+      cellInfo.rowChanged &&
+      (cellInfo.current.role === Roles.CELL ||
+        cellInfo.current.role === Roles.MATHML_CELL)
+    ) {
       cellInfo.rowHeaders = [...getHeaders(cellInfo.current.rowHeaderCells)];
     }
 
     this._cells.set(domNode, cellInfo);
     return cellInfo;
   },
 
   get bounds() {
@@ -848,17 +972,18 @@ PivotContext.prototype = {
     try {
       return Utils.getState(aAccessible).contains(States.DEFUNCT);
     } catch (x) {
       return true;
     }
   },
 };
 
-function PrefCache(aName, aCallback, aRunCallbackNow) { // jshint ignore:line
+function PrefCache(aName, aCallback, aRunCallbackNow) {
+  // jshint ignore:line
   this.name = aName;
   this.callback = aCallback;
 
   let branch = Services.prefs;
   this.value = this._getValue(branch);
 
   if (this.callback && aRunCallbackNow) {
     try {
@@ -900,11 +1025,13 @@ PrefCache.prototype = {
       try {
         this.callback(this.name, this.value, false);
       } catch (x) {
         Logger.logException(x);
       }
     }
   },
 
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
-                                           Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([
+    Ci.nsIObserver,
+    Ci.nsISupportsWeakReference,
+  ]),
 };
--- a/accessible/jsat/content-script.js
+++ b/accessible/jsat/content-script.js
@@ -1,24 +1,39 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* eslint-env mozilla/frame-script */
 
-ChromeUtils.defineModuleGetter(this, "Logger",
-  "resource://gre/modules/accessibility/Utils.jsm");
-ChromeUtils.defineModuleGetter(this, "Utils",
-  "resource://gre/modules/accessibility/Utils.jsm");
-ChromeUtils.defineModuleGetter(this, "EventManager",
-  "resource://gre/modules/accessibility/EventManager.jsm");
-ChromeUtils.defineModuleGetter(this, "ContentControl",
-  "resource://gre/modules/accessibility/ContentControl.jsm");
-ChromeUtils.defineModuleGetter(this, "States",
-  "resource://gre/modules/accessibility/Constants.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "Logger",
+  "resource://gre/modules/accessibility/Utils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Utils",
+  "resource://gre/modules/accessibility/Utils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "EventManager",
+  "resource://gre/modules/accessibility/EventManager.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "ContentControl",
+  "resource://gre/modules/accessibility/ContentControl.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "States",
+  "resource://gre/modules/accessibility/Constants.jsm"
+);
 
 Logger.info("content-script.js", content.document.location);
 
 function onStop(m) {
   Logger.debug("AccessFu:Stop");
 
   removeMessageListener("AccessFu:Stop", onStop);
 
--- a/accessible/tests/browser/bounds/browser_test_resolution.js
+++ b/accessible/tests/browser/bounds/browser_test_resolution.js
@@ -8,25 +8,29 @@
 
 async function testScaledBounds(browser, accDoc, scale, id, type = "object") {
   let acc = findAccessibleChildByID(accDoc, id);
 
   // Get document offset
   let [docX, docY] = getBounds(accDoc);
 
   // Get the unscaled bounds of the accessible
-  let [x, y, width, height] = type == "text" ?
-    getRangeExtents(acc, 0, -1, COORDTYPE_SCREEN_RELATIVE) : getBounds(acc);
+  let [x, y, width, height] =
+    type == "text"
+      ? getRangeExtents(acc, 0, -1, COORDTYPE_SCREEN_RELATIVE)
+      : getBounds(acc);
 
   await ContentTask.spawn(browser, scale, _scale => {
     setResolution(content.document, _scale);
   });
 
-  let [scaledX, scaledY, scaledWidth, scaledHeight] = type == "text" ?
-    getRangeExtents(acc, 0, -1, COORDTYPE_SCREEN_RELATIVE) : getBounds(acc);
+  let [scaledX, scaledY, scaledWidth, scaledHeight] =
+    type == "text"
+      ? getRangeExtents(acc, 0, -1, COORDTYPE_SCREEN_RELATIVE)
+      : getBounds(acc);
 
   let name = prettyName(acc);
   isWithin(scaledWidth, width * scale, 2, "Wrong scaled width of " + name);
   isWithin(scaledHeight, height * scale, 2, "Wrong scaled height of " + name);
   isWithin(scaledX - docX, (x - docX) * scale, 2, "Wrong scaled x of " + name);
   isWithin(scaledY - docY, (y - docY) * scale, 2, "Wrong scaled y of " + name);
 
   await ContentTask.spawn(browser, {}, () => {
@@ -43,15 +47,16 @@ async function runTests(browser, accDoc)
 
   await testScaledBounds(browser, accDoc, 2.0, "p1", "text");
   await testScaledBounds(browser, accDoc, 0.75, "p2", "text");
 }
 
 /**
  * Test accessible boundaries when page is zoomed
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
 <p id='p1' style='font-family: monospace;'>Tilimilitryamdiya</p>
 <p id="p2">para 2</p>
 <button id="b1">Hello</button>
 `,
   runTests
 );
--- a/accessible/tests/browser/bounds/browser_test_zoom.js
+++ b/accessible/tests/browser/bounds/browser_test_zoom.js
@@ -11,18 +11,22 @@
 async function getContentBoundsForDOMElm(browser, id) {
   return ContentTask.spawn(browser, id, contentId => {
     this.ok = ok;
     return getBoundsForDOMElm(contentId);
   });
 }
 
 async function testContentBounds(browser, acc) {
-  let [expectedX, expectedY, expectedWidth, expectedHeight] =
-    await getContentBoundsForDOMElm(browser, getAccessibleDOMNodeID(acc));
+  let [
+    expectedX,
+    expectedY,
+    expectedWidth,
+    expectedHeight,
+  ] = await getContentBoundsForDOMElm(browser, getAccessibleDOMNodeID(acc));
 
   let contentDPR = await getContentDPR(browser);
   let [x, y, width, height] = getBounds(acc, contentDPR);
   let prettyAccName = prettyName(acc);
   is(x, expectedX, "Wrong x coordinate of " + prettyAccName);
   is(y, expectedY, "Wrong y coordinate of " + prettyAccName);
   is(width, expectedWidth, "Wrong width of " + prettyAccName);
   ok(height >= expectedHeight, "Wrong height of " + prettyAccName);
@@ -53,17 +57,18 @@ async function runTests(browser, accDoc)
   await testContentBounds(browser, p1);
   await testContentBounds(browser, p2);
   await testContentBounds(browser, area);
 }
 
 /**
  * Test accessible boundaries when page is zoomed
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
 <p id="p1">para 1</p><p id="p2">para 2</p>
 <map name="atoz_map" id="map">
   <area id="area1" href="http://mozilla.org"
         coords=17,0,30,14" alt="mozilla.org" shape="rect">
 </map>
 <img id="imgmap" width="447" height="15"
      usemap="#atoz_map"
      src="http://example.com/a11y/accessible/tests/mochitest/letters.gif">`,
--- a/accessible/tests/browser/bounds/browser_test_zoom_text.js
+++ b/accessible/tests/browser/bounds/browser_test_zoom_text.js
@@ -10,28 +10,43 @@
 
 async function runTests(browser, accDoc) {
   async function testTextNode(id) {
     let hyperTextNode = findAccessibleChildByID(accDoc, id);
     let textNode = hyperTextNode.firstChild;
 
     let contentDPR = await getContentDPR(browser);
     let [x, y, width, height] = getBounds(textNode, contentDPR);
-    testTextBounds(hyperTextNode, 0, -1, [x, y, width, height],
-                   COORDTYPE_SCREEN_RELATIVE);
+    testTextBounds(
+      hyperTextNode,
+      0,
+      -1,
+      [x, y, width, height],
+      COORDTYPE_SCREEN_RELATIVE
+    );
   }
 
   async function testEmptyInputNode(id) {
     let inputNode = findAccessibleChildByID(accDoc, id);
 
     let [x, y, width, height] = getBounds(inputNode);
-    testTextBounds(inputNode, 0, -1, [x, y, width, height],
-                   COORDTYPE_SCREEN_RELATIVE);
-    testTextBounds(inputNode, 0, 0, [x, y, width, height],
-                   COORDTYPE_SCREEN_RELATIVE);
+    testTextBounds(
+      inputNode,
+      0,
+      -1,
+      [x, y, width, height],
+      COORDTYPE_SCREEN_RELATIVE
+    );
+    testTextBounds(
+      inputNode,
+      0,
+      0,
+      [x, y, width, height],
+      COORDTYPE_SCREEN_RELATIVE
+    );
   }
 
   loadFrameScripts(browser, { name: "layout.js", dir: MOCHITESTS_DIR });
 
   await testTextNode("p1");
   await testTextNode("p2");
   await testEmptyInputNode("i1");
 
@@ -44,13 +59,15 @@ async function runTests(browser, accDoc)
   await ContentTask.spawn(browser, {}, () => {
     zoomDocument(content.document, 1.0);
   });
 }
 
 /**
  * Test the text range boundary when page is zoomed
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <p id='p1' style='font-family: monospace;'>Tilimilitryamdiya</p>
   <p id='p2'>ل</p>
-  <form><input id='i1' /></form>`, runTests
+  <form><input id='i1' /></form>`,
+  runTests
 );
--- a/accessible/tests/browser/bounds/head.js
+++ b/accessible/tests/browser/bounds/head.js
@@ -6,21 +6,29 @@
 
 // Load the shared-head file first.
 /* import-globals-from ../shared-head.js */
 
 /* exported getContentDPR */
 
 Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js",
-  this);
+  this
+);
 
 // Loading and common.js from accessible/tests/mochitest/ for all tests, as
 // well as events.js.
-loadScripts({ name: "common.js", dir: MOCHITESTS_DIR },
-            { name: "layout.js", dir: MOCHITESTS_DIR }, "events.js");
+loadScripts(
+  { name: "common.js", dir: MOCHITESTS_DIR },
+  { name: "layout.js", dir: MOCHITESTS_DIR },
+  "events.js"
+);
 
 /**
  * Get content window DPR that can be different from parent window DPR.
  */
 async function getContentDPR(browser) {
-  return ContentTask.spawn(browser, null, () => content.window.devicePixelRatio);
+  return ContentTask.spawn(
+    browser,
+    null,
+    () => content.window.devicePixelRatio
+  );
 }
--- a/accessible/tests/browser/browser_shutdown_acc_reference.js
+++ b/accessible/tests/browser/browser_shutdown_acc_reference.js
@@ -3,17 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 add_task(async function() {
   // Create a11y service.
   let a11yInit = initPromise();
   let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
 
   await a11yInit;
   ok(accService, "Service initialized");
 
   // Accessible object reference will live longer than the scope of this
   // function.
   let acc = await new Promise(resolve => {
     let intervalId = setInterval(() => {
@@ -26,18 +27,22 @@ add_task(async function() {
   });
   ok(acc, "Accessible object is created");
 
   let canShutdown = false;
   // This promise will resolve only if canShutdown flag is set to true. If
   // 'a11y-init-or-shutdown' event with '0' flag comes before it can be shut
   // down, the promise will reject.
   let a11yShutdown = new Promise((resolve, reject) =>
-    shutdownPromise().then(flag => canShutdown ? resolve() :
-      reject("Accessible service was shut down incorrectly")));
+    shutdownPromise().then(flag =>
+      canShutdown
+        ? resolve()
+        : reject("Accessible service was shut down incorrectly")
+    )
+  );
 
   accService = null;
   ok(!accService, "Service is removed");
 
   // Force garbage collection that should not trigger shutdown because there is
   // a reference to an accessible object.
   forceGC();
   // Have some breathing room when removing a11y service references.
--- a/accessible/tests/browser/browser_shutdown_doc_acc_reference.js
+++ b/accessible/tests/browser/browser_shutdown_doc_acc_reference.js
@@ -3,33 +3,38 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 add_task(async function() {
   // Create a11y service.
   let a11yInit = initPromise();
   let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
 
   await a11yInit;
   ok(accService, "Service initialized");
 
   // Accessible document reference will live longer than the scope of this
   // function.
   let docAcc = accService.getAccessibleFor(document);
   ok(docAcc, "Accessible document is created");
 
   let canShutdown = false;
   // This promise will resolve only if canShutdown flag is set to true. If
   // 'a11y-init-or-shutdown' event with '0' flag comes before it can be shut
   // down, the promise will reject.
   let a11yShutdown = new Promise((resolve, reject) =>
-    shutdownPromise().then(flag => canShutdown ? resolve() :
-      reject("Accessible service was shut down incorrectly")));
+    shutdownPromise().then(flag =>
+      canShutdown
+        ? resolve()
+        : reject("Accessible service was shut down incorrectly")
+    )
+  );
 
   accService = null;
   ok(!accService, "Service is removed");
 
   // Force garbage collection that should not trigger shutdown because there is
   // a reference to an accessible document.
   forceGC();
   // Have some breathing room when removing a11y service references.
--- a/accessible/tests/browser/browser_shutdown_multi_acc_reference_doc.js
+++ b/accessible/tests/browser/browser_shutdown_multi_acc_reference_doc.js
@@ -3,17 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 add_task(async function() {
   // Create a11y service.
   let a11yInit = initPromise();
   let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
 
   await a11yInit;
   ok(accService, "Service initialized");
 
   let docAcc = accService.getAccessibleFor(document);
   ok(docAcc, "Accessible document is created");
 
   // Accessible object reference will live longer than the scope of this
@@ -29,18 +30,22 @@ add_task(async function() {
   });
   ok(acc, "Accessible object is created");
 
   let canShutdown = false;
   // This promise will resolve only if canShutdown flag is set to true. If
   // 'a11y-init-or-shutdown' event with '0' flag comes before it can be shut
   // down, the promise will reject.
   let a11yShutdown = new Promise((resolve, reject) =>
-    shutdownPromise().then(flag => canShutdown ? resolve() :
-      reject("Accessible service was shut down incorrectly")));
+    shutdownPromise().then(flag =>
+      canShutdown
+        ? resolve()
+        : reject("Accessible service was shut down incorrectly")
+    )
+  );
 
   accService = null;
   ok(!accService, "Service is removed");
 
   // Force garbage collection that should not trigger shutdown because there are
   // references to accessible objects.
   forceGC();
   // Have some breathing room when removing a11y service references.
--- a/accessible/tests/browser/browser_shutdown_multi_acc_reference_obj.js
+++ b/accessible/tests/browser/browser_shutdown_multi_acc_reference_obj.js
@@ -3,17 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 add_task(async function() {
   // Create a11y service.
   let a11yInit = initPromise();
   let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
 
   await a11yInit;
   ok(accService, "Service initialized");
 
   let docAcc = accService.getAccessibleFor(document);
   ok(docAcc, "Accessible document is created");
 
   // Accessible object reference will live longer than the scope of this
@@ -29,18 +30,22 @@ add_task(async function() {
   });
   ok(acc, "Accessible object is created");
 
   let canShutdown = false;
   // This promise will resolve only if canShutdown flag is set to true. If
   // 'a11y-init-or-shutdown' event with '0' flag comes before it can be shut
   // down, the promise will reject.
   let a11yShutdown = new Promise((resolve, reject) =>
-    shutdownPromise().then(flag => canShutdown ? resolve() :
-      reject("Accessible service was shut down incorrectly")));
+    shutdownPromise().then(flag =>
+      canShutdown
+        ? resolve()
+        : reject("Accessible service was shut down incorrectly")
+    )
+  );
 
   accService = null;
   ok(!accService, "Service is removed");
 
   // Force garbage collection that should not trigger shutdown because there are
   // references to accessible objects.
   forceGC();
   // Have some breathing room when removing a11y service references.
--- a/accessible/tests/browser/browser_shutdown_multi_proxy_acc_reference_doc.js
+++ b/accessible/tests/browser/browser_shutdown_multi_proxy_acc_reference_doc.js
@@ -4,73 +4,83 @@
 
 "use strict";
 
 add_task(async function() {
   // Making sure that the e10s is enabled on Windows for testing.
   await setE10sPrefs();
 
   let docLoaded = waitForEvent(
-    Ci.nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE, "body");
+    Ci.nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE,
+    "body"
+  );
   let a11yInit = initPromise();
   let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   ok(accService, "Service initialized");
   await a11yInit;
 
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: `data:text/html,
+  await BrowserTestUtils.withNewTab(
+    {
+      gBrowser,
+      url: `data:text/html,
       <html>
         <head>
           <meta charset="utf-8"/>
           <title>Accessibility Test</title>
         </head>
         <body id="body"><div id="div"></div></body>
-      </html>`
-  }, async function(browser) {
-    let docLoadedEvent = await docLoaded;
-    let docAcc = docLoadedEvent.accessibleDocument;
-    ok(docAcc, "Accessible document proxy is created");
-    // Remove unnecessary dangling references
-    docLoaded = null;
-    docLoadedEvent = null;
-    forceGC();
+      </html>`,
+    },
+    async function(browser) {
+      let docLoadedEvent = await docLoaded;
+      let docAcc = docLoadedEvent.accessibleDocument;
+      ok(docAcc, "Accessible document proxy is created");
+      // Remove unnecessary dangling references
+      docLoaded = null;
+      docLoadedEvent = null;
+      forceGC();
 
-    let acc = docAcc.getChildAt(0);
-    ok(acc, "Accessible proxy is created");
+      let acc = docAcc.getChildAt(0);
+      ok(acc, "Accessible proxy is created");
 
-    let canShutdown = false;
-    let a11yShutdown = new Promise((resolve, reject) =>
-    shutdownPromise().then(flag => canShutdown ? resolve() :
-      reject("Accessible service was shut down incorrectly")));
+      let canShutdown = false;
+      let a11yShutdown = new Promise((resolve, reject) =>
+        shutdownPromise().then(flag =>
+          canShutdown
+            ? resolve()
+            : reject("Accessible service was shut down incorrectly")
+        )
+      );
 
-    accService = null;
-    ok(!accService, "Service is removed");
-    // Force garbage collection that should not trigger shutdown because there
-    // is a reference to an accessible proxy.
-    forceGC();
-    // Have some breathing room when removing a11y service references.
-    await new Promise(resolve => executeSoon(resolve));
+      accService = null;
+      ok(!accService, "Service is removed");
+      // Force garbage collection that should not trigger shutdown because there
+      // is a reference to an accessible proxy.
+      forceGC();
+      // Have some breathing room when removing a11y service references.
+      await new Promise(resolve => executeSoon(resolve));
 
-    // Remove a reference to an accessible proxy.
-    acc = null;
-    ok(!acc, "Accessible proxy is removed");
-    // Force garbage collection that should not trigger shutdown because there is
-    // a reference to an accessible document proxy.
-    forceGC();
-    // Have some breathing room when removing a11y service references.
-    await new Promise(resolve => executeSoon(resolve));
+      // Remove a reference to an accessible proxy.
+      acc = null;
+      ok(!acc, "Accessible proxy is removed");
+      // Force garbage collection that should not trigger shutdown because there is
+      // a reference to an accessible document proxy.
+      forceGC();
+      // Have some breathing room when removing a11y service references.
+      await new Promise(resolve => executeSoon(resolve));
 
-    // Now allow a11y service to shutdown.
-    canShutdown = true;
-    // Remove a last reference to an accessible document proxy.
-    docAcc = null;
-    ok(!docAcc, "Accessible document proxy is removed");
+      // Now allow a11y service to shutdown.
+      canShutdown = true;
+      // Remove a last reference to an accessible document proxy.
+      docAcc = null;
+      ok(!docAcc, "Accessible document proxy is removed");
 
-    // Force garbage collection that should now trigger shutdown.
-    forceGC();
-    await a11yShutdown;
-  });
+      // Force garbage collection that should now trigger shutdown.
+      forceGC();
+      await a11yShutdown;
+    }
+  );
 
   // Unsetting e10s related preferences.
   await unsetE10sPrefs();
 });
--- a/accessible/tests/browser/browser_shutdown_multi_proxy_acc_reference_obj.js
+++ b/accessible/tests/browser/browser_shutdown_multi_proxy_acc_reference_obj.js
@@ -4,73 +4,83 @@
 
 "use strict";
 
 add_task(async function() {
   // Making sure that the e10s is enabled on Windows for testing.
   await setE10sPrefs();
 
   let docLoaded = waitForEvent(
-    Ci.nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE, "body");
+    Ci.nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE,
+    "body"
+  );
   let a11yInit = initPromise();
   let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   ok(accService, "Service initialized");
   await a11yInit;
 
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: `data:text/html,
+  await BrowserTestUtils.withNewTab(
+    {
+      gBrowser,
+      url: `data:text/html,
       <html>
         <head>
           <meta charset="utf-8"/>
           <title>Accessibility Test</title>
         </head>
         <body id="body"><div id="div"></div></body>
-      </html>`
-  }, async function(browser) {
-    let docLoadedEvent = await docLoaded;
-    let docAcc = docLoadedEvent.accessibleDocument;
-    ok(docAcc, "Accessible document proxy is created");
-    // Remove unnecessary dangling references
-    docLoaded = null;
-    docLoadedEvent = null;
-    forceGC();
+      </html>`,
+    },
+    async function(browser) {
+      let docLoadedEvent = await docLoaded;
+      let docAcc = docLoadedEvent.accessibleDocument;
+      ok(docAcc, "Accessible document proxy is created");
+      // Remove unnecessary dangling references
+      docLoaded = null;
+      docLoadedEvent = null;
+      forceGC();
 
-    let acc = docAcc.getChildAt(0);
-    ok(acc, "Accessible proxy is created");
+      let acc = docAcc.getChildAt(0);
+      ok(acc, "Accessible proxy is created");
 
-    let canShutdown = false;
-    let a11yShutdown = new Promise((resolve, reject) =>
-    shutdownPromise().then(flag => canShutdown ? resolve() :
-      reject("Accessible service was shut down incorrectly")));
+      let canShutdown = false;
+      let a11yShutdown = new Promise((resolve, reject) =>
+        shutdownPromise().then(flag =>
+          canShutdown
+            ? resolve()
+            : reject("Accessible service was shut down incorrectly")
+        )
+      );
 
-    accService = null;
-    ok(!accService, "Service is removed");
-    // Force garbage collection that should not trigger shutdown because there
-    // is a reference to an accessible proxy.
-    forceGC();
-    // Have some breathing room when removing a11y service references.
-    await new Promise(resolve => executeSoon(resolve));
+      accService = null;
+      ok(!accService, "Service is removed");
+      // Force garbage collection that should not trigger shutdown because there
+      // is a reference to an accessible proxy.
+      forceGC();
+      // Have some breathing room when removing a11y service references.
+      await new Promise(resolve => executeSoon(resolve));
 
-    // Remove a reference to an accessible document proxy.
-    docAcc = null;
-    ok(!docAcc, "Accessible document proxy is removed");
-    // Force garbage collection that should not trigger shutdown because there is
-    // a reference to an accessible proxy.
-    forceGC();
-    // Have some breathing room when removing a11y service references.
-    await new Promise(resolve => executeSoon(resolve));
+      // Remove a reference to an accessible document proxy.
+      docAcc = null;
+      ok(!docAcc, "Accessible document proxy is removed");
+      // Force garbage collection that should not trigger shutdown because there is
+      // a reference to an accessible proxy.
+      forceGC();
+      // Have some breathing room when removing a11y service references.
+      await new Promise(resolve => executeSoon(resolve));
 
-    // Now allow a11y service to shutdown.
-    canShutdown = true;
-    // Remove a last reference to an accessible proxy.
-    acc = null;
-    ok(!acc, "Accessible proxy is removed");
+      // Now allow a11y service to shutdown.
+      canShutdown = true;
+      // Remove a last reference to an accessible proxy.
+      acc = null;
+      ok(!acc, "Accessible proxy is removed");
 
-    // Force garbage collection that should now trigger shutdown.
-    forceGC();
-    await a11yShutdown;
-  });
+      // Force garbage collection that should now trigger shutdown.
+      forceGC();
+      await a11yShutdown;
+    }
+  );
 
   // Unsetting e10s related preferences.
   await unsetE10sPrefs();
 });
--- a/accessible/tests/browser/browser_shutdown_multi_reference.js
+++ b/accessible/tests/browser/browser_shutdown_multi_reference.js
@@ -4,34 +4,40 @@
 
 "use strict";
 
 add_task(async function() {
   info("Creating a service");
   // Create a11y service.
   let a11yInit = initPromise();
   let accService1 = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   await a11yInit;
   ok(accService1, "Service initialized");
 
   // Add another reference to a11y service. This will not trigger
   // 'a11y-init-or-shutdown' event
   let accService2 = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   ok(accService2, "Service initialized");
 
   info("Removing all service references");
   let canShutdown = false;
   // This promise will resolve only if canShutdown flag is set to true. If
   // 'a11y-init-or-shutdown' event with '0' flag comes before it can be shut
   // down, the promise will reject.
   let a11yShutdown = new Promise((resolve, reject) =>
-    shutdownPromise().then(flag => canShutdown ?
-      resolve() : reject("Accessible service was shut down incorrectly")));
+    shutdownPromise().then(flag =>
+      canShutdown
+        ? resolve()
+        : reject("Accessible service was shut down incorrectly")
+    )
+  );
   // Remove first a11y service reference.
   accService1 = null;
   ok(!accService1, "Service is removed");
   // Force garbage collection that should not trigger shutdown because there is
   // another reference.
   forceGC();
 
   // Have some breathing room when removing a11y service references.
--- a/accessible/tests/browser/browser_shutdown_parent_own_reference.js
+++ b/accessible/tests/browser/browser_shutdown_parent_own_reference.js
@@ -3,70 +3,90 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 add_task(async function() {
   // Making sure that the e10s is enabled on Windows for testing.
   await setE10sPrefs();
 
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: `data:text/html,
+  await BrowserTestUtils.withNewTab(
+    {
+      gBrowser,
+      url: `data:text/html,
       <html>
         <head>
           <meta charset="utf-8"/>
           <title>Accessibility Test</title>
         </head>
         <body></body>
-      </html>`
-  }, async function(browser) {
-    info("Creating a service in parent and waiting for service to be created " +
-      "in content");
-    // Create a11y service in the main process. This will trigger creating of
-    // the a11y service in parent as well.
-    let parentA11yInit = initPromise();
-    let contentA11yInit = initPromise(browser);
-    let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-      Ci.nsIAccessibilityService);
-    ok(accService, "Service initialized in parent");
-    await Promise.all([parentA11yInit, contentA11yInit]);
+      </html>`,
+    },
+    async function(browser) {
+      info(
+        "Creating a service in parent and waiting for service to be created " +
+          "in content"
+      );
+      // Create a11y service in the main process. This will trigger creating of
+      // the a11y service in parent as well.
+      let parentA11yInit = initPromise();
+      let contentA11yInit = initPromise(browser);
+      let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
+        Ci.nsIAccessibilityService
+      );
+      ok(accService, "Service initialized in parent");
+      await Promise.all([parentA11yInit, contentA11yInit]);
 
-    info("Adding additional reference to accessibility service in content " +
-      "process");
-    // Add a new reference to the a11y service inside the content process.
-    loadFrameScripts(browser, `let accService = Components.classes[
+      info(
+        "Adding additional reference to accessibility service in content " +
+          "process"
+      );
+      // Add a new reference to the a11y service inside the content process.
+      loadFrameScripts(
+        browser,
+        `let accService = Components.classes[
       '@mozilla.org/accessibilityService;1'].getService(
-        Components.interfaces.nsIAccessibilityService);`);
+        Components.interfaces.nsIAccessibilityService);`
+      );
 
-    info("Trying to shut down a service in content and making sure it stays " +
-      "alive as it was started by parent");
-    let contentCanShutdown = false;
-    // This promise will resolve only if contentCanShutdown flag is set to true.
-    // If 'a11y-init-or-shutdown' event with '0' flag (in content) comes before
-    // it can be shut down, the promise will reject.
-    let contentA11yShutdown = new Promise((resolve, reject) =>
-      shutdownPromise(browser).then(flag => contentCanShutdown ?
-        resolve() : reject("Accessible service was shut down incorrectly")));
-    // Remove a11y service reference in content and force garbage collection.
-    // This should not trigger shutdown since a11y was originally initialized by
-    // the main process.
-    loadFrameScripts(browser, `accService = null; Components.utils.forceGC();`);
-
-    // Have some breathing room between a11y service shutdowns.
-    await new Promise(resolve => executeSoon(resolve));
+      info(
+        "Trying to shut down a service in content and making sure it stays " +
+          "alive as it was started by parent"
+      );
+      let contentCanShutdown = false;
+      // This promise will resolve only if contentCanShutdown flag is set to true.
+      // If 'a11y-init-or-shutdown' event with '0' flag (in content) comes before
+      // it can be shut down, the promise will reject.
+      let contentA11yShutdown = new Promise((resolve, reject) =>
+        shutdownPromise(browser).then(flag =>
+          contentCanShutdown
+            ? resolve()
+            : reject("Accessible service was shut down incorrectly")
+        )
+      );
+      // Remove a11y service reference in content and force garbage collection.
+      // This should not trigger shutdown since a11y was originally initialized by
+      // the main process.
+      loadFrameScripts(
+        browser,
+        `accService = null; Components.utils.forceGC();`
+      );
 
-    info("Removing a service in parent");
-    // Now allow a11y service to shutdown in content.
-    contentCanShutdown = true;
-    // Remove the a11y service reference in the main process.
-    let parentA11yShutdown = shutdownPromise();
-    accService = null;
-    ok(!accService, "Service is removed in parent");
-    // Force garbage collection that should trigger shutdown in both parent and
-    // content.
-    forceGC();
-    await Promise.all([parentA11yShutdown, contentA11yShutdown]);
+      // Have some breathing room between a11y service shutdowns.
+      await new Promise(resolve => executeSoon(resolve));
 
-    // Unsetting e10s related preferences.
-    await unsetE10sPrefs();
-  });
+      info("Removing a service in parent");
+      // Now allow a11y service to shutdown in content.
+      contentCanShutdown = true;
+      // Remove the a11y service reference in the main process.
+      let parentA11yShutdown = shutdownPromise();
+      accService = null;
+      ok(!accService, "Service is removed in parent");
+      // Force garbage collection that should trigger shutdown in both parent and
+      // content.
+      forceGC();
+      await Promise.all([parentA11yShutdown, contentA11yShutdown]);
+
+      // Unsetting e10s related preferences.
+      await unsetE10sPrefs();
+    }
+  );
 });
--- a/accessible/tests/browser/browser_shutdown_pref.js
+++ b/accessible/tests/browser/browser_shutdown_pref.js
@@ -2,52 +2,61 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const PREF_ACCESSIBILITY_FORCE_DISABLED = "accessibility.force_disabled";
 
 add_task(async function testForceDisable() {
-  ok(!Services.appinfo.accessibilityEnabled, "Accessibility is disabled by default");
+  ok(
+    !Services.appinfo.accessibilityEnabled,
+    "Accessibility is disabled by default"
+  );
 
   info("Reset force disabled preference");
   Services.prefs.clearUserPref(PREF_ACCESSIBILITY_FORCE_DISABLED);
 
   info("Enable accessibility service via XPCOM");
   let a11yInit = initPromise();
   let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   await a11yInit;
   ok(Services.appinfo.accessibilityEnabled, "Accessibility is enabled");
 
   info("Force disable a11y service via preference");
   let a11yShutdown = shutdownPromise();
   Services.prefs.setIntPref(PREF_ACCESSIBILITY_FORCE_DISABLED, 1);
   await a11yShutdown;
   ok(!Services.appinfo.accessibilityEnabled, "Accessibility is disabled");
 
   info("Attempt to get an instance of a11y service and call its method.");
   accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   try {
     accService.getAccesssibleFor(document);
     ok(false, "getAccesssibleFor should've triggered an exception.");
   } catch (e) {
-    ok(true, "getAccesssibleFor triggers an exception as a11y service is shutdown.");
+    ok(
+      true,
+      "getAccesssibleFor triggers an exception as a11y service is shutdown."
+    );
   }
   ok(!Services.appinfo.accessibilityEnabled, "Accessibility is disabled");
 
   info("Reset force disabled preference");
   Services.prefs.clearUserPref(PREF_ACCESSIBILITY_FORCE_DISABLED);
 
   info("Create a11y service again");
   a11yInit = initPromise();
   accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   await a11yInit;
   ok(Services.appinfo.accessibilityEnabled, "Accessibility is enabled");
 
   info("Remove all references to a11y service");
   a11yShutdown = shutdownPromise();
   accService = null;
   forceGC();
   await a11yShutdown;
--- a/accessible/tests/browser/browser_shutdown_proxy_acc_reference.js
+++ b/accessible/tests/browser/browser_shutdown_proxy_acc_reference.js
@@ -5,60 +5,68 @@
 "use strict";
 
 add_task(async function() {
   // Making sure that the e10s is enabled on Windows for testing.
   await setE10sPrefs();
 
   let a11yInit = initPromise();
   let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   ok(accService, "Service initialized");
   await a11yInit;
 
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: `data:text/html,
+  await BrowserTestUtils.withNewTab(
+    {
+      gBrowser,
+      url: `data:text/html,
       <html>
         <head>
           <meta charset="utf-8"/>
           <title>Accessibility Test</title>
         </head>
         <body><div id="div" style="visibility: hidden;"></div></body>
-      </html>`
-  }, async function(browser) {
-    let onShow = waitForEvent(Ci.nsIAccessibleEvent.EVENT_SHOW, "div");
-    await invokeSetStyle(browser, "div", "visibility", "visible");
-    let showEvent = await onShow;
-    let divAcc = showEvent.accessible;
-    ok(divAcc, "Accessible proxy is created");
-    // Remove unnecessary dangling references
-    onShow = null;
-    showEvent = null;
-    forceGC();
-
-    let canShutdown = false;
-    let a11yShutdown = new Promise((resolve, reject) =>
-    shutdownPromise().then(flag => canShutdown ? resolve() :
-      reject("Accessible service was shut down incorrectly")));
+      </html>`,
+    },
+    async function(browser) {
+      let onShow = waitForEvent(Ci.nsIAccessibleEvent.EVENT_SHOW, "div");
+      await invokeSetStyle(browser, "div", "visibility", "visible");
+      let showEvent = await onShow;
+      let divAcc = showEvent.accessible;
+      ok(divAcc, "Accessible proxy is created");
+      // Remove unnecessary dangling references
+      onShow = null;
+      showEvent = null;
+      forceGC();
 
-    accService = null;
-    ok(!accService, "Service is removed");
-    // Force garbage collection that should not trigger shutdown because there
-    // is a reference to an accessible proxy.
-    forceGC();
-    // Have some breathing room when removing a11y service references.
-    await new Promise(resolve => executeSoon(resolve));
+      let canShutdown = false;
+      let a11yShutdown = new Promise((resolve, reject) =>
+        shutdownPromise().then(flag =>
+          canShutdown
+            ? resolve()
+            : reject("Accessible service was shut down incorrectly")
+        )
+      );
 
-    // Now allow a11y service to shutdown.
-    canShutdown = true;
-    // Remove a last reference to an accessible proxy.
-    divAcc = null;
-    ok(!divAcc, "Accessible proxy is removed");
+      accService = null;
+      ok(!accService, "Service is removed");
+      // Force garbage collection that should not trigger shutdown because there
+      // is a reference to an accessible proxy.
+      forceGC();
+      // Have some breathing room when removing a11y service references.
+      await new Promise(resolve => executeSoon(resolve));
 
-    // Force garbage collection that should now trigger shutdown.
-    forceGC();
-    await a11yShutdown;
-  });
+      // Now allow a11y service to shutdown.
+      canShutdown = true;
+      // Remove a last reference to an accessible proxy.
+      divAcc = null;
+      ok(!divAcc, "Accessible proxy is removed");
+
+      // Force garbage collection that should now trigger shutdown.
+      forceGC();
+      await a11yShutdown;
+    }
+  );
 
   // Unsetting e10s related preferences.
   await unsetE10sPrefs();
 });
--- a/accessible/tests/browser/browser_shutdown_proxy_doc_acc_reference.js
+++ b/accessible/tests/browser/browser_shutdown_proxy_doc_acc_reference.js
@@ -4,61 +4,71 @@
 
 "use strict";
 
 add_task(async function() {
   // Making sure that the e10s is enabled on Windows for testing.
   await setE10sPrefs();
 
   let docLoaded = waitForEvent(
-    Ci.nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE, "body");
+    Ci.nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE,
+    "body"
+  );
   let a11yInit = initPromise();
   let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   ok(accService, "Service initialized");
   await a11yInit;
 
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: `data:text/html,
+  await BrowserTestUtils.withNewTab(
+    {
+      gBrowser,
+      url: `data:text/html,
       <html>
         <head>
           <meta charset="utf-8"/>
           <title>Accessibility Test</title>
         </head>
         <body id="body"></body>
-      </html>`
-  }, async function(browser) {
-    let docLoadedEvent = await docLoaded;
-    let docAcc = docLoadedEvent.accessibleDocument;
-    ok(docAcc, "Accessible document proxy is created");
-    // Remove unnecessary dangling references
-    docLoaded = null;
-    docLoadedEvent = null;
-    forceGC();
+      </html>`,
+    },
+    async function(browser) {
+      let docLoadedEvent = await docLoaded;
+      let docAcc = docLoadedEvent.accessibleDocument;
+      ok(docAcc, "Accessible document proxy is created");
+      // Remove unnecessary dangling references
+      docLoaded = null;
+      docLoadedEvent = null;
+      forceGC();
 
-    let canShutdown = false;
-    let a11yShutdown = new Promise((resolve, reject) =>
-    shutdownPromise().then(flag => canShutdown ? resolve() :
-      reject("Accessible service was shut down incorrectly")));
+      let canShutdown = false;
+      let a11yShutdown = new Promise((resolve, reject) =>
+        shutdownPromise().then(flag =>
+          canShutdown
+            ? resolve()
+            : reject("Accessible service was shut down incorrectly")
+        )
+      );
 
-    accService = null;
-    ok(!accService, "Service is removed");
-    // Force garbage collection that should not trigger shutdown because there
-    // is a reference to an accessible proxy.
-    forceGC();
-    // Have some breathing room when removing a11y service references.
-    await new Promise(resolve => executeSoon(resolve));
+      accService = null;
+      ok(!accService, "Service is removed");
+      // Force garbage collection that should not trigger shutdown because there
+      // is a reference to an accessible proxy.
+      forceGC();
+      // Have some breathing room when removing a11y service references.
+      await new Promise(resolve => executeSoon(resolve));
 
-    // Now allow a11y service to shutdown.
-    canShutdown = true;
-    // Remove a last reference to an accessible document proxy.
-    docAcc = null;
-    ok(!docAcc, "Accessible document proxy is removed");
+      // Now allow a11y service to shutdown.
+      canShutdown = true;
+      // Remove a last reference to an accessible document proxy.
+      docAcc = null;
+      ok(!docAcc, "Accessible document proxy is removed");
 
-    // Force garbage collection that should now trigger shutdown.
-    forceGC();
-    await a11yShutdown;
-  });
+      // Force garbage collection that should now trigger shutdown.
+      forceGC();
+      await a11yShutdown;
+    }
+  );
 
   // Unsetting e10s related preferences.
   await unsetE10sPrefs();
 });
--- a/accessible/tests/browser/browser_shutdown_remote_no_reference.js
+++ b/accessible/tests/browser/browser_shutdown_remote_no_reference.js
@@ -3,68 +3,120 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 add_task(async function() {
   // Making sure that the e10s is enabled on Windows for testing.
   await setE10sPrefs();
 
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: `data:text/html,
+  await BrowserTestUtils.withNewTab(
+    {
+      gBrowser,
+      url: `data:text/html,
       <html>
         <head>
           <meta charset="utf-8"/>
           <title>Accessibility Test</title>
         </head>
         <body></body>
-      </html>`
-  }, async function(browser) {
-    info("Creating a service in parent and waiting for service to be created " +
-      "in content");
-    // Create a11y service in the main process. This will trigger creating of
-    // the a11y service in parent as well.
-    let parentA11yInit = initPromise();
-    let contentA11yInit = initPromise(browser);
-    let parentConsumersChanged = a11yConsumersChangedPromise();
-    let contentConsumersChanged =
-      ContentTask.spawn(browser, {}, a11yConsumersChangedPromise);
-    let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-      Ci.nsIAccessibilityService);
-    ok(accService, "Service initialized in parent");
-    await Promise.all([parentA11yInit, contentA11yInit]);
-    await parentConsumersChanged.then(data => Assert.deepEqual(data, {
-      XPCOM: true, MainProcess: false, PlatformAPI: false
-    }, "Accessibility service consumers in parent are correct."));
-    await contentConsumersChanged.then(data => Assert.deepEqual(data, {
-      XPCOM: false, MainProcess: true, PlatformAPI: false
-    }, "Accessibility service consumers in content are correct."));
+      </html>`,
+    },
+    async function(browser) {
+      info(
+        "Creating a service in parent and waiting for service to be created " +
+          "in content"
+      );
+      // Create a11y service in the main process. This will trigger creating of
+      // the a11y service in parent as well.
+      let parentA11yInit = initPromise();
+      let contentA11yInit = initPromise(browser);
+      let parentConsumersChanged = a11yConsumersChangedPromise();
+      let contentConsumersChanged = ContentTask.spawn(
+        browser,
+        {},
+        a11yConsumersChangedPromise
+      );
+      let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
+        Ci.nsIAccessibilityService
+      );
+      ok(accService, "Service initialized in parent");
+      await Promise.all([parentA11yInit, contentA11yInit]);
+      await parentConsumersChanged.then(data =>
+        Assert.deepEqual(
+          data,
+          {
+            XPCOM: true,
+            MainProcess: false,
+            PlatformAPI: false,
+          },
+          "Accessibility service consumers in parent are correct."
+        )
+      );
+      await contentConsumersChanged.then(data =>
+        Assert.deepEqual(
+          data,
+          {
+            XPCOM: false,
+            MainProcess: true,
+            PlatformAPI: false,
+          },
+          "Accessibility service consumers in content are correct."
+        )
+      );
 
-    Assert.deepEqual(JSON.parse(accService.getConsumers()), {
-      XPCOM: true, MainProcess: false, PlatformAPI: false
-    }, "Accessibility service consumers in parent are correct.");
+      Assert.deepEqual(
+        JSON.parse(accService.getConsumers()),
+        {
+          XPCOM: true,
+          MainProcess: false,
+          PlatformAPI: false,
+        },
+        "Accessibility service consumers in parent are correct."
+      );
 
-    info("Removing a service in parent and waiting for service to be shut " +
-      "down in content");
-    // Remove a11y service reference in the main process.
-    let parentA11yShutdown = shutdownPromise();
-    let contentA11yShutdown = shutdownPromise(browser);
-    parentConsumersChanged = a11yConsumersChangedPromise();
-    contentConsumersChanged =
-      ContentTask.spawn(browser, {}, a11yConsumersChangedPromise);
-    accService = null;
-    ok(!accService, "Service is removed in parent");
-    // Force garbage collection that should trigger shutdown in both main and
-    // content process.
-    forceGC();
-    await Promise.all([parentA11yShutdown, contentA11yShutdown]);
-    await parentConsumersChanged.then(data => Assert.deepEqual(data, {
-      XPCOM: false, MainProcess: false, PlatformAPI: false
-    }, "Accessibility service consumers are correct."));
-    await contentConsumersChanged.then(data => Assert.deepEqual(data, {
-      XPCOM: false, MainProcess: false, PlatformAPI: false
-    }, "Accessibility service consumers are correct."));
-  });
+      info(
+        "Removing a service in parent and waiting for service to be shut " +
+          "down in content"
+      );
+      // Remove a11y service reference in the main process.
+      let parentA11yShutdown = shutdownPromise();
+      let contentA11yShutdown = shutdownPromise(browser);
+      parentConsumersChanged = a11yConsumersChangedPromise();
+      contentConsumersChanged = ContentTask.spawn(
+        browser,
+        {},
+        a11yConsumersChangedPromise
+      );
+      accService = null;
+      ok(!accService, "Service is removed in parent");
+      // Force garbage collection that should trigger shutdown in both main and
+      // content process.
+      forceGC();
+      await Promise.all([parentA11yShutdown, contentA11yShutdown]);
+      await parentConsumersChanged.then(data =>
+        Assert.deepEqual(
+          data,
+          {
+            XPCOM: false,
+            MainProcess: false,
+            PlatformAPI: false,
+          },
+          "Accessibility service consumers are correct."
+        )
+      );
+      await contentConsumersChanged.then(data =>
+        Assert.deepEqual(
+          data,
+          {
+            XPCOM: false,
+            MainProcess: false,
+            PlatformAPI: false,
+          },
+          "Accessibility service consumers are correct."
+        )
+      );
+    }
+  );
 
   // Unsetting e10s related preferences.
   await unsetE10sPrefs();
 });
--- a/accessible/tests/browser/browser_shutdown_remote_only.js
+++ b/accessible/tests/browser/browser_shutdown_remote_only.js
@@ -3,38 +3,47 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 add_task(async function() {
   // Making sure that the e10s is enabled on Windows for testing.
   await setE10sPrefs();
 
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: `data:text/html,
+  await BrowserTestUtils.withNewTab(
+    {
+      gBrowser,
+      url: `data:text/html,
       <html>
         <head>
           <meta charset="utf-8"/>
           <title>Accessibility Test</title>
         </head>
         <body></body>
-      </html>`
-  }, async function(browser) {
-    info("Creating a service in content");
-    // Create a11y service in the content process.
-    let a11yInit = initPromise(browser);
-    loadFrameScripts(browser, `let accService = Components.classes[
+      </html>`,
+    },
+    async function(browser) {
+      info("Creating a service in content");
+      // Create a11y service in the content process.
+      let a11yInit = initPromise(browser);
+      loadFrameScripts(
+        browser,
+        `let accService = Components.classes[
       '@mozilla.org/accessibilityService;1'].getService(
-        Components.interfaces.nsIAccessibilityService);`);
-    await a11yInit;
+        Components.interfaces.nsIAccessibilityService);`
+      );
+      await a11yInit;
 
-    info("Removing a service in content");
-    // Remove a11y service reference from the content process.
-    let a11yShutdown = shutdownPromise(browser);
-    // Force garbage collection that should trigger shutdown.
-    loadFrameScripts(browser, `accService = null; Components.utils.forceGC();`);
-    await a11yShutdown;
+      info("Removing a service in content");
+      // Remove a11y service reference from the content process.
+      let a11yShutdown = shutdownPromise(browser);
+      // Force garbage collection that should trigger shutdown.
+      loadFrameScripts(
+        browser,
+        `accService = null; Components.utils.forceGC();`
+      );
+      await a11yShutdown;
 
-    // Unsetting e10s related preferences.
-    await unsetE10sPrefs();
-  });
+      // Unsetting e10s related preferences.
+      await unsetE10sPrefs();
+    }
+  );
 });
--- a/accessible/tests/browser/browser_shutdown_remote_own_reference.js
+++ b/accessible/tests/browser/browser_shutdown_remote_own_reference.js
@@ -3,99 +3,170 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 add_task(async function() {
   // Making sure that the e10s is enabled on Windows for testing.
   await setE10sPrefs();
 
-  await BrowserTestUtils.withNewTab({
-    gBrowser,
-    url: `data:text/html,
+  await BrowserTestUtils.withNewTab(
+    {
+      gBrowser,
+      url: `data:text/html,
       <html>
         <head>
           <meta charset="utf-8"/>
           <title>Accessibility Test</title>
         </head>
         <body></body>
-      </html>`
-  }, async function(browser) {
-    info("Creating a service in parent and waiting for service to be created " +
-      "in content");
-    // Create a11y service in the main process. This will trigger creating of
-    // the a11y service in parent as well.
-    let parentA11yInit = initPromise();
-    let contentA11yInit = initPromise(browser);
-    let contentConsumersChanged =
-      ContentTask.spawn(browser, {}, a11yConsumersChangedPromise);
-    let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-      Ci.nsIAccessibilityService);
-    ok(accService, "Service initialized in parent");
-    await Promise.all([parentA11yInit, contentA11yInit]);
-    await contentConsumersChanged.then(data => Assert.deepEqual(data, {
-      XPCOM: false, MainProcess: true, PlatformAPI: false
-    }, "Accessibility service consumers in content are correct."));
+      </html>`,
+    },
+    async function(browser) {
+      info(
+        "Creating a service in parent and waiting for service to be created " +
+          "in content"
+      );
+      // Create a11y service in the main process. This will trigger creating of
+      // the a11y service in parent as well.
+      let parentA11yInit = initPromise();
+      let contentA11yInit = initPromise(browser);
+      let contentConsumersChanged = ContentTask.spawn(
+        browser,
+        {},
+        a11yConsumersChangedPromise
+      );
+      let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
+        Ci.nsIAccessibilityService
+      );
+      ok(accService, "Service initialized in parent");
+      await Promise.all([parentA11yInit, contentA11yInit]);
+      await contentConsumersChanged.then(data =>
+        Assert.deepEqual(
+          data,
+          {
+            XPCOM: false,
+            MainProcess: true,
+            PlatformAPI: false,
+          },
+          "Accessibility service consumers in content are correct."
+        )
+      );
 
-    info("Adding additional reference to accessibility service in content " +
-      "process");
-    contentConsumersChanged =
-      ContentTask.spawn(browser, {}, a11yConsumersChangedPromise);
-    // Add a new reference to the a11y service inside the content process.
-    loadFrameScripts(browser, `var accService = Components.classes[
+      info(
+        "Adding additional reference to accessibility service in content " +
+          "process"
+      );
+      contentConsumersChanged = ContentTask.spawn(
+        browser,
+        {},
+        a11yConsumersChangedPromise
+      );
+      // Add a new reference to the a11y service inside the content process.
+      loadFrameScripts(
+        browser,
+        `var accService = Components.classes[
       '@mozilla.org/accessibilityService;1'].getService(
-        Components.interfaces.nsIAccessibilityService);`);
-    await contentConsumersChanged.then(data => Assert.deepEqual(data, {
-      XPCOM: true, MainProcess: true, PlatformAPI: false
-    }, "Accessibility service consumers in content are correct."));
+        Components.interfaces.nsIAccessibilityService);`
+      );
+      await contentConsumersChanged.then(data =>
+        Assert.deepEqual(
+          data,
+          {
+            XPCOM: true,
+            MainProcess: true,
+            PlatformAPI: false,
+          },
+          "Accessibility service consumers in content are correct."
+        )
+      );
 
-    const contentConsumers = await ContentTask.spawn(browser, {}, () =>
-      accService.getConsumers());
-    Assert.deepEqual(JSON.parse(contentConsumers), {
-      XPCOM: true, MainProcess: true, PlatformAPI: false
-    }, "Accessibility service consumers in parent are correct.");
+      const contentConsumers = await ContentTask.spawn(browser, {}, () =>
+        accService.getConsumers()
+      );
+      Assert.deepEqual(
+        JSON.parse(contentConsumers),
+        {
+          XPCOM: true,
+          MainProcess: true,
+          PlatformAPI: false,
+        },
+        "Accessibility service consumers in parent are correct."
+      );
 
-    info("Shutting down a service in parent and making sure the one in " +
-      "content stays alive");
-    let contentCanShutdown = false;
-    let parentA11yShutdown = shutdownPromise();
-    contentConsumersChanged =
-      ContentTask.spawn(browser, {}, a11yConsumersChangedPromise);
-    // This promise will resolve only if contentCanShutdown flag is set to true.
-    // If 'a11y-init-or-shutdown' event with '0' flag (in content) comes before
-    // it can be shut down, the promise will reject.
-    let contentA11yShutdown = new Promise((resolve, reject) =>
-      shutdownPromise(browser).then(flag => contentCanShutdown ?
-        resolve() : reject("Accessible service was shut down incorrectly")));
-    // Remove a11y service reference in the main process and force garbage
-    // collection. This should not trigger shutdown in content since a11y
-    // service is used by XPCOM.
-    accService = null;
-    ok(!accService, "Service is removed in parent");
-    // Force garbage collection that should not trigger shutdown because there
-    // is a reference in a content process.
-    forceGC();
-    loadFrameScripts(browser, `Components.utils.forceGC();`);
-    await parentA11yShutdown;
-    await contentConsumersChanged.then(data => Assert.deepEqual(data, {
-      XPCOM: true, MainProcess: false, PlatformAPI: false
-    }, "Accessibility service consumers in content are correct."));
+      info(
+        "Shutting down a service in parent and making sure the one in " +
+          "content stays alive"
+      );
+      let contentCanShutdown = false;
+      let parentA11yShutdown = shutdownPromise();
+      contentConsumersChanged = ContentTask.spawn(
+        browser,
+        {},
+        a11yConsumersChangedPromise
+      );
+      // This promise will resolve only if contentCanShutdown flag is set to true.
+      // If 'a11y-init-or-shutdown' event with '0' flag (in content) comes before
+      // it can be shut down, the promise will reject.
+      let contentA11yShutdown = new Promise((resolve, reject) =>
+        shutdownPromise(browser).then(flag =>
+          contentCanShutdown
+            ? resolve()
+            : reject("Accessible service was shut down incorrectly")
+        )
+      );
+      // Remove a11y service reference in the main process and force garbage
+      // collection. This should not trigger shutdown in content since a11y
+      // service is used by XPCOM.
+      accService = null;
+      ok(!accService, "Service is removed in parent");
+      // Force garbage collection that should not trigger shutdown because there
+      // is a reference in a content process.
+      forceGC();
+      loadFrameScripts(browser, `Components.utils.forceGC();`);
+      await parentA11yShutdown;
+      await contentConsumersChanged.then(data =>
+        Assert.deepEqual(
+          data,
+          {
+            XPCOM: true,
+            MainProcess: false,
+            PlatformAPI: false,
+          },
+          "Accessibility service consumers in content are correct."
+        )
+      );
 
-    // Have some breathing room between a11y service shutdowns.
-    await new Promise(resolve => executeSoon(resolve));
+      // Have some breathing room between a11y service shutdowns.
+      await new Promise(resolve => executeSoon(resolve));
 
-    info("Removing a service in content");
-    // Now allow a11y service to shutdown in content.
-    contentCanShutdown = true;
-    contentConsumersChanged =
-      ContentTask.spawn(browser, {}, a11yConsumersChangedPromise);
-    // Remove last reference to a11y service in content and force garbage
-    // collection that should trigger shutdown.
-    loadFrameScripts(browser, `accService = null; Components.utils.forceGC();`);
-    await contentA11yShutdown;
-    await contentConsumersChanged.then(data => Assert.deepEqual(data, {
-      XPCOM: false, MainProcess: false, PlatformAPI: false
-    }, "Accessibility service consumers in content are correct."));
+      info("Removing a service in content");
+      // Now allow a11y service to shutdown in content.
+      contentCanShutdown = true;
+      contentConsumersChanged = ContentTask.spawn(
+        browser,
+        {},
+        a11yConsumersChangedPromise
+      );
+      // Remove last reference to a11y service in content and force garbage
+      // collection that should trigger shutdown.
+      loadFrameScripts(
+        browser,
+        `accService = null; Components.utils.forceGC();`
+      );
+      await contentA11yShutdown;
+      await contentConsumersChanged.then(data =>
+        Assert.deepEqual(
+          data,
+          {
+            XPCOM: false,
+            MainProcess: false,
+            PlatformAPI: false,
+          },
+          "Accessibility service consumers in content are correct."
+        )
+      );
 
-    // Unsetting e10s related preferences.
-    await unsetE10sPrefs();
-  });
+      // Unsetting e10s related preferences.
+      await unsetE10sPrefs();
+    }
+  );
 });
--- a/accessible/tests/browser/browser_shutdown_scope_lifecycle.js
+++ b/accessible/tests/browser/browser_shutdown_scope_lifecycle.js
@@ -6,16 +6,17 @@
 
 add_task(async function() {
   // Create a11y service inside of the function scope. Its reference should be
   // released once the anonimous function is called.
   let a11yInitThenShutdown = initPromise().then(shutdownPromise);
 
   (function() {
     let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-      Ci.nsIAccessibilityService);
+      Ci.nsIAccessibilityService
+    );
     ok(accService, "Service initialized");
   })();
 
   // Force garbage collection that should trigger shutdown.
   forceGC();
   await a11yInitThenShutdown;
 });
--- a/accessible/tests/browser/browser_shutdown_start_restart.js
+++ b/accessible/tests/browser/browser_shutdown_start_restart.js
@@ -4,34 +4,36 @@
 
 "use strict";
 
 add_task(async function() {
   info("Creating a service");
   // Create a11y service.
   let a11yInit = initPromise();
   let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   await a11yInit;
   ok(accService, "Service initialized");
 
   info("Removing a service");
   // Remove the only reference to an a11y service.
   let a11yShutdown = shutdownPromise();
   accService = null;
   ok(!accService, "Service is removed");
   // Force garbage collection that should trigger shutdown.
   forceGC();
   await a11yShutdown;
 
   info("Recreating a service");
   // Re-create a11y service.
   a11yInit = initPromise();
   accService = Cc["@mozilla.org/accessibilityService;1"].getService(
-    Ci.nsIAccessibilityService);
+    Ci.nsIAccessibilityService
+  );
   await a11yInit;
   ok(accService, "Service initialized again");
 
   info("Removing a service again");
   // Remove the only reference to an a11y service again.
   a11yShutdown = shutdownPromise();
   accService = null;
   ok(!accService, "Service is removed again");
--- a/accessible/tests/browser/e10s/browser_caching_attributes.js
+++ b/accessible/tests/browser/e10s/browser_caching_attributes.js
@@ -12,92 +12,109 @@ loadScripts({ name: "attributes.js", dir
  */
 const defaultAttributes = {
   "margin-top": "0px",
   "margin-right": "0px",
   "margin-bottom": "0px",
   "margin-left": "0px",
   "text-align": "start",
   "text-indent": "0px",
-  "id": "textbox",
-  "tag": "input",
-  "display": "inline-block"
+  id: "textbox",
+  tag: "input",
+  display: "inline-block",
 };
 
 /**
  * Test data has the format of:
  * {
  *   desc        {String}         description for better logging
  *   expected    {Object}         expected attributes for given accessibles
  *   unexpected  {Object}         unexpected attributes for given accessibles
  *
  *   action      {?AsyncFunction} an optional action that awaits a change in
  *                                attributes
  *   attrs       {?Array}         an optional list of attributes to update
  *   waitFor     {?Number}        an optional event to wait for
  * }
  */
-const attributesTests = [{
-  desc: "Initiall accessible attributes",
-  expected: defaultAttributes,
-  unexpected: {
-    "line-number": "1",
-    "explicit-name": "true",
-    "container-live": "polite",
-    "live": "polite"
-  }
-}, {
-  desc: "@line-number attribute is present when textbox is focused",
-  async action(browser) {
-    await invokeFocus(browser, "textbox");
+const attributesTests = [
+  {
+    desc: "Initiall accessible attributes",
+    expected: defaultAttributes,
+    unexpected: {
+      "line-number": "1",
+      "explicit-name": "true",
+      "container-live": "polite",
+      live: "polite",
+    },
+  },
+  {
+    desc: "@line-number attribute is present when textbox is focused",
+    async action(browser) {
+      await invokeFocus(browser, "textbox");
+    },
+    waitFor: EVENT_FOCUS,
+    expected: Object.assign({}, defaultAttributes, { "line-number": "1" }),
+    unexpected: {
+      "explicit-name": "true",
+      "container-live": "polite",
+      live: "polite",
+    },
   },
-  waitFor: EVENT_FOCUS,
-  expected: Object.assign({}, defaultAttributes, { "line-number": "1" }),
-  unexpected: {
-    "explicit-name": "true",
-    "container-live": "polite",
-    "live": "polite"
-  }
-}, {
-  desc: "@aria-live sets container-live and live attributes",
-  attrs: [{
-    attr: "aria-live",
-    value: "polite"
-  }],
-  expected: Object.assign({}, defaultAttributes, {
-    "line-number": "1",
-    "container-live": "polite",
-    "live": "polite"
-  }),
-  unexpected: {
-    "explicit-name": "true"
-  }
-}, {
-  desc: "@title attribute sets explicit-name attribute to true",
-  attrs: [{
-    attr: "title",
-    value: "textbox"
-  }],
-  expected: Object.assign({}, defaultAttributes, {
-    "line-number": "1",
-    "explicit-name": "true",
-    "container-live": "polite",
-    "live": "polite"
-  }),
-  unexpected: {}
-}];
+  {
+    desc: "@aria-live sets container-live and live attributes",
+    attrs: [
+      {
+        attr: "aria-live",
+        value: "polite",
+      },
+    ],
+    expected: Object.assign({}, defaultAttributes, {
+      "line-number": "1",
+      "container-live": "polite",
+      live: "polite",
+    }),
+    unexpected: {
+      "explicit-name": "true",
+    },
+  },
+  {
+    desc: "@title attribute sets explicit-name attribute to true",
+    attrs: [
+      {
+        attr: "title",
+        value: "textbox",
+      },
+    ],
+    expected: Object.assign({}, defaultAttributes, {
+      "line-number": "1",
+      "explicit-name": "true",
+      "container-live": "polite",
+      live: "polite",
+    }),
+    unexpected: {},
+  },
+];
 
 /**
  * Test caching of accessible object attributes
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <input id="textbox" value="hello">`,
   async function(browser, accDoc) {
     let textbox = findAccessibleChildByID(accDoc, "textbox");
-    for (let { desc, action, attrs, expected, waitFor, unexpected } of attributesTests) {
+    for (let {
+      desc,
+      action,
+      attrs,
+      expected,
+      waitFor,
+      unexpected,
+    } of attributesTests) {
       info(desc);
       let onUpdate;
 
       if (waitFor) {
         onUpdate = waitForEvent(waitFor, "textbox");
       }
 
       if (action) {
--- a/accessible/tests/browser/e10s/browser_caching_description.js
+++ b/accessible/tests/browser/e10s/browser_caching_description.js
@@ -12,133 +12,183 @@ loadScripts({ name: "name.js", dir: MOCH
  * {
  *   desc      {String}   description for better logging
  *   expected  {String}   expected description value for a given accessible
  *   attrs     {?Array}   an optional list of attributes to update
  *   waitFor   {?Array}   an optional list of accessible events to wait for when
  *                        attributes are updated
  * }
  */
-const tests = [{
-  desc: "No description when there are no @alt, @title and @aria-describedby",
-  expected: ""
-}, {
-  desc: "Description from @aria-describedby attribute",
-  attrs: [{
-    attr: "aria-describedby",
-    value: "description"
-  }],
-  waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
-  expected: "aria description"
-}, {
-  desc: "No description from @aria-describedby since it is the same as the " +
-        "@alt attribute which is used as the name",
-  attrs: [{
-    attr: "alt",
-    value: "aria description"
-  }],
-  waitFor: [[EVENT_REORDER, "body"]],
-  expected: ""
-}, {
-  desc: "Description from @aria-describedby attribute when @alt and " +
-        "@aria-describedby are not the same",
-  attrs: [{
-    attr: "aria-describedby",
-    value: "description2"
-  }],
-  waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
-  expected: "another description"
-}, {
-  desc: "Description from @aria-describedby attribute when @title (used for " +
-        "name) and @aria-describedby are not the same",
-  attrs: [{
-    attr: "alt"
-  }, {
-    attr: "title",
-    value: "title"
-  }],
-  waitFor: [[EVENT_REORDER, "body"]],
-  expected: "another description"
-}, {
-  desc: "No description from @aria-describedby since it is the same as the " +
-        "@title attribute which is used as the name",
-  attrs: [{
-    attr: "title",
-    value: "another description"
-  }],
-  waitFor: [[EVENT_NAME_CHANGE, "image"]],
-  expected: ""
-}, {
-  desc: "No description with only @title attribute which is used as the name",
-  attrs: [{
-    attr: "aria-describedby"
-  }],
-  waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
-  expected: ""
-}, {
-  desc: "Description from @title attribute when @alt and @atitle are not the " +
-        "same",
-  attrs: [{
-    attr: "alt",
-    value: "aria description"
-  }],
-  waitFor: [[EVENT_REORDER, "body"]],
-  expected: "another description"
-}, {
-  desc: "No description from @title since it is the same as the @alt " +
-        "attribute which is used as the name",
-  attrs: [{
-    attr: "alt",
-    value: "another description"
-  }],
-  waitFor: [[EVENT_NAME_CHANGE, "image"]],
-  expected: ""
-}, {
-  desc: "No description from @aria-describedby since it is the same as the " +
-        "@alt (used for name) and @title attributes",
-  attrs: [{
-    attr: "aria-describedby",
-    value: "description2"
-  }],
-  waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
-  expected: ""
-}, {
-  desc: "Description from @aria-describedby attribute when it is different " +
-        "from @alt (used for name) and @title attributes",
-  attrs: [{
-    attr: "aria-describedby",
-    value: "description"
-  }],
-  waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
-  expected: "aria description"
-}, {
-  desc: "No description from @aria-describedby since it is the same as the " +
-        "@alt attribute (used for name) but different from title",
-  attrs: [{
-    attr: "alt",
-    value: "aria description"
-  }],
-  waitFor: [[EVENT_NAME_CHANGE, "image"]],
-  expected: ""
-}, {
-  desc: "Description from @aria-describedby attribute when @alt (used for " +
-        "name) and @aria-describedby are not the same but @title and " +
-        "aria-describedby are",
-  attrs: [{
-    attr: "aria-describedby",
-    value: "description2"
-  }],
-  waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
-  expected: "another description"
-}];
+const tests = [
+  {
+    desc: "No description when there are no @alt, @title and @aria-describedby",
+    expected: "",
+  },
+  {
+    desc: "Description from @aria-describedby attribute",
+    attrs: [
+      {
+        attr: "aria-describedby",
+        value: "description",
+      },
+    ],
+    waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
+    expected: "aria description",
+  },
+  {
+    desc:
+      "No description from @aria-describedby since it is the same as the " +
+      "@alt attribute which is used as the name",
+    attrs: [
+      {
+        attr: "alt",
+        value: "aria description",
+      },
+    ],
+    waitFor: [[EVENT_REORDER, "body"]],
+    expected: "",
+  },
+  {
+    desc:
+      "Description from @aria-describedby attribute when @alt and " +
+      "@aria-describedby are not the same",
+    attrs: [
+      {
+        attr: "aria-describedby",
+        value: "description2",
+      },
+    ],
+    waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
+    expected: "another description",
+  },
+  {
+    desc:
+      "Description from @aria-describedby attribute when @title (used for " +
+      "name) and @aria-describedby are not the same",
+    attrs: [
+      {
+        attr: "alt",
+      },
+      {
+        attr: "title",
+        value: "title",
+      },
+    ],
+    waitFor: [[EVENT_REORDER, "body"]],
+    expected: "another description",
+  },
+  {
+    desc:
+      "No description from @aria-describedby since it is the same as the " +
+      "@title attribute which is used as the name",
+    attrs: [
+      {
+        attr: "title",
+        value: "another description",
+      },
+    ],
+    waitFor: [[EVENT_NAME_CHANGE, "image"]],
+    expected: "",
+  },
+  {
+    desc: "No description with only @title attribute which is used as the name",
+    attrs: [
+      {
+        attr: "aria-describedby",
+      },
+    ],
+    waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
+    expected: "",
+  },
+  {
+    desc:
+      "Description from @title attribute when @alt and @atitle are not the " +
+      "same",
+    attrs: [
+      {
+        attr: "alt",
+        value: "aria description",
+      },
+    ],
+    waitFor: [[EVENT_REORDER, "body"]],
+    expected: "another description",
+  },
+  {
+    desc:
+      "No description from @title since it is the same as the @alt " +
+      "attribute which is used as the name",
+    attrs: [
+      {
+        attr: "alt",
+        value: "another description",
+      },
+    ],
+    waitFor: [[EVENT_NAME_CHANGE, "image"]],
+    expected: "",
+  },
+  {
+    desc:
+      "No description from @aria-describedby since it is the same as the " +
+      "@alt (used for name) and @title attributes",
+    attrs: [
+      {
+        attr: "aria-describedby",
+        value: "description2",
+      },
+    ],
+    waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
+    expected: "",
+  },
+  {
+    desc:
+      "Description from @aria-describedby attribute when it is different " +
+      "from @alt (used for name) and @title attributes",
+    attrs: [
+      {
+        attr: "aria-describedby",
+        value: "description",
+      },
+    ],
+    waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
+    expected: "aria description",
+  },
+  {
+    desc:
+      "No description from @aria-describedby since it is the same as the " +
+      "@alt attribute (used for name) but different from title",
+    attrs: [
+      {
+        attr: "alt",
+        value: "aria description",
+      },
+    ],
+    waitFor: [[EVENT_NAME_CHANGE, "image"]],
+    expected: "",
+  },
+  {
+    desc:
+      "Description from @aria-describedby attribute when @alt (used for " +
+      "name) and @aria-describedby are not the same but @title and " +
+      "aria-describedby are",
+    attrs: [
+      {
+        attr: "aria-describedby",
+        value: "description2",
+      },
+    ],
+    waitFor: [[EVENT_DESCRIPTION_CHANGE, "image"]],
+    expected: "another description",
+  },
+];
 
 /**
  * Test caching of accessible object description
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <p id="description">aria description</p>
   <p id="description2">another description</p>
   <img id="image" />`,
   async function(browser, accDoc) {
     let imgAcc = findAccessibleChildByID(accDoc, "image");
 
     for (let { desc, waitFor, attrs, expected } of tests) {
       info(desc);
--- a/accessible/tests/browser/e10s/browser_caching_name.js
+++ b/accessible/tests/browser/e10s/browser_caching_name.js
@@ -26,183 +26,239 @@ loadScripts({ name: "name.js", dir: MOCH
  *   * textchanged - text is inserted into a subtree and the test should only
  *                   continue after a text inserted event
  */
 const ARIARule = [{ attr: "aria-labelledby" }, { attr: "aria-label" }];
 const HTMLControlHeadRule = [...ARIARule, { elm: "label", isSibling: true }];
 const rules = {
   CSSContent: [{ elm: "style", isSibling: true }, { fromsubtree: true }],
   HTMLARIAGridCell: [...ARIARule, { fromsubtree: true }, { attr: "title" }],
-  HTMLControl: [...HTMLControlHeadRule, { fromsubtree: true },
-    { attr: "title" }],
+  HTMLControl: [
+    ...HTMLControlHeadRule,
+    { fromsubtree: true },
+    { attr: "title" },
+  ],
   HTMLElm: [...ARIARule, { attr: "title" }],
   HTMLImg: [...ARIARule, { attr: "alt", recreated: true }, { attr: "title" }],
   HTMLImgEmptyAlt: [...ARIARule, { attr: "title" }, { attr: "alt" }],
-  HTMLInputButton: [...HTMLControlHeadRule, { attr: "value" },
-    { attr: "title" }],
-  HTMLInputImage: [...HTMLControlHeadRule, { attr: "alt", recreated: true },
-    { attr: "value", recreated: true }, { attr: "title" }],
-  HTMLInputImageNoValidSrc: [...HTMLControlHeadRule,
-    { attr: "alt", recreated: true }, { attr: "value", recreated: true }],
-  HTMLInputReset: [...HTMLControlHeadRule,
-    { attr: "value", textchanged: true }],
-  HTMLInputSubmit: [...HTMLControlHeadRule,
-    { attr: "value", textchanged: true }],
+  HTMLInputButton: [
+    ...HTMLControlHeadRule,
+    { attr: "value" },
+    { attr: "title" },
+  ],
+  HTMLInputImage: [
+    ...HTMLControlHeadRule,
+    { attr: "alt", recreated: true },
+    { attr: "value", recreated: true },
+    { attr: "title" },
+  ],
+  HTMLInputImageNoValidSrc: [
+    ...HTMLControlHeadRule,
+    { attr: "alt", recreated: true },
+    { attr: "value", recreated: true },
+  ],
+  HTMLInputReset: [
+    ...HTMLControlHeadRule,
+    { attr: "value", textchanged: true },
+  ],
+  HTMLInputSubmit: [
+    ...HTMLControlHeadRule,
+    { attr: "value", textchanged: true },
+  ],
   HTMLLink: [...ARIARule, { fromsubtree: true }, { attr: "title" }],
   HTMLLinkImage: [...ARIARule, { elm: "img" }, { attr: "title" }],
-  HTMLOption: [...ARIARule, { attr: "label" }, { fromsubtree: true },
-    { attr: "title" }],
-  HTMLTable: [...ARIARule, { elm: "caption" }, { attr: "summary" },
-    { attr: "title" }]
+  HTMLOption: [
+    ...ARIARule,
+    { attr: "label" },
+    { fromsubtree: true },
+    { attr: "title" },
+  ],
+  HTMLTable: [
+    ...ARIARule,
+    { elm: "caption" },
+    { attr: "summary" },
+    { attr: "title" },
+  ],
 };
 
-const markupTests = [{
-  id: "btn",
-  ruleset: "HTMLControl",
-  markup: `
+const markupTests = [
+  {
+    id: "btn",
+    ruleset: "HTMLControl",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <label for="btn">test4</label>
     <button id="btn"
             aria-label="test1"
             aria-labelledby="l1 l2"
             title="test5">press me</button>`,
-  expected: ["test2 test3", "test1", "test4", "press me", "test5"]
-}, {
-  id: "btn",
-  ruleset: "HTMLInputButton",
-  markup: `
+    expected: ["test2 test3", "test1", "test4", "press me", "test5"],
+  },
+  {
+    id: "btn",
+    ruleset: "HTMLInputButton",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <label for="btn">test4</label>
     <input id="btn"
            type="button"
            aria-label="test1"
            aria-labelledby="l1 l2"
            value="name from value"
            alt="no name from al"
            src="no name from src"
            data="no name from data"
            title="name from title"/>`,
-  expected: ["test2 test3", "test1", "test4", "name from value",
-    "name from title"]
-}, {
-  id: "btn-submit",
-  ruleset: "HTMLInputSubmit",
-  markup: `
+    expected: [
+      "test2 test3",
+      "test1",
+      "test4",
+      "name from value",
+      "name from title",
+    ],
+  },
+  {
+    id: "btn-submit",
+    ruleset: "HTMLInputSubmit",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <label for="btn-submit">test4</label>
     <input id="btn-submit"
            type="submit"
            aria-label="test1"
            aria-labelledby="l1 l2"
            value="name from value"
            alt="no name from atl"
            src="no name from src"
            data="no name from data"
            title="no name from title"/>`,
-  expected: ["test2 test3", "test1", "test4", "name from value"]
-}, {
-  id: "btn-reset",
-  ruleset: "HTMLInputReset",
-  markup: `
+    expected: ["test2 test3", "test1", "test4", "name from value"],
+  },
+  {
+    id: "btn-reset",
+    ruleset: "HTMLInputReset",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <label for="btn-reset">test4</label>
     <input id="btn-reset"
            type="reset"
            aria-label="test1"
            aria-labelledby="l1 l2"
            value="name from value"
            alt="no name from alt"
            src="no name from src"
            data="no name from data"
            title="no name from title"/>`,
-  expected: ["test2 test3", "test1", "test4", "name from value"]
-}, {
-  id: "btn-image",
-  ruleset: "HTMLInputImage",
-  markup: `
+    expected: ["test2 test3", "test1", "test4", "name from value"],
+  },
+  {
+    id: "btn-image",
+    ruleset: "HTMLInputImage",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <label for="btn-image">test4</label>
     <input id="btn-image"
            type="image"
            aria-label="test1"
            aria-labelledby="l1 l2"
            alt="name from alt"
            value="name from value"
            src="http://example.com/a11y/accessible/tests/mochitest/moz.png"
            data="no name from data"
            title="name from title"/>`,
-  expected: ["test2 test3", "test1", "test4", "name from alt",
-    "name from value", "name from title"]
-}, {
-  id: "btn-image",
-  ruleset: "HTMLInputImageNoValidSrc",
-  markup: `
+    expected: [
+      "test2 test3",
+      "test1",
+      "test4",
+      "name from alt",
+      "name from value",
+      "name from title",
+    ],
+  },
+  {
+    id: "btn-image",
+    ruleset: "HTMLInputImageNoValidSrc",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <label for="btn-image">test4</label>
     <input id="btn-image"
            type="image"
            aria-label="test1"
            aria-labelledby="l1 l2"
            alt="name from alt"
            value="name from value"
            data="no name from data"
            title="no name from title"/>`,
-  expected: ["test2 test3", "test1", "test4", "name from alt",
-    "name from value"]
-}, {
-  id: "opt",
-  ruleset: "HTMLOption",
-  markup: `
+    expected: [
+      "test2 test3",
+      "test1",
+      "test4",
+      "name from alt",
+      "name from value",
+    ],
+  },
+  {
+    id: "opt",
+    ruleset: "HTMLOption",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <select>
       <option id="opt"
               aria-label="test1"
               aria-labelledby="l1 l2"
               label="test4"
               title="test5">option1</option>
       <option>option2</option>
     </select>`,
-  expected: ["test2 test3", "test1", "test4", "option1", "test5"]
-}, {
-  id: "img",
-  ruleset: "HTMLImg",
-  markup: `
+    expected: ["test2 test3", "test1", "test4", "option1", "test5"],
+  },
+  {
+    id: "img",
+    ruleset: "HTMLImg",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <img id="img"
          aria-label="Logo of Mozilla"
          aria-labelledby="l1 l2"
          alt="Mozilla logo"
          title="This is a logo"
          src="http://example.com/a11y/accessible/tests/mochitest/moz.png"/>`,
-  expected: ["test2 test3", "Logo of Mozilla", "Mozilla logo", "This is a logo"]
-}, {
-  id: "imgemptyalt",
-  ruleset: "HTMLImgEmptyAlt",
-  markup: `
+    expected: [
+      "test2 test3",
+      "Logo of Mozilla",
+      "Mozilla logo",
+      "This is a logo",
+    ],
+  },
+  {
+    id: "imgemptyalt",
+    ruleset: "HTMLImgEmptyAlt",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <img id="imgemptyalt"
          aria-label="Logo of Mozilla"
          aria-labelledby="l1 l2"
          title="This is a logo"
          alt=""
          src="http://example.com/a11y/accessible/tests/mochitest/moz.png"/>`,
-  expected: ["test2 test3", "Logo of Mozilla", "This is a logo", ""]
-}, {
-  id: "tc",
-  ruleset: "HTMLElm",
-  markup: `
+    expected: ["test2 test3", "Logo of Mozilla", "This is a logo", ""],
+  },
+  {
+    id: "tc",
+    ruleset: "HTMLElm",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <label for="tc">test4</label>
     <table>
       <tr>
         <td id="tc"
             aria-label="test1"
             aria-labelledby="l1 l2"
@@ -210,21 +266,22 @@ const markupTests = [{
           <p>This is a paragraph</p>
           <a href="#">This is a link</a>
           <ul>
             <li>This is a list</li>
           </ul>
         </td>
       </tr>
     </table>`,
-  expected: ["test2 test3", "test1", "test5"]
-}, {
-  id: "gc",
-  ruleset: "HTMLARIAGridCell",
-  markup: `
+    expected: ["test2 test3", "test1", "test5"],
+  },
+  {
+    id: "gc",
+    ruleset: "HTMLARIAGridCell",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <label for="gc">test4</label>
     <table>
       <tr>
         <td id="gc"
             role="gridcell"
             aria-label="test1"
@@ -234,112 +291,132 @@ const markupTests = [{
           <a href="#">This is a link</a>
           <ul>
             <li>Listitem1</li>
             <li>Listitem2</li>
           </ul>
         </td>
       </tr>
     </table>`,
-  expected: ["test2 test3", "test1",
-    "This is a paragraph This is a link \u2022 Listitem1 \u2022 Listitem2",
-    "This is a paragraph This is a link This is a list"]
-}, {
-  id: "t",
-  ruleset: "HTMLTable",
-  markup: `
+    expected: [
+      "test2 test3",
+      "test1",
+      "This is a paragraph This is a link \u2022 Listitem1 \u2022 Listitem2",
+      "This is a paragraph This is a link This is a list",
+    ],
+  },
+  {
+    id: "t",
+    ruleset: "HTMLTable",
+    markup: `
     <span id="l1">lby_tst6_1</span>
     <span id="l2">lby_tst6_2</span>
     <label for="t">label_tst6</label>
     <table id="t"
            aria-label="arialabel_tst6"
            aria-labelledby="l1 l2"
            summary="summary_tst6"
            title="title_tst6">
       <caption>caption_tst6</caption>
       <tr>
         <td>cell1</td>
         <td>cell2</td>
       </tr>
     </table>`,
-  expected: ["lby_tst6_1 lby_tst6_2", "arialabel_tst6", "caption_tst6",
-    "summary_tst6", "title_tst6"]
-}, {
-  id: "btn",
-  ruleset: "CSSContent",
-  markup: `
+    expected: [
+      "lby_tst6_1 lby_tst6_2",
+      "arialabel_tst6",
+      "caption_tst6",
+      "summary_tst6",
+      "title_tst6",
+    ],
+  },
+  {
+    id: "btn",
+    ruleset: "CSSContent",
+    markup: `
     <style>
       button::before {
         content: "do not ";
       }
     </style>
     <button id="btn">press me</button>`,
-  expected: ["do not press me", "press me"]
-}, {
-  // TODO: uncomment when Bug-1256382 is resoved.
-  // id: 'li',
-  // ruleset: 'CSSContent',
-  // markup: `
-  //   <style>
-  //     ul {
-  //       list-style-type: decimal;
-  //     }
-  //   </style>
-  //   <ul id="ul">
-  //     <li id="li">Listitem</li>
-  //   </ul>`,
-  // expected: ['1. Listitem', `${String.fromCharCode(0x2022)} Listitem`]
-// }, {
-  id: "a",
-  ruleset: "HTMLLink",
-  markup: `
+    expected: ["do not press me", "press me"],
+  },
+  {
+    // TODO: uncomment when Bug-1256382 is resoved.
+    // id: 'li',
+    // ruleset: 'CSSContent',
+    // markup: `
+    //   <style>
+    //     ul {
+    //       list-style-type: decimal;
+    //     }
+    //   </style>
+    //   <ul id="ul">
+    //     <li id="li">Listitem</li>
+    //   </ul>`,
+    // expected: ['1. Listitem', `${String.fromCharCode(0x2022)} Listitem`]
+    // }, {
+    id: "a",
+    ruleset: "HTMLLink",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <a id="a"
        aria-label="test1"
        aria-labelledby="l1 l2"
        title="test4">test5</a>`,
-  expected: ["test2 test3", "test1", "test5", "test4"]
-}, {
-  id: "a-img",
-  ruleset: "HTMLLinkImage",
-  markup: `
+    expected: ["test2 test3", "test1", "test5", "test4"],
+  },
+  {
+    id: "a-img",
+    ruleset: "HTMLLinkImage",
+    markup: `
     <span id="l1">test2</span>
     <span id="l2">test3</span>
     <a id="a-img"
        aria-label="test1"
        aria-labelledby="l1 l2"
        title="test4"><img alt="test5"/></a>`,
-  expected: ["test2 test3", "test1", "test5", "test4"]
-}];
+    expected: ["test2 test3", "test1", "test5", "test4"],
+  },
+];
 
 /**
  * Test accessible name that is calculated from an attribute, remove the
  * attribute before proceeding to the next name test. If attribute removal
  * results in a reorder or text inserted event - wait for it. If accessible
  * becomes defunct, update its reference using the one that is attached to one
  * of the above events.
  * @param {Object} browser      current "tabbrowser" element
  * @param {Object} target       { acc, parent, id } structure that contains an
  *                               accessible, its parent and its content element
  *                               id.
  * @param {Object} rule         current attr rule for name calculation
  * @param {[type]} expected     expected name value
  */
 async function testAttrRule(browser, target, rule, expected) {
-  let {id, parent, acc} = target;
-  let {recreated, textchanged, attr} = rule;
+  let { id, parent, acc } = target;
+  let { recreated, textchanged, attr } = rule;
 
   testName(acc, expected);
 
   if (recreated || textchanged) {
-    let [event] = await contentSpawnMutation(browser, {
-      expected: [recreated ? [EVENT_REORDER, parent] : [EVENT_TEXT_INSERTED, id]]
-    }, ([contentId, contentAttr]) =>
-      content.document.getElementById(contentId).removeAttribute(contentAttr), [id, attr]);
+    let [event] = await contentSpawnMutation(
+      browser,
+      {
+        expected: [
+          recreated ? [EVENT_REORDER, parent] : [EVENT_TEXT_INSERTED, id],
+        ],
+      },
+      ([contentId, contentAttr]) =>
+        content.document.getElementById(contentId).removeAttribute(contentAttr),
+      [id, attr]
+    );
 
     // Update accessible just in case it is now defunct.
     target.acc = findAccessibleChildByID(event.accessible, id);
   } else {
     await invokeSetAttribute(browser, id, attr);
   }
 }
 
@@ -351,23 +428,28 @@ async function testAttrRule(browser, tar
  * @param {Object} browser      current "tabbrowser" element
  * @param {Object} target       { acc, parent, id } structure that contains an
  *                               accessible, its parent and its content element
  *                               id.
  * @param {Object} rule         current elm rule for name calculation
  * @param {[type]} expected     expected name value
  */
 async function testElmRule(browser, target, rule, expected) {
-  let {id, parent, acc} = target;
-  let {isSibling, elm} = rule;
+  let { id, parent, acc } = target;
+  let { isSibling, elm } = rule;
 
   testName(acc, expected);
-  let [event] = await contentSpawnMutation(browser, {
-    expected: [[EVENT_REORDER, isSibling ? parent : id]]
-  }, contentElm => content.document.querySelector(`${contentElm}`).remove(), elm);
+  let [event] = await contentSpawnMutation(
+    browser,
+    {
+      expected: [[EVENT_REORDER, isSibling ? parent : id]],
+    },
+    contentElm => content.document.querySelector(`${contentElm}`).remove(),
+    elm
+  );
 
   // Update accessible just in case it is now defunct.
   target.acc = findAccessibleChildByID(event.accessible, id);
 }
 
 /**
  * Test accessible name that is calculated from its subtree, remove the subtree
  * and wait for a reorder event before proceeding to the next name test. If
@@ -376,27 +458,32 @@ async function testElmRule(browser, targ
  * @param {Object} browser      current "tabbrowser" element
  * @param {Object} target       { acc, parent, id } structure that contains an
  *                               accessible, its parent and its content element
  *                               id.
  * @param {Object} rule         current subtree rule for name calculation
  * @param {[type]} expected     expected name value
  */
 async function testSubtreeRule(browser, target, rule, expected) {
-  let {id, acc} = target;
+  let { id, acc } = target;
 
   testName(acc, expected);
-  let [event] = await contentSpawnMutation(browser, {
-    expected: [[EVENT_REORDER, id]]
-  }, contentId => {
-    let elm = content.document.getElementById(contentId);
-    while (elm.firstChild) {
-      elm.firstChild.remove();
-    }
-  }, id);
+  let [event] = await contentSpawnMutation(
+    browser,
+    {
+      expected: [[EVENT_REORDER, id]],
+    },
+    contentId => {
+      let elm = content.document.getElementById(contentId);
+      while (elm.firstChild) {
+        elm.firstChild.remove();
+      }
+    },
+    id
+  );
 
   // Update accessible just in case it is now defunct.
   target.acc = findAccessibleChildByID(event.accessible, id);
 }
 
 /**
  * Iterate over a list of rules and test accessible names for each one of the
  * rules.
@@ -425,9 +512,10 @@ async function testNameRule(browser, tar
 markupTests.forEach(({ id, ruleset, markup, expected }) =>
   addAccessibleTask(markup, async function(browser, accDoc) {
     // Find a target accessible from an accessible subtree.
     let acc = findAccessibleChildByID(accDoc, id);
     // Find target's parent accessible from an accessible subtree.
     let parent = getAccessibleDOMNodeID(acc.parent);
     let target = { id, parent, acc };
     await testNameRule(browser, target, rules[ruleset], expected);
-  }));
+  })
+);
--- a/accessible/tests/browser/e10s/browser_caching_relations.js
+++ b/accessible/tests/browser/e10s/browser_caching_relations.js
@@ -14,49 +14,60 @@ loadScripts({ name: "relations.js", dir:
  *   hostRelation         corresponding host relation type
  *   dependantRelation    corresponding dependant relation type
  * ]
  */
 const attrRelationsSpec = [
   ["aria-labelledby", RELATION_LABELLED_BY, RELATION_LABEL_FOR],
   ["aria-describedby", RELATION_DESCRIBED_BY, RELATION_DESCRIPTION_FOR],
   ["aria-controls", RELATION_CONTROLLER_FOR, RELATION_CONTROLLED_BY],
-  ["aria-flowto", RELATION_FLOWS_TO, RELATION_FLOWS_FROM]
+  ["aria-flowto", RELATION_FLOWS_TO, RELATION_FLOWS_FROM],
 ];
 
-async function testRelated(browser, accDoc, attr, hostRelation, dependantRelation) {
+async function testRelated(
+  browser,
+  accDoc,
+  attr,
+  hostRelation,
+  dependantRelation
+) {
   let host = findAccessibleChildByID(accDoc, "host");
   let dependant1 = findAccessibleChildByID(accDoc, "dependant1");
   let dependant2 = findAccessibleChildByID(accDoc, "dependant2");
 
   /**
    * Test data has the format of:
    * {
    *   desc      {String}   description for better logging
    *   attrs     {?Array}   an optional list of attributes to update
    *   expected  {Array}    expected relation values for dependant1, dependant2
    *                        and host respectively.
    * }
    */
-  const tests = [{
-    desc: "No attribute",
-    expected: [ null, null, null ]
-  }, {
-    desc: "Set attribute",
-    attrs: [{ key: attr, value: "dependant1" }],
-    expected: [ host, null, dependant1 ]
-  }, {
-    desc: "Change attribute",
-    attrs: [{ key: attr, value: "dependant2" }],
-    expected: [ null, host, dependant2 ]
-  }, {
-    desc: "Remove attribute",
-    attrs: [{ key: attr }],
-    expected: [ null, null, null ]
-  }];
+  const tests = [
+    {
+      desc: "No attribute",
+      expected: [null, null, null],
+    },
+    {
+      desc: "Set attribute",
+      attrs: [{ key: attr, value: "dependant1" }],
+      expected: [host, null, dependant1],
+    },
+    {
+      desc: "Change attribute",
+      attrs: [{ key: attr, value: "dependant2" }],
+      expected: [null, host, dependant2],
+    },
+    {
+      desc: "Remove attribute",
+      attrs: [{ key: attr }],
+      expected: [null, null, null],
+    },
+  ];
 
   for (let { desc, attrs, expected } of tests) {
     info(desc);
 
     if (attrs) {
       for (let { key, value } of attrs) {
         await invokeSetAttribute(browser, "host", key, value);
       }
@@ -66,17 +77,18 @@ async function testRelated(browser, accD
     testRelation(dependant2, dependantRelation, expected[1]);
     testRelation(host, hostRelation, expected[2]);
   }
 }
 
 /**
  * Test caching of relations between accessible objects.
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <div id="dependant1">label</div>
   <div id="dependant2">label2</div>
   <div role="checkbox" id="host"></div>`,
   async function(browser, accDoc) {
     for (let spec of attrRelationsSpec) {
       await testRelated(browser, accDoc, ...spec);
     }
   }
--- a/accessible/tests/browser/e10s/browser_caching_states.js
+++ b/accessible/tests/browser/e10s/browser_caching_states.js
@@ -1,18 +1,20 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 /* import-globals-from ../../mochitest/states.js */
-loadScripts({ name: "role.js", dir: MOCHITESTS_DIR },
-            { name: "states.js", dir: MOCHITESTS_DIR });
+loadScripts(
+  { name: "role.js", dir: MOCHITESTS_DIR },
+  { name: "states.js", dir: MOCHITESTS_DIR }
+);
 
 /**
  * Test data has the format of:
  * {
  *   desc      {String}   description for better logging
  *   expected  {Array}    expected states for a given accessible that have the
  *                        following format:
  *                          [
@@ -21,80 +23,111 @@ loadScripts({ name: "role.js", dir: MOCH
  *                            absent state,
  *                            absent extra state
  *                          ]
  *   attrs     {?Array}   an optional list of attributes to update
  * }
  */
 
 // State caching tests for attribute changes
-const attributeTests = [{
-  desc: "Checkbox with @checked attribute set to true should have checked " +
-        "state",
-  attrs: [{
-    attr: "checked",
-    value: "true"
-  }],
-  expected: [STATE_CHECKED, 0]
-}, {
-  desc: "Checkbox with no @checked attribute should not have checked state",
-  attrs: [{
-    attr: "checked"
-  }],
-  expected: [0, 0, STATE_CHECKED]
-}];
+const attributeTests = [
+  {
+    desc:
+      "Checkbox with @checked attribute set to true should have checked " +
+      "state",
+    attrs: [
+      {
+        attr: "checked",
+        value: "true",
+      },
+    ],
+    expected: [STATE_CHECKED, 0],
+  },
+  {
+    desc: "Checkbox with no @checked attribute should not have checked state",
+    attrs: [
+      {
+        attr: "checked",
+      },
+    ],
+    expected: [0, 0, STATE_CHECKED],
+  },
+];
 
 // State caching tests for ARIA changes
-const ariaTests = [{
-  desc: "File input has busy state when @aria-busy attribute is set to true",
-  attrs: [{
-    attr: "aria-busy",
-    value: "true"
-  }],
-  expected: [STATE_BUSY, 0, STATE_REQUIRED | STATE_INVALID]
-}, {
-  desc: "File input has required state when @aria-required attribute is set " +
-        "to true",
-  attrs: [{
-    attr: "aria-required",
-    value: "true"
-  }],
-  expected: [STATE_REQUIRED, 0, STATE_INVALID]
-}, {
-  desc: "File input has invalid state when @aria-invalid attribute is set to " +
-        "true",
-  attrs: [{
-    attr: "aria-invalid",
-    value: "true"
-  }],
-  expected: [STATE_INVALID, 0]
-}];
+const ariaTests = [
+  {
+    desc: "File input has busy state when @aria-busy attribute is set to true",
+    attrs: [
+      {
+        attr: "aria-busy",
+        value: "true",
+      },
+    ],
+    expected: [STATE_BUSY, 0, STATE_REQUIRED | STATE_INVALID],
+  },
+  {
+    desc:
+      "File input has required state when @aria-required attribute is set " +
+      "to true",
+    attrs: [
+      {
+        attr: "aria-required",
+        value: "true",
+      },
+    ],
+    expected: [STATE_REQUIRED, 0, STATE_INVALID],
+  },
+  {
+    desc:
+      "File input has invalid state when @aria-invalid attribute is set to " +
+      "true",
+    attrs: [
+      {
+        attr: "aria-invalid",
+        value: "true",
+      },
+    ],
+    expected: [STATE_INVALID, 0],
+  },
+];
 
 // Extra state caching tests
-const extraStateTests = [{
-  desc: "Input has no extra enabled state when aria and native disabled " +
-        "attributes are set at once",
-  attrs: [{
-    attr: "aria-disabled",
-    value: "true"
-  }, {
-    attr: "disabled",
-    value: "true"
-  }],
-  expected: [0, 0, 0, EXT_STATE_ENABLED]
-}, {
-  desc: "Input has an extra enabled state when aria and native disabled " +
-        "attributes are unset at once",
-  attrs: [{
-    attr: "aria-disabled"
-  }, {
-    attr: "disabled"
-  }],
-  expected: [0, EXT_STATE_ENABLED]
-}];
+const extraStateTests = [
+  {
+    desc:
+      "Input has no extra enabled state when aria and native disabled " +
+      "attributes are set at once",
+    attrs: [
+      {
+        attr: "aria-disabled",
+        value: "true",
+      },
+      {
+        attr: "disabled",
+        value: "true",
+      },
+    ],
+    expected: [0, 0, 0, EXT_STATE_ENABLED],
+  },
+  {
+    desc:
+      "Input has an extra enabled state when aria and native disabled " +
+      "attributes are unset at once",
+    attrs: [
+      {
+        attr: "aria-disabled",
+      },
+      {
+        attr: "disabled",
+      },
+    ],
+    expected: [0, EXT_STATE_ENABLED],
+  },
+];
 
 async function runStateTests(browser, accDoc, id, tests) {
   let acc = findAccessibleChildByID(accDoc, id);
   for (let { desc, attrs, expected } of tests) {
     info(desc);
     let onUpdate = waitForEvent(EVENT_STATE_CHANGE, id);
     for (let { attr, value } of attrs) {
       await invokeSetAttribute(browser, id, attr, value);
@@ -102,17 +135,18 @@ async function runStateTests(browser, ac
     await onUpdate;
     testStates(acc, ...expected);
   }
 }
 
 /**
  * Test caching of accessible object states
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <input id="checkbox" type="checkbox">
   <input id="file" type="file">
   <input id="text">`,
   async function(browser, accDoc) {
     await runStateTests(browser, accDoc, "checkbox", attributeTests);
     await runStateTests(browser, accDoc, "file", ariaTests);
     await runStateTests(browser, accDoc, "text", extraStateTests);
   }
--- a/accessible/tests/browser/e10s/browser_caching_value.js
+++ b/accessible/tests/browser/e10s/browser_caching_value.js
@@ -13,112 +13,140 @@ loadScripts({ name: "value.js", dir: MOC
  *   desc      {String}            description for better logging
  *   id        {String}            given accessible DOMNode ID
  *   expected  {String}            expected value for a given accessible
  *   action    {?AsyncFunction}    an optional action that awaits a value change
  *   attrs     {?Array}            an optional list of attributes to update
  *   waitFor   {?Number}           an optional value change event to wait for
  * }
  */
-const valueTests = [{
-  desc: "Initially value is set to 1st element of select",
-  id: "select",
-  expected: "1st"
-}, {
-  desc: "Value should update to 3rd when 3 is pressed",
-  id: "select",
-  async action(browser) {
-    await invokeFocus(browser, "select");
-    await BrowserTestUtils.synthesizeKey("3", {}, browser);
+const valueTests = [
+  {
+    desc: "Initially value is set to 1st element of select",
+    id: "select",
+    expected: "1st",
+  },
+  {
+    desc: "Value should update to 3rd when 3 is pressed",
+    id: "select",
+    async action(browser) {
+      await invokeFocus(browser, "select");
+      await BrowserTestUtils.synthesizeKey("3", {}, browser);
+    },
+    waitFor: EVENT_TEXT_VALUE_CHANGE,
+    expected: "3rd",
+  },
+  {
+    desc: "Initially value is set to @aria-valuenow for slider",
+    id: "slider",
+    expected: ["5", 5, 0, 7, 0],
+  },
+  {
+    desc: "Value should change when @aria-valuenow is updated",
+    id: "slider",
+    attrs: [
+      {
+        attr: "aria-valuenow",
+        value: "6",
+      },
+    ],
+    waitFor: EVENT_VALUE_CHANGE,
+    expected: ["6", 6, 0, 7, 0],
+  },
+  {
+    desc: "Value should change when @aria-valuetext is set",
+    id: "slider",
+    attrs: [
+      {
+        attr: "aria-valuetext",
+        value: "plain",
+      },
+    ],
+    waitFor: EVENT_TEXT_VALUE_CHANGE,
+    expected: ["plain", 6, 0, 7, 0],
+  },
+  {
+    desc: "Value should change when @aria-valuetext is updated",
+    id: "slider",
+    attrs: [
+      {
+        attr: "aria-valuetext",
+        value: "hey!",
+      },
+    ],
+    waitFor: EVENT_TEXT_VALUE_CHANGE,
+    expected: ["hey!", 6, 0, 7, 0],
   },
-  waitFor: EVENT_TEXT_VALUE_CHANGE,
-  expected: "3rd"
-}, {
-  desc: "Initially value is set to @aria-valuenow for slider",
-  id: "slider",
-  expected: ["5", 5, 0, 7, 0]
-}, {
-  desc: "Value should change when @aria-valuenow is updated",
-  id: "slider",
-  attrs: [{
-    attr: "aria-valuenow",
-    value: "6"
-  }],
-  waitFor: EVENT_VALUE_CHANGE,
-  expected: ["6", 6, 0, 7, 0]
-}, {
-  desc: "Value should change when @aria-valuetext is set",
-  id: "slider",
-  attrs: [{
-    attr: "aria-valuetext",
-    value: "plain"
-  }],
-  waitFor: EVENT_TEXT_VALUE_CHANGE,
-  expected: ["plain", 6, 0, 7, 0]
-}, {
-  desc: "Value should change when @aria-valuetext is updated",
-  id: "slider",
-  attrs: [{
-    attr: "aria-valuetext",
-    value: "hey!"
-  }],
-  waitFor: EVENT_TEXT_VALUE_CHANGE,
-  expected: ["hey!", 6, 0, 7, 0]
-}, {
-  desc: "Value should change to @aria-valuetext when @aria-valuenow is removed",
-  id: "slider",
-  attrs: [{
-    attr: "aria-valuenow"
-  }],
-  expected: ["hey!", 0, 0, 7, 0]
-}, {
-  desc: "Initially value is not set for combobox",
-  id: "combobox",
-  expected: ""
-}, {
-  desc: "Value should change when @value attribute is updated",
-  id: "combobox",
-  attrs: [{
-    attr: "value",
-    value: "hello"
-  }],
-  waitFor: EVENT_TEXT_VALUE_CHANGE,
-  expected: "hello"
-}, {
-  desc: "Initially value corresponds to @value attribute for progress",
-  id: "progress",
-  expected: "22%"
-}, {
-  desc: "Value should change when @value attribute is updated",
-  id: "progress",
-  attrs: [{
-    attr: "value",
-    value: "50"
-  }],
-  waitFor: EVENT_VALUE_CHANGE,
-  expected: "50%"
-}, {
-  desc: "Initially value corresponds to @value attribute for range",
-  id: "range",
-  expected: "6"
-}, {
-  desc: "Value should change when slider is moved",
-  id: "range",
-  async action(browser) {
-    await invokeFocus(browser, "range");
-    await BrowserTestUtils.synthesizeKey("VK_LEFT", {}, browser);
+  {
+    desc:
+      "Value should change to @aria-valuetext when @aria-valuenow is removed",
+    id: "slider",
+    attrs: [
+      {
+        attr: "aria-valuenow",
+      },
+    ],
+    expected: ["hey!", 0, 0, 7, 0],
+  },
+  {
+    desc: "Initially value is not set for combobox",
+    id: "combobox",
+    expected: "",
+  },
+  {
+    desc: "Value should change when @value attribute is updated",
+    id: "combobox",
+    attrs: [
+      {
+        attr: "value",
+        value: "hello",
+      },
+    ],
+    waitFor: EVENT_TEXT_VALUE_CHANGE,
+    expected: "hello",
   },
-  waitFor: EVENT_VALUE_CHANGE,
-  expected: "5"
-}];
+  {
+    desc: "Initially value corresponds to @value attribute for progress",
+    id: "progress",
+    expected: "22%",
+  },
+  {
+    desc: "Value should change when @value attribute is updated",
+    id: "progress",
+    attrs: [
+      {
+        attr: "value",
+        value: "50",
+      },
+    ],
+    waitFor: EVENT_VALUE_CHANGE,
+    expected: "50%",
+  },
+  {
+    desc: "Initially value corresponds to @value attribute for range",
+    id: "range",
+    expected: "6",
+  },
+  {
+    desc: "Value should change when slider is moved",
+    id: "range",
+    async action(browser) {
+      await invokeFocus(browser, "range");
+      await BrowserTestUtils.synthesizeKey("VK_LEFT", {}, browser);
+    },
+    waitFor: EVENT_VALUE_CHANGE,
+    expected: "5",
+  },
+];
 
 /**
  * Test caching of accessible object values
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <div id="slider" role="slider" aria-valuenow="5"
        aria-valuemin="0" aria-valuemax="7">slider</div>
   <select id="select">
     <option>1st</option>
     <option>2nd</option>
     <option>3rd</option>
   </select>
   <input id="combobox" role="combobox" aria-autocomplete="inline">
--- a/accessible/tests/browser/e10s/browser_events_announcement.js
+++ b/accessible/tests/browser/e10s/browser_events_announcement.js
@@ -1,23 +1,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-addAccessibleTask(`<p id="p">abc</p>`,
-  async function(browser, accDoc) {
-    let acc = findAccessibleChildByID(accDoc, "p");
-    let onAnnounce = waitForEvent(EVENT_ANNOUNCEMENT, acc);
-    acc.announce("please", nsIAccessibleAnnouncementEvent.POLITE);
-    let evt = await onAnnounce;
-    evt.QueryInterface(nsIAccessibleAnnouncementEvent);
-    is(evt.announcement, "please", "announcement matches.");
-    is(evt.priority, nsIAccessibleAnnouncementEvent.POLITE, "priority matches");
+addAccessibleTask(`<p id="p">abc</p>`, async function(browser, accDoc) {
+  let acc = findAccessibleChildByID(accDoc, "p");
+  let onAnnounce = waitForEvent(EVENT_ANNOUNCEMENT, acc);
+  acc.announce("please", nsIAccessibleAnnouncementEvent.POLITE);
+  let evt = await onAnnounce;
+  evt.QueryInterface(nsIAccessibleAnnouncementEvent);
+  is(evt.announcement, "please", "announcement matches.");
+  is(evt.priority, nsIAccessibleAnnouncementEvent.POLITE, "priority matches");
 
-    onAnnounce = waitForEvent(EVENT_ANNOUNCEMENT, acc);
-    acc.announce("do it", nsIAccessibleAnnouncementEvent.ASSERTIVE);
-    evt = await onAnnounce;
-    evt.QueryInterface(nsIAccessibleAnnouncementEvent);
-    is(evt.announcement, "do it", "announcement matches.");
-    is(evt.priority, nsIAccessibleAnnouncementEvent.ASSERTIVE, "priority matches");
-  });
+  onAnnounce = waitForEvent(EVENT_ANNOUNCEMENT, acc);
+  acc.announce("do it", nsIAccessibleAnnouncementEvent.ASSERTIVE);
+  evt = await onAnnounce;
+  evt.QueryInterface(nsIAccessibleAnnouncementEvent);
+  is(evt.announcement, "do it", "announcement matches.");
+  is(
+    evt.priority,
+    nsIAccessibleAnnouncementEvent.ASSERTIVE,
+    "priority matches"
+  );
+});
--- a/accessible/tests/browser/e10s/browser_events_caretmove.js
+++ b/accessible/tests/browser/e10s/browser_events_caretmove.js
@@ -3,17 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /**
  * Test caret move event and its interface:
  *   - caretOffset
  */
-addAccessibleTask('<input id="textbox" value="hello"/>', async function(browser) {
+addAccessibleTask('<input id="textbox" value="hello"/>', async function(
+  browser
+) {
   let onCaretMoved = waitForEvent(EVENT_TEXT_CARET_MOVED, "textbox");
   await invokeFocus(browser, "textbox");
   let event = await onCaretMoved;
 
   let caretMovedEvent = event.QueryInterface(nsIAccessibleCaretMoveEvent);
-  is(caretMovedEvent.caretOffset, 5,
-    "Correct caret offset.");
+  is(caretMovedEvent.caretOffset, 5, "Correct caret offset.");
 });
--- a/accessible/tests/browser/e10s/browser_events_hide.js
+++ b/accessible/tests/browser/e10s/browser_events_hide.js
@@ -5,29 +5,39 @@
 "use strict";
 
 /**
  * Test hide event and its interface:
  *   - targetParent
  *   - targetNextSibling
  *   - targetPrevSibling
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <div id="parent">
     <div id="previous"></div>
     <div id="to-hide"></div>
     <div id="next"></div>
   </div>`,
   async function(browser, accDoc) {
     let acc = findAccessibleChildByID(accDoc, "to-hide");
     let onHide = waitForEvent(EVENT_HIDE, acc);
     await invokeSetStyle(browser, "to-hide", "visibility", "hidden");
     let event = await onHide;
     let hideEvent = event.QueryInterface(Ci.nsIAccessibleHideEvent);
 
-    is(getAccessibleDOMNodeID(hideEvent.targetParent), "parent",
-      "Correct target parent.");
-    is(getAccessibleDOMNodeID(hideEvent.targetNextSibling), "next",
-      "Correct target next sibling.");
-    is(getAccessibleDOMNodeID(hideEvent.targetPrevSibling), "previous",
-      "Correct target previous sibling.");
+    is(
+      getAccessibleDOMNodeID(hideEvent.targetParent),
+      "parent",
+      "Correct target parent."
+    );
+    is(
+      getAccessibleDOMNodeID(hideEvent.targetNextSibling),
+      "next",
+      "Correct target next sibling."
+    );
+    is(
+      getAccessibleDOMNodeID(hideEvent.targetPrevSibling),
+      "previous",
+      "Correct target previous sibling."
+    );
   }
 );
--- a/accessible/tests/browser/e10s/browser_events_show.js
+++ b/accessible/tests/browser/e10s/browser_events_show.js
@@ -2,16 +2,20 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /**
  * Test show event
  */
-addAccessibleTask('<div id="div" style="visibility: hidden;"></div>',
+addAccessibleTask(
+  '<div id="div" style="visibility: hidden;"></div>',
   async function(browser) {
     let onShow = waitForEvent(EVENT_SHOW, "div");
     await invokeSetStyle(browser, "div", "visibility", "visible");
     let showEvent = await onShow;
-    ok(showEvent.accessibleDocument instanceof nsIAccessibleDocument,
-      "Accessible document not present.");
-  });
+    ok(
+      showEvent.accessibleDocument instanceof nsIAccessibleDocument,
+      "Accessible document not present."
+    );
+  }
+);
--- a/accessible/tests/browser/e10s/browser_events_statechange.js
+++ b/accessible/tests/browser/e10s/browser_events_statechange.js
@@ -1,24 +1,29 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 /* import-globals-from ../../mochitest/states.js */
-loadScripts({ name: "role.js", dir: MOCHITESTS_DIR },
-            { name: "states.js", dir: MOCHITESTS_DIR });
+loadScripts(
+  { name: "role.js", dir: MOCHITESTS_DIR },
+  { name: "states.js", dir: MOCHITESTS_DIR }
+);
 
 function checkStateChangeEvent(event, state, isExtraState, isEnabled) {
   let scEvent = event.QueryInterface(nsIAccessibleStateChangeEvent);
   is(scEvent.state, state, "Correct state of the statechange event.");
-  is(scEvent.isExtraState, isExtraState,
-    "Correct extra state bit of the statechange event.");
+  is(
+    scEvent.isExtraState,
+    isExtraState,
+    "Correct extra state bit of the statechange event."
+  );
   is(scEvent.isEnabled, isEnabled, "Correct state of statechange event state");
 }
 
 // Insert mock source into the iframe to be able to verify the right document
 // body id.
 let iframeSrc = `data:text/html,
   <html>
     <head>
@@ -29,33 +34,37 @@ let iframeSrc = `data:text/html,
   </html>`;
 
 /**
  * Test state change event and its interface:
  *   - state
  *   - isExtraState
  *   - isEnabled
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <iframe id="iframe" src="${iframeSrc}"></iframe>
-  <input id="checkbox" type="checkbox" />`, async function(browser) {
-  // Test state change
-  let onStateChange = waitForEvent(EVENT_STATE_CHANGE, "checkbox");
-  // Set checked for a checkbox.
-  await ContentTask.spawn(browser, {}, () => {
-    content.document.getElementById("checkbox").checked = true;
-  });
-  let event = await onStateChange;
+  <input id="checkbox" type="checkbox" />`,
+  async function(browser) {
+    // Test state change
+    let onStateChange = waitForEvent(EVENT_STATE_CHANGE, "checkbox");
+    // Set checked for a checkbox.
+    await ContentTask.spawn(browser, {}, () => {
+      content.document.getElementById("checkbox").checked = true;
+    });
+    let event = await onStateChange;
 
-  checkStateChangeEvent(event, STATE_CHECKED, false, true);
-  testStates(event.accessible, STATE_CHECKED, 0);
+    checkStateChangeEvent(event, STATE_CHECKED, false, true);
+    testStates(event.accessible, STATE_CHECKED, 0);
 
-  // Test extra state
-  onStateChange = waitForEvent(EVENT_STATE_CHANGE, "iframe");
-  // Set design mode on.
-  await ContentTask.spawn(browser, {}, () => {
-    content.document.getElementById("iframe").contentDocument.designMode = "on";
-  });
-  event = await onStateChange;
+    // Test extra state
+    onStateChange = waitForEvent(EVENT_STATE_CHANGE, "iframe");
+    // Set design mode on.
+    await ContentTask.spawn(browser, {}, () => {
+      content.document.getElementById("iframe").contentDocument.designMode =
+        "on";
+    });
+    event = await onStateChange;
 
-  checkStateChangeEvent(event, EXT_STATE_EDITABLE, true, true);
-  testStates(event.accessible, 0, EXT_STATE_EDITABLE);
-});
+    checkStateChangeEvent(event, EXT_STATE_EDITABLE, true, true);
+    testStates(event.accessible, 0, EXT_STATE_EDITABLE);
+  }
+);
--- a/accessible/tests/browser/e10s/browser_events_textchange.js
+++ b/accessible/tests/browser/e10s/browser_events_textchange.js
@@ -1,73 +1,107 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-function checkTextChangeEvent(event, id, text, start, end, isInserted, isFromUserInput) {
+function checkTextChangeEvent(
+  event,
+  id,
+  text,
+  start,
+  end,
+  isInserted,
+  isFromUserInput
+) {
   let tcEvent = event.QueryInterface(nsIAccessibleTextChangeEvent);
   is(tcEvent.start, start, `Correct start offset for ${prettyName(id)}`);
   is(tcEvent.length, end - start, `Correct length for ${prettyName(id)}`);
-  is(tcEvent.isInserted, isInserted,
-    `Correct isInserted flag for ${prettyName(id)}`);
+  is(
+    tcEvent.isInserted,
+    isInserted,
+    `Correct isInserted flag for ${prettyName(id)}`
+  );
   is(tcEvent.modifiedText, text, `Correct text for ${prettyName(id)}`);
-  is(tcEvent.isFromUserInput, isFromUserInput,
-    `Correct value of isFromUserInput for ${prettyName(id)}`);
-  ok(tcEvent.accessibleDocument instanceof nsIAccessibleDocument,
-    "Accessible document not present.");
+  is(
+    tcEvent.isFromUserInput,
+    isFromUserInput,
+    `Correct value of isFromUserInput for ${prettyName(id)}`
+  );
+  ok(
+    tcEvent.accessibleDocument instanceof nsIAccessibleDocument,
+    "Accessible document not present."
+  );
 }
 
 async function changeText(browser, id, value, events) {
-  let onEvents = waitForOrderedEvents(events.map(({ isInserted }) => {
-    let eventType = isInserted ? EVENT_TEXT_INSERTED : EVENT_TEXT_REMOVED;
-    return [ eventType, id ];
-  }));
+  let onEvents = waitForOrderedEvents(
+    events.map(({ isInserted }) => {
+      let eventType = isInserted ? EVENT_TEXT_INSERTED : EVENT_TEXT_REMOVED;
+      return [eventType, id];
+    })
+  );
   // Change text in the subtree.
   await ContentTask.spawn(browser, [id, value], ([contentId, contentValue]) => {
-    content.document.getElementById(contentId).firstChild.textContent =
-      contentValue;
+    content.document.getElementById(
+      contentId
+    ).firstChild.textContent = contentValue;
   });
   let resolvedEvents = await onEvents;
 
   events.forEach(({ isInserted, str, offset }, idx) =>
-    checkTextChangeEvent(resolvedEvents[idx],
-      id, str, offset, offset + str.length, isInserted, false));
+    checkTextChangeEvent(
+      resolvedEvents[idx],
+      id,
+      str,
+      offset,
+      offset + str.length,
+      isInserted,
+      false
+    )
+  );
 }
 
 async function removeTextFromInput(browser, id, value, start, end) {
   let onTextRemoved = waitForEvent(EVENT_TEXT_REMOVED, id);
   // Select text and delete it.
-  await ContentTask.spawn(browser, [id, start, end], ([contentId, contentStart, contentEnd]) => {
-    let el = content.document.getElementById(contentId);
-    el.focus();
-    el.setSelectionRange(contentStart, contentEnd);
-  });
+  await ContentTask.spawn(
+    browser,
+    [id, start, end],
+    ([contentId, contentStart, contentEnd]) => {
+      let el = content.document.getElementById(contentId);
+      el.focus();
+      el.setSelectionRange(contentStart, contentEnd);
+    }
+  );
   await BrowserTestUtils.sendChar("VK_DELETE", browser);
 
   let event = await onTextRemoved;
   checkTextChangeEvent(event, id, value, start, end, false, true);
 }
 
 /**
  * Test text change event and its interface:
  *   - start
  *   - length
  *   - isInserted
  *   - modifiedText
  *   - isFromUserInput
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <p id="p">abc</p>
-  <input id="input" value="input" />`, async function(browser) {
-  let events = [
-    { isInserted: false, str: "abc", offset: 0 },
-    { isInserted: true, str: "def", offset: 0 }
-  ];
-  await changeText(browser, "p", "def", events);
+  <input id="input" value="input" />`,
+  async function(browser) {
+    let events = [
+      { isInserted: false, str: "abc", offset: 0 },
+      { isInserted: true, str: "def", offset: 0 },
+    ];
+    await changeText(browser, "p", "def", events);
 
-  events = [{ isInserted: true, str: "DEF", offset: 2 }];
-  await changeText(browser, "p", "deDEFf", events);
+    events = [{ isInserted: true, str: "DEF", offset: 2 }];
+    await changeText(browser, "p", "deDEFf", events);
 
-  // Test isFromUserInput property.
-  await removeTextFromInput(browser, "input", "n", 1, 2);
-});
+    // Test isFromUserInput property.
+    await removeTextFromInput(browser, "input", "n", 1, 2);
+  }
+);
--- a/accessible/tests/browser/e10s/browser_events_vcchange.js
+++ b/accessible/tests/browser/e10s/browser_events_vcchange.js
@@ -1,49 +1,57 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <p id="p1">abc</p>
   <input id="input1" value="input" />`,
   async function(browser, accDoc) {
     let onVCChanged = waitForEvent(EVENT_VIRTUALCURSOR_CHANGED, accDoc);
     await ContentTask.spawn(browser, null, () => {
-      let vc = getAccessible(content.document, Ci.nsIAccessibleDocument).virtualCursor;
+      let vc = getAccessible(content.document, Ci.nsIAccessibleDocument)
+        .virtualCursor;
       vc.position = getAccessible("p1");
     });
 
     let vccEvent = (await onVCChanged).QueryInterface(
-      nsIAccessibleVirtualCursorChangeEvent);
+      nsIAccessibleVirtualCursorChangeEvent
+    );
     is(vccEvent.newAccessible.id, "p1", "New position is correct");
     is(vccEvent.newStartOffset, -1, "New start offset is correct");
     is(vccEvent.newEndOffset, -1, "New end offset is correct");
     ok(!vccEvent.isFromUserInput, "not user initiated");
 
     onVCChanged = waitForEvent(EVENT_VIRTUALCURSOR_CHANGED, accDoc);
     await ContentTask.spawn(browser, null, () => {
-      let vc = getAccessible(content.document, Ci.nsIAccessibleDocument).virtualCursor;
+      let vc = getAccessible(content.document, Ci.nsIAccessibleDocument)
+        .virtualCursor;
       vc.moveNextByText(Ci.nsIAccessiblePivot.CHAR_BOUNDARY);
     });
     vccEvent = (await onVCChanged).QueryInterface(
-      nsIAccessibleVirtualCursorChangeEvent);
+      nsIAccessibleVirtualCursorChangeEvent
+    );
     is(vccEvent.newAccessible.id, vccEvent.oldAccessible.id, "Same position");
     is(vccEvent.newStartOffset, 0, "New start offset is correct");
     is(vccEvent.newEndOffset, 1, "New end offset is correct");
     ok(vccEvent.isFromUserInput, "user initiated");
 
     onVCChanged = waitForEvent(EVENT_VIRTUALCURSOR_CHANGED, accDoc);
     await ContentTask.spawn(browser, null, () => {
-      let vc = getAccessible(content.document, Ci.nsIAccessibleDocument).virtualCursor;
+      let vc = getAccessible(content.document, Ci.nsIAccessibleDocument)
+        .virtualCursor;
       vc.position = getAccessible("input1");
     });
     vccEvent = (await onVCChanged).QueryInterface(
-      nsIAccessibleVirtualCursorChangeEvent);
+      nsIAccessibleVirtualCursorChangeEvent
+    );
     isnot(vccEvent.oldAccessible, vccEvent.newAccessible, "positions differ");
     is(vccEvent.oldAccessible.id, "p1", "Old position is correct");
     is(vccEvent.newAccessible.id, "input1", "New position is correct");
     is(vccEvent.newStartOffset, -1, "New start offset is correct");
     is(vccEvent.newEndOffset, -1, "New end offset is correct");
     ok(!vccEvent.isFromUserInput, "not user initiated");
-  });
+  }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_ariadialog.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_ariadialog.js
@@ -3,20 +3,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
 // Test ARIA Dialog
-addAccessibleTask("doc_treeupdate_ariadialog.html", async function(browser, accDoc) {
+addAccessibleTask("doc_treeupdate_ariadialog.html", async function(
+  browser,
+  accDoc
+) {
   testAccessibleTree(accDoc, {
     role: ROLE_DOCUMENT,
-    children: [ ]
+    children: [],
   });
 
   // Make dialog visible and update its inner content.
   let onShow = waitForEvent(EVENT_SHOW, "dialog");
   await ContentTask.spawn(browser, {}, () => {
     content.document.getElementById("dialog").style.display = "block";
   });
   await onShow;
@@ -24,18 +27,18 @@ addAccessibleTask("doc_treeupdate_ariadi
   testAccessibleTree(accDoc, {
     role: ROLE_DOCUMENT,
     children: [
       {
         role: ROLE_DIALOG,
         children: [
           {
             role: ROLE_PUSHBUTTON,
-            children: [ { role: ROLE_TEXT_LEAF } ]
+            children: [{ role: ROLE_TEXT_LEAF }],
           },
           {
-            role: ROLE_ENTRY
-          }
-        ]
-      }
-    ]
+            role: ROLE_ENTRY,
+          },
+        ],
+      },
+    ],
   });
 });
--- a/accessible/tests/browser/e10s/browser_treeupdate_ariaowns.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_ariaowns.js
@@ -10,88 +10,82 @@ loadScripts({ name: "role.js", dir: MOCH
 async function testContainer1(browser, accDoc) {
   const id = "t1_container";
   const docID = getAccessibleDOMNodeID(accDoc);
   const acc = findAccessibleChildByID(accDoc, id);
 
   /* ================= Initial tree test ==================================== */
   // children are swapped by ARIA owns
   let tree = {
-    SECTION: [
-      { CHECKBUTTON: [
-        { SECTION: [] }
-      ] },
-      { PUSHBUTTON: [ ] }
-    ]
+    SECTION: [{ CHECKBUTTON: [{ SECTION: [] }] }, { PUSHBUTTON: [] }],
   };
   testAccessibleTree(acc, tree);
 
   /* ================ Change ARIA owns ====================================== */
   let onReorder = waitForEvent(EVENT_REORDER, id);
   await invokeSetAttribute(browser, id, "aria-owns", "t1_button t1_subdiv");
   await onReorder;
 
   // children are swapped again, button and subdiv are appended to
   // the children.
   tree = {
     SECTION: [
-      { CHECKBUTTON: [ ] }, // checkbox, native order
-      { PUSHBUTTON: [ ] }, // button, rearranged by ARIA own
-      { SECTION: [ ] } // subdiv from the subtree, ARIA owned
-    ]
+      { CHECKBUTTON: [] }, // checkbox, native order
+      { PUSHBUTTON: [] }, // button, rearranged by ARIA own
+      { SECTION: [] }, // subdiv from the subtree, ARIA owned
+    ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================ Remove ARIA owns ====================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await invokeSetAttribute(browser, id, "aria-owns");
   await onReorder;
 
   // children follow the DOM order
   tree = {
-    SECTION: [
-      { PUSHBUTTON: [ ] },
-      { CHECKBUTTON: [
-          { SECTION: [] }
-      ] }
-    ]
+    SECTION: [{ PUSHBUTTON: [] }, { CHECKBUTTON: [{ SECTION: [] }] }],
   };
   testAccessibleTree(acc, tree);
 
   /* ================ Set ARIA owns ========================================= */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await invokeSetAttribute(browser, id, "aria-owns", "t1_button t1_subdiv");
   await onReorder;
 
   // children are swapped again, button and subdiv are appended to
   // the children.
   tree = {
     SECTION: [
-      { CHECKBUTTON: [ ] }, // checkbox
-      { PUSHBUTTON: [ ] }, // button, rearranged by ARIA own
-      { SECTION: [ ] } // subdiv from the subtree, ARIA owned
-    ]
+      { CHECKBUTTON: [] }, // checkbox
+      { PUSHBUTTON: [] }, // button, rearranged by ARIA own
+      { SECTION: [] }, // subdiv from the subtree, ARIA owned
+    ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================ Add ID to ARIA owns =================================== */
   onReorder = waitForEvent(EVENT_REORDER, docID);
-  await invokeSetAttribute(browser, id, "aria-owns",
-    "t1_button t1_subdiv t1_group");
+  await invokeSetAttribute(
+    browser,
+    id,
+    "aria-owns",
+    "t1_button t1_subdiv t1_group"
+  );
   await onReorder;
 
   // children are swapped again, button and subdiv are appended to
   // the children.
   tree = {
     SECTION: [
-      { CHECKBUTTON: [ ] }, // t1_checkbox
-      { PUSHBUTTON: [ ] }, // button, t1_button
-      { SECTION: [ ] }, // subdiv from the subtree, t1_subdiv
-      { GROUPING: [ ] } // group from outside, t1_group
-    ]
+      { CHECKBUTTON: [] }, // t1_checkbox
+      { PUSHBUTTON: [] }, // button, t1_button
+      { SECTION: [] }, // subdiv from the subtree, t1_subdiv
+      { GROUPING: [] }, // group from outside, t1_group
+    ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================ Append element ======================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await ContentTask.spawn(browser, id, contentId => {
     let div = content.document.createElement("div");
     div.setAttribute("id", "t1_child3");
@@ -99,91 +93,94 @@ async function testContainer1(browser, a
     content.document.getElementById(contentId).appendChild(div);
   });
   await onReorder;
 
   // children are invalidated, they includes aria-owns swapped kids and
   // newly inserted child.
   tree = {
     SECTION: [
-      { CHECKBUTTON: [ ] }, // existing explicit, t1_checkbox
-      { RADIOBUTTON: [ ] }, // new explicit, t1_child3
-      { PUSHBUTTON: [ ] }, // ARIA owned, t1_button
-      { SECTION: [ ] }, // ARIA owned, t1_subdiv
-      { GROUPING: [ ] } // ARIA owned, t1_group
-    ]
+      { CHECKBUTTON: [] }, // existing explicit, t1_checkbox
+      { RADIOBUTTON: [] }, // new explicit, t1_child3
+      { PUSHBUTTON: [] }, // ARIA owned, t1_button
+      { SECTION: [] }, // ARIA owned, t1_subdiv
+      { GROUPING: [] }, // ARIA owned, t1_group
+    ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================ Remove element ======================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await ContentTask.spawn(browser, {}, () =>
-    content.document.getElementById("t1_span").remove());
+    content.document.getElementById("t1_span").remove()
+  );
   await onReorder;
 
   // subdiv should go away
   tree = {
     SECTION: [
-      { CHECKBUTTON: [ ] }, // explicit, t1_checkbox
-      { RADIOBUTTON: [ ] }, // explicit, t1_child3
-      { PUSHBUTTON: [ ] }, // ARIA owned, t1_button
-      { GROUPING: [ ] } // ARIA owned, t1_group
-    ]
+      { CHECKBUTTON: [] }, // explicit, t1_checkbox
+      { RADIOBUTTON: [] }, // explicit, t1_child3
+      { PUSHBUTTON: [] }, // ARIA owned, t1_button
+      { GROUPING: [] }, // ARIA owned, t1_group
+    ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================ Remove ID ============================================= */
   onReorder = waitForEvent(EVENT_REORDER, docID);
   await invokeSetAttribute(browser, "t1_group", "id");
   await onReorder;
 
   tree = {
     SECTION: [
-      { CHECKBUTTON: [ ] },
-      { RADIOBUTTON: [ ] },
-      { PUSHBUTTON: [ ] } // ARIA owned, t1_button
-    ]
+      { CHECKBUTTON: [] },
+      { RADIOBUTTON: [] },
+      { PUSHBUTTON: [] }, // ARIA owned, t1_button
+    ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================ Set ID ================================================ */
   onReorder = waitForEvent(EVENT_REORDER, docID);
   await invokeSetAttribute(browser, "t1_grouptmp", "id", "t1_group");
   await onReorder;
 
   tree = {
     SECTION: [
-      { CHECKBUTTON: [ ] },
-      { RADIOBUTTON: [ ] },
-      { PUSHBUTTON: [ ] }, // ARIA owned, t1_button
-      { GROUPING: [ ] } // ARIA owned, t1_group, previously t1_grouptmp
-    ]
+      { CHECKBUTTON: [] },
+      { RADIOBUTTON: [] },
+      { PUSHBUTTON: [] }, // ARIA owned, t1_button
+      { GROUPING: [] }, // ARIA owned, t1_group, previously t1_grouptmp
+    ],
   };
   testAccessibleTree(acc, tree);
 }
 
 async function removeContainer(browser, accDoc) {
   const id = "t2_container1";
   const acc = findAccessibleChildByID(accDoc, id);
 
   let tree = {
     SECTION: [
-      { CHECKBUTTON: [ ] } // ARIA owned, 't2_owned'
-    ]
+      { CHECKBUTTON: [] }, // ARIA owned, 't2_owned'
+    ],
   };
   testAccessibleTree(acc, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, id);
   await ContentTask.spawn(browser, {}, () =>
-    content.document.getElementById("t2_container2").removeChild(
-      content.document.getElementById("t2_container3")));
+    content.document
+      .getElementById("t2_container2")
+      .removeChild(content.document.getElementById("t2_container3"))
+  );
   await onReorder;
 
   tree = {
-    SECTION: [ ]
+    SECTION: [],
   };
   testAccessibleTree(acc, tree);
 }
 
 async function stealAndRecacheChildren(browser, accDoc) {
   const id1 = "t3_container1";
   const id2 = "t3_container2";
   const acc1 = findAccessibleChildByID(accDoc, id1);
@@ -196,106 +193,101 @@ async function stealAndRecacheChildren(b
     let div = content.document.createElement("div");
     div.setAttribute("role", "radio");
     content.document.getElementById(id).appendChild(div);
   });
   await onReorder;
 
   let tree = {
     SECTION: [
-      { CHECKBUTTON: [ ] } // ARIA owned
-    ]
+      { CHECKBUTTON: [] }, // ARIA owned
+    ],
   };
   testAccessibleTree(acc1, tree);
 
   tree = {
-    SECTION: [
-      { RADIOBUTTON: [ ] }
-    ]
+    SECTION: [{ RADIOBUTTON: [] }],
   };
   testAccessibleTree(acc2, tree);
 }
 
 async function showHiddenElement(browser, accDoc) {
   const id = "t4_container1";
   const acc = findAccessibleChildByID(accDoc, id);
 
   let tree = {
-    SECTION: [
-      { RADIOBUTTON: [] }
-    ]
+    SECTION: [{ RADIOBUTTON: [] }],
   };
   testAccessibleTree(acc, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, id);
   await invokeSetStyle(browser, "t4_child1", "display", "block");
   await onReorder;
 
   tree = {
-    SECTION: [
-      { CHECKBUTTON: [] },
-      { RADIOBUTTON: [] }
-    ]
+    SECTION: [{ CHECKBUTTON: [] }, { RADIOBUTTON: [] }],
   };
   testAccessibleTree(acc, tree);
 }
 
 async function rearrangeARIAOwns(browser, accDoc) {
   const id = "t5_container";
   const acc = findAccessibleChildByID(accDoc, id);
-  const tests = [{
-    val: "t5_checkbox t5_radio t5_button",
-    roleList: [ "CHECKBUTTON", "RADIOBUTTON", "PUSHBUTTON" ]
-  }, {
-    val: "t5_radio t5_button t5_checkbox",
-    roleList: [ "RADIOBUTTON", "PUSHBUTTON", "CHECKBUTTON" ]
-  }];
+  const tests = [
+    {
+      val: "t5_checkbox t5_radio t5_button",
+      roleList: ["CHECKBUTTON", "RADIOBUTTON", "PUSHBUTTON"],
+    },
+    {
+      val: "t5_radio t5_button t5_checkbox",
+      roleList: ["RADIOBUTTON", "PUSHBUTTON", "CHECKBUTTON"],
+    },
+  ];
 
   for (let { val, roleList } of tests) {
     let onReorder = waitForEvent(EVENT_REORDER, id);
     await invokeSetAttribute(browser, id, "aria-owns", val);
     await onReorder;
 
-    let tree = { SECTION: [ ] };
+    let tree = { SECTION: [] };
     for (let role of roleList) {
       let ch = {};
       ch[role] = [];
       tree.SECTION.push(ch);
     }
     testAccessibleTree(acc, tree);
   }
 }
 
 async function removeNotARIAOwnedEl(browser, accDoc) {
   const id = "t6_container";
   const acc = findAccessibleChildByID(accDoc, id);
 
   let tree = {
-    SECTION: [
-      { TEXT_LEAF: [ ] },
-      { GROUPING: [ ] }
-    ]
+    SECTION: [{ TEXT_LEAF: [] }, { GROUPING: [] }],
   };
   testAccessibleTree(acc, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, id);
   await ContentTask.spawn(browser, id, contentId => {
-    content.document.getElementById(contentId).removeChild(
-      content.document.getElementById("t6_span"));
+    content.document
+      .getElementById(contentId)
+      .removeChild(content.document.getElementById("t6_span"));
   });
   await onReorder;
 
   tree = {
-    SECTION: [
-      { GROUPING: [ ] }
-    ]
+    SECTION: [{ GROUPING: [] }],
   };
   testAccessibleTree(acc, tree);
 }
 
-addAccessibleTask("doc_treeupdate_ariaowns.html", async function(browser, accDoc) {
+addAccessibleTask("doc_treeupdate_ariaowns.html", async function(
+  browser,
+  accDoc
+) {
   await testContainer1(browser, accDoc);
   await removeContainer(browser, accDoc);
   await stealAndRecacheChildren(browser, accDoc);
   await showHiddenElement(browser, accDoc);
   await rearrangeARIAOwns(browser, accDoc);
   await removeNotARIAOwnedEl(browser, accDoc);
 });
--- a/accessible/tests/browser/e10s/browser_treeupdate_canvas.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_canvas.js
@@ -2,23 +2,26 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <canvas id="canvas">
     <div id="dialog" role="dialog" style="display: none;"></div>
-  </canvas>`, async function(browser, accDoc) {
-  let canvas = findAccessibleChildByID(accDoc, "canvas");
-  let dialog = findAccessibleChildByID(accDoc, "dialog");
+  </canvas>`,
+  async function(browser, accDoc) {
+    let canvas = findAccessibleChildByID(accDoc, "canvas");
+    let dialog = findAccessibleChildByID(accDoc, "dialog");
 
-  testAccessibleTree(canvas, { CANVAS: [] });
+    testAccessibleTree(canvas, { CANVAS: [] });
 
-  let onShow = waitForEvent(EVENT_SHOW, "dialog");
-  await invokeSetStyle(browser, "dialog", "display", "block");
-  await onShow;
+    let onShow = waitForEvent(EVENT_SHOW, "dialog");
+    await invokeSetStyle(browser, "dialog", "display", "block");
+    await onShow;
 
-  testAccessibleTree(dialog, { DIALOG: [] });
-});
+    testAccessibleTree(dialog, { DIALOG: [] });
+  }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_cssoverflow.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_cssoverflow.js
@@ -2,66 +2,84 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <div id="container"><div id="scrollarea" style="overflow:auto;"><input>
   </div></div>
   <div id="container2"><div id="scrollarea2" style="overflow:hidden;">
-  </div></div>`, async function(browser, accDoc) {
-  const id1 = "container";
-  const id2 = "container2";
-  const container = findAccessibleChildByID(accDoc, id1);
-  const container2 = findAccessibleChildByID(accDoc, id2);
+  </div></div>`,
+  async function(browser, accDoc) {
+    const id1 = "container";
+    const id2 = "container2";
+    const container = findAccessibleChildByID(accDoc, id1);
+    const container2 = findAccessibleChildByID(accDoc, id2);
 
-  /* ================= Change scroll range ================================== */
-  let tree = {
-    SECTION: [ {// container
-      SECTION: [ {// scroll area
-        ENTRY: [ ] // child content
-      } ]
-    } ]
-  };
-  testAccessibleTree(container, tree);
+    /* ================= Change scroll range ================================== */
+    let tree = {
+      SECTION: [
+        {
+          // container
+          SECTION: [
+            {
+              // scroll area
+              ENTRY: [], // child content
+            },
+          ],
+        },
+      ],
+    };
+    testAccessibleTree(container, tree);
 
-  let onReorder = waitForEvent(EVENT_REORDER, id1);
-  await ContentTask.spawn(browser, id1, id => {
-    let doc = content.document;
-    doc.getElementById("scrollarea").style.width = "20px";
-    doc.getElementById(id).appendChild(doc.createElement("input"));
-  });
-  await onReorder;
+    let onReorder = waitForEvent(EVENT_REORDER, id1);
+    await ContentTask.spawn(browser, id1, id => {
+      let doc = content.document;
+      doc.getElementById("scrollarea").style.width = "20px";
+      doc.getElementById(id).appendChild(doc.createElement("input"));
+    });
+    await onReorder;
 
-  tree = {
-    SECTION: [ {// container
-      SECTION: [ {// scroll area
-        ENTRY: [ ] // child content
-      } ]
-    }, {
-      ENTRY: [ ] // inserted input
-    } ]
-  };
-  testAccessibleTree(container, tree);
+    tree = {
+      SECTION: [
+        {
+          // container
+          SECTION: [
+            {
+              // scroll area
+              ENTRY: [], // child content
+            },
+          ],
+        },
+        {
+          ENTRY: [], // inserted input
+        },
+      ],
+    };
+    testAccessibleTree(container, tree);
 
-  /* ================= Change scrollbar styles ============================== */
-  tree = {
-    SECTION: [ // container2
-      { SECTION: [] } // scroll area because of its ID
-    ]
-  };
-  testAccessibleTree(container2, tree);
+    /* ================= Change scrollbar styles ============================== */
+    tree = {
+      SECTION: [
+        // container2
+        { SECTION: [] }, // scroll area because of its ID
+      ],
+    };
+    testAccessibleTree(container2, tree);
 
-  onReorder = waitForEvent(EVENT_REORDER, id2);
-  await invokeSetStyle(browser, "scrollarea2", "overflow", "auto");
-  await onReorder;
+    onReorder = waitForEvent(EVENT_REORDER, id2);
+    await invokeSetStyle(browser, "scrollarea2", "overflow", "auto");
+    await onReorder;
 
-  tree = {
-    SECTION: [ // container
-      { SECTION: [] } // scroll area
-    ]
-  };
-  testAccessibleTree(container2, tree);
-});
+    tree = {
+      SECTION: [
+        // container
+        { SECTION: [] }, // scroll area
+      ],
+    };
+    testAccessibleTree(container2, tree);
+  }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_doc.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_doc.js
@@ -11,300 +11,309 @@ const iframeSrc = `data:text/html,
   <html>
     <head>
       <meta charset='utf-8'/>
       <title>Inner Iframe</title>
     </head>
     <body id='inner-iframe'></body>
   </html>`;
 
-addAccessibleTask(`
-  <iframe id="iframe" src="${iframeSrc}"></iframe>`, async function(browser, accDoc) {
-  // ID of the iframe that is being tested
-  const id = "inner-iframe";
-
-  let iframe = findAccessibleChildByID(accDoc, id);
+addAccessibleTask(
+  `
+  <iframe id="iframe" src="${iframeSrc}"></iframe>`,
+  async function(browser, accDoc) {
+    // ID of the iframe that is being tested
+    const id = "inner-iframe";
 
-  /* ================= Initial tree check =================================== */
-  let tree = {
-    role: ROLE_DOCUMENT,
-    children: [ ]
-  };
-  testAccessibleTree(iframe, tree);
+    let iframe = findAccessibleChildByID(accDoc, id);
+
+    /* ================= Initial tree check =================================== */
+    let tree = {
+      role: ROLE_DOCUMENT,
+      children: [],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================= Write iframe document ================================ */
-  let reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-  await ContentTask.spawn(browser, id, contentId => {
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    let newHTMLNode = docNode.createElement("html");
-    let newBodyNode = docNode.createElement("body");
-    let newTextNode = docNode.createTextNode("New Wave");
-    newBodyNode.id = contentId;
-    newBodyNode.appendChild(newTextNode);
-    newHTMLNode.appendChild(newBodyNode);
-    docNode.replaceChild(newHTMLNode, docNode.documentElement);
-  });
-  await reorderEventPromise;
+    /* ================= Write iframe document ================================ */
+    let reorderEventPromise = waitForEvent(EVENT_REORDER, id);
+    await ContentTask.spawn(browser, id, contentId => {
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      let newHTMLNode = docNode.createElement("html");
+      let newBodyNode = docNode.createElement("body");
+      let newTextNode = docNode.createTextNode("New Wave");
+      newBodyNode.id = contentId;
+      newBodyNode.appendChild(newTextNode);
+      newHTMLNode.appendChild(newBodyNode);
+      docNode.replaceChild(newHTMLNode, docNode.documentElement);
+    });
+    await reorderEventPromise;
 
-  tree = {
-    role: ROLE_DOCUMENT,
-    children: [
-      {
-        role: ROLE_TEXT_LEAF,
-        name: "New Wave"
-      }
-    ]
-  };
-  testAccessibleTree(iframe, tree);
+    tree = {
+      role: ROLE_DOCUMENT,
+      children: [
+        {
+          role: ROLE_TEXT_LEAF,
+          name: "New Wave",
+        },
+      ],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================= Replace iframe HTML element ========================== */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-  await ContentTask.spawn(browser, id, contentId => {
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    // We can't use open/write/close outside of iframe document because of
-    // security error.
-    let script = docNode.createElement("script");
-    script.textContent = `
+    /* ================= Replace iframe HTML element ========================== */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, id);
+    await ContentTask.spawn(browser, id, contentId => {
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      // We can't use open/write/close outside of iframe document because of
+      // security error.
+      let script = docNode.createElement("script");
+      script.textContent = `
       document.open();
       document.write('<body id="${contentId}">hello</body>');
       document.close();`;
-    docNode.body.appendChild(script);
-  });
-  await reorderEventPromise;
+      docNode.body.appendChild(script);
+    });
+    await reorderEventPromise;
 
-  tree = {
-    role: ROLE_DOCUMENT,
-    children: [
-      {
-        role: ROLE_TEXT_LEAF,
-        name: "hello"
-      }
-    ]
-  };
-  testAccessibleTree(iframe, tree);
+    tree = {
+      role: ROLE_DOCUMENT,
+      children: [
+        {
+          role: ROLE_TEXT_LEAF,
+          name: "hello",
+        },
+      ],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================= Replace iframe body ================================== */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-  await ContentTask.spawn(browser, id, contentId => {
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    let newBodyNode = docNode.createElement("body");
-    let newTextNode = docNode.createTextNode("New Hello");
-    newBodyNode.id = contentId;
-    newBodyNode.appendChild(newTextNode);
-    newBodyNode.setAttribute("role", "button");
-    docNode.documentElement.replaceChild(newBodyNode, docNode.body);
-  });
-  await reorderEventPromise;
+    /* ================= Replace iframe body ================================== */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, id);
+    await ContentTask.spawn(browser, id, contentId => {
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      let newBodyNode = docNode.createElement("body");
+      let newTextNode = docNode.createTextNode("New Hello");
+      newBodyNode.id = contentId;
+      newBodyNode.appendChild(newTextNode);
+      newBodyNode.setAttribute("role", "button");
+      docNode.documentElement.replaceChild(newBodyNode, docNode.body);
+    });
+    await reorderEventPromise;
 
-  tree = {
-    role: ROLE_PUSHBUTTON,
-    children: [
-      {
-        role: ROLE_TEXT_LEAF,
-        name: "New Hello"
-      }
-    ]
-  };
-  testAccessibleTree(iframe, tree);
+    tree = {
+      role: ROLE_PUSHBUTTON,
+      children: [
+        {
+          role: ROLE_TEXT_LEAF,
+          name: "New Hello",
+        },
+      ],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================= Open iframe document ================================= */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-  await ContentTask.spawn(browser, id, contentId => {
-    // Open document.
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    let script = docNode.createElement("script");
-    script.textContent = `
+    /* ================= Open iframe document ================================= */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, id);
+    await ContentTask.spawn(browser, id, contentId => {
+      // Open document.
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      let script = docNode.createElement("script");
+      script.textContent = `
       function closeMe() {
         document.write('Works?');
         document.close();
       }
       window.closeMe = closeMe;
       document.open();
       document.write('<body id="${contentId}"></body>');`;
-    docNode.body.appendChild(script);
-  });
-  await reorderEventPromise;
+      docNode.body.appendChild(script);
+    });
+    await reorderEventPromise;
 
-  tree = {
-    role: ROLE_DOCUMENT,
-    children: [ ]
-  };
-  testAccessibleTree(iframe, tree);
+    tree = {
+      role: ROLE_DOCUMENT,
+      children: [],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================= Close iframe document ================================ */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-  await ContentTask.spawn(browser, {}, () => {
-    // Write and close document.
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    docNode.write("Works?");
-    docNode.close();
-  });
-  await reorderEventPromise;
+    /* ================= Close iframe document ================================ */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, id);
+    await ContentTask.spawn(browser, {}, () => {
+      // Write and close document.
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      docNode.write("Works?");
+      docNode.close();
+    });
+    await reorderEventPromise;
 
-  tree = {
-    role: ROLE_DOCUMENT,
-    children: [
-      {
-        role: ROLE_TEXT_LEAF,
-        name: "Works?"
-      }
-    ]
-  };
-  testAccessibleTree(iframe, tree);
+    tree = {
+      role: ROLE_DOCUMENT,
+      children: [
+        {
+          role: ROLE_TEXT_LEAF,
+          name: "Works?",
+        },
+      ],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================= Remove HTML from iframe document ===================== */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
-  await ContentTask.spawn(browser, {}, () => {
-    // Remove HTML element.
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    docNode.firstChild.remove();
-  });
-  let event = await reorderEventPromise;
+    /* ================= Remove HTML from iframe document ===================== */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
+    await ContentTask.spawn(browser, {}, () => {
+      // Remove HTML element.
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      docNode.firstChild.remove();
+    });
+    let event = await reorderEventPromise;
 
-  ok(event.accessible instanceof nsIAccessibleDocument,
-    "Reorder should happen on the document");
-  tree = {
-    role: ROLE_DOCUMENT,
-    children: [ ]
-  };
-  testAccessibleTree(iframe, tree);
+    ok(
+      event.accessible instanceof nsIAccessibleDocument,
+      "Reorder should happen on the document"
+    );
+    tree = {
+      role: ROLE_DOCUMENT,
+      children: [],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================= Insert HTML to iframe document ======================= */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-  await ContentTask.spawn(browser, id, contentId => {
-    // Insert HTML element.
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    let html = docNode.createElement("html");
-    let body = docNode.createElement("body");
-    let text = docNode.createTextNode("Haha");
-    body.appendChild(text);
-    body.id = contentId;
-    html.appendChild(body);
-    docNode.appendChild(html);
-  });
-  await reorderEventPromise;
+    /* ================= Insert HTML to iframe document ======================= */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, id);
+    await ContentTask.spawn(browser, id, contentId => {
+      // Insert HTML element.
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      let html = docNode.createElement("html");
+      let body = docNode.createElement("body");
+      let text = docNode.createTextNode("Haha");
+      body.appendChild(text);
+      body.id = contentId;
+      html.appendChild(body);
+      docNode.appendChild(html);
+    });
+    await reorderEventPromise;
 
-  tree = {
-    role: ROLE_DOCUMENT,
-    children: [
-      {
-        role: ROLE_TEXT_LEAF,
-        name: "Haha"
-      }
-    ]
-  };
-  testAccessibleTree(iframe, tree);
+    tree = {
+      role: ROLE_DOCUMENT,
+      children: [
+        {
+          role: ROLE_TEXT_LEAF,
+          name: "Haha",
+        },
+      ],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================= Remove body from iframe document ===================== */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
-  await ContentTask.spawn(browser, {}, () => {
-    // Remove body element.
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    docNode.documentElement.removeChild(docNode.body);
-  });
-  event = await reorderEventPromise;
+    /* ================= Remove body from iframe document ===================== */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
+    await ContentTask.spawn(browser, {}, () => {
+      // Remove body element.
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      docNode.documentElement.removeChild(docNode.body);
+    });
+    event = await reorderEventPromise;
 
-  ok(event.accessible instanceof nsIAccessibleDocument,
-    "Reorder should happen on the document");
-  tree = {
-    role: ROLE_DOCUMENT,
-    children: [ ]
-  };
-  testAccessibleTree(iframe, tree);
+    ok(
+      event.accessible instanceof nsIAccessibleDocument,
+      "Reorder should happen on the document"
+    );
+    tree = {
+      role: ROLE_DOCUMENT,
+      children: [],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================ Insert element under document element while body missed */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
-  await ContentTask.spawn(browser, {}, () => {
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    let inputNode = content.window.inputNode = docNode.createElement("input");
-    docNode.documentElement.appendChild(inputNode);
-  });
-  event = await reorderEventPromise;
+    /* ================ Insert element under document element while body missed */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
+    await ContentTask.spawn(browser, {}, () => {
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      let inputNode = (content.window.inputNode = docNode.createElement(
+        "input"
+      ));
+      docNode.documentElement.appendChild(inputNode);
+    });
+    event = await reorderEventPromise;
 
-  ok(event.accessible instanceof nsIAccessibleDocument,
-    "Reorder should happen on the document");
-  tree = {
-    DOCUMENT: [
-      { ENTRY: [ ] }
-    ]
-  };
-  testAccessibleTree(iframe, tree);
+    ok(
+      event.accessible instanceof nsIAccessibleDocument,
+      "Reorder should happen on the document"
+    );
+    tree = {
+      DOCUMENT: [{ ENTRY: [] }],
+    };
+    testAccessibleTree(iframe, tree);
 
-  reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
-  await ContentTask.spawn(browser, {}, () => {
-    let docEl =
-      content.document.getElementById("iframe").contentDocument.documentElement;
-    // Remove aftermath of this test before next test starts.
-    docEl.firstChild.remove();
-  });
-  // Make sure reorder event was fired and that the input was removed.
-  await reorderEventPromise;
-  tree = {
-    role: ROLE_DOCUMENT,
-    children: [ ]
-  };
-  testAccessibleTree(iframe, tree);
+    reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
+    await ContentTask.spawn(browser, {}, () => {
+      let docEl = content.document.getElementById("iframe").contentDocument
+        .documentElement;
+      // Remove aftermath of this test before next test starts.
+      docEl.firstChild.remove();
+    });
+    // Make sure reorder event was fired and that the input was removed.
+    await reorderEventPromise;
+    tree = {
+      role: ROLE_DOCUMENT,
+      children: [],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================= Insert body to iframe document ======================= */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-  await ContentTask.spawn(browser, id, contentId => {
-    // Write and close document.
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    // Insert body element.
-    let body = docNode.createElement("body");
-    let text = docNode.createTextNode("Yo ho ho i butylka roma!");
-    body.appendChild(text);
-    body.id = contentId;
-    docNode.documentElement.appendChild(body);
-  });
-  await reorderEventPromise;
+    /* ================= Insert body to iframe document ======================= */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, id);
+    await ContentTask.spawn(browser, id, contentId => {
+      // Write and close document.
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      // Insert body element.
+      let body = docNode.createElement("body");
+      let text = docNode.createTextNode("Yo ho ho i butylka roma!");
+      body.appendChild(text);
+      body.id = contentId;
+      docNode.documentElement.appendChild(body);
+    });
+    await reorderEventPromise;
 
-  tree = {
-    role: ROLE_DOCUMENT,
-    children: [
-      {
-        role: ROLE_TEXT_LEAF,
-        name: "Yo ho ho i butylka roma!"
-      }
-    ]
-  };
-  testAccessibleTree(iframe, tree);
+    tree = {
+      role: ROLE_DOCUMENT,
+      children: [
+        {
+          role: ROLE_TEXT_LEAF,
+          name: "Yo ho ho i butylka roma!",
+        },
+      ],
+    };
+    testAccessibleTree(iframe, tree);
 
-  /* ================= Change source ======================================== */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, "iframe");
-  await invokeSetAttribute(browser, "iframe", "src",
-    `data:text/html,<html><body id="${id}"><input></body></html>`);
-  event = await reorderEventPromise;
+    /* ================= Change source ======================================== */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, "iframe");
+    await invokeSetAttribute(
+      browser,
+      "iframe",
+      "src",
+      `data:text/html,<html><body id="${id}"><input></body></html>`
+    );
+    event = await reorderEventPromise;
 
-  tree = {
-    INTERNAL_FRAME: [
-      { DOCUMENT: [
-        { ENTRY: [ ] }
-      ] }
-    ]
-  };
-  testAccessibleTree(event.accessible, tree);
-  iframe = findAccessibleChildByID(event.accessible, id);
+    tree = {
+      INTERNAL_FRAME: [{ DOCUMENT: [{ ENTRY: [] }] }],
+    };
+    testAccessibleTree(event.accessible, tree);
+    iframe = findAccessibleChildByID(event.accessible, id);
 
-  /* ================= Replace iframe body on ARIA role body ================ */
-  reorderEventPromise = waitForEvent(EVENT_REORDER, id);
-  await ContentTask.spawn(browser, id, contentId => {
-    let docNode = content.document.getElementById("iframe").contentDocument;
-    let newBodyNode = docNode.createElement("body");
-    let newTextNode = docNode.createTextNode("New Hello");
-    newBodyNode.appendChild(newTextNode);
-    newBodyNode.setAttribute("role", "button");
-    newBodyNode.id = contentId;
-    docNode.documentElement.replaceChild(newBodyNode, docNode.body);
-  });
-  await reorderEventPromise;
+    /* ================= Replace iframe body on ARIA role body ================ */
+    reorderEventPromise = waitForEvent(EVENT_REORDER, id);
+    await ContentTask.spawn(browser, id, contentId => {
+      let docNode = content.document.getElementById("iframe").contentDocument;
+      let newBodyNode = docNode.createElement("body");
+      let newTextNode = docNode.createTextNode("New Hello");
+      newBodyNode.appendChild(newTextNode);
+      newBodyNode.setAttribute("role", "button");
+      newBodyNode.id = contentId;
+      docNode.documentElement.replaceChild(newBodyNode, docNode.body);
+    });
+    await reorderEventPromise;
 
-  tree = {
-    role: ROLE_PUSHBUTTON,
-    children: [
-      {
-        role: ROLE_TEXT_LEAF,
-        name: "New Hello"
-      }
-    ]
-  };
-  testAccessibleTree(iframe, tree);
-});
+    tree = {
+      role: ROLE_PUSHBUTTON,
+      children: [
+        {
+          role: ROLE_TEXT_LEAF,
+          name: "New Hello",
+        },
+      ],
+    };
+    testAccessibleTree(iframe, tree);
+  }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_gencontent.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_gencontent.js
@@ -2,17 +2,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <style>
     .gentext:before {
       content: "START"
     }
     .gentext:after {
       content: "END"
     }
   </style>
@@ -20,58 +21,73 @@ addAccessibleTask(`
   <div id="container2"><div id="container2_child">text</div></div>`,
   async function(browser, accDoc) {
     const id1 = "container1";
     const id2 = "container2";
     let container1 = findAccessibleChildByID(accDoc, id1);
     let container2 = findAccessibleChildByID(accDoc, id2);
 
     let tree = {
-      SECTION: [ ] // container
+      SECTION: [], // container
     };
     testAccessibleTree(container1, tree);
 
     tree = {
-      SECTION: [ { // container2
-        SECTION: [ { // container2 child
-          TEXT_LEAF: [ ] // primary text
-        } ]
-      } ]
+      SECTION: [
+        {
+          // container2
+          SECTION: [
+            {
+              // container2 child
+              TEXT_LEAF: [], // primary text
+            },
+          ],
+        },
+      ],
     };
     testAccessibleTree(container2, tree);
 
     let onReorder = waitForEvent(EVENT_REORDER, id1);
     // Create and add an element with CSS generated content to container1
     await ContentTask.spawn(browser, id1, id => {
       let node = content.document.createElement("div");
       node.textContent = "text";
       node.setAttribute("class", "gentext");
       content.document.getElementById(id).appendChild(node);
     });
     await onReorder;
 
     tree = {
-      SECTION: [ // container
-        { SECTION: [ // inserted node
-          { STATICTEXT: [] }, // :before
-          { TEXT_LEAF: [] }, // primary text
-          { STATICTEXT: [] } // :after
-        ] }
-      ]
+      SECTION: [
+        // container
+        {
+          SECTION: [
+            // inserted node
+            { STATICTEXT: [] }, // :before
+            { TEXT_LEAF: [] }, // primary text
+            { STATICTEXT: [] }, // :after
+          ],
+        },
+      ],
     };
     testAccessibleTree(container1, tree);
 
     onReorder = waitForEvent(EVENT_REORDER, id2);
     // Add CSS generated content to an element in container2's subtree
     await invokeSetAttribute(browser, "container2_child", "class", "gentext");
     await onReorder;
 
     tree = {
-      SECTION: [ // container2
-        { SECTION: [ // container2 child
-          { STATICTEXT: [] }, // :before
-          { TEXT_LEAF: [] }, // primary text
-          { STATICTEXT: [] } // :after
-        ] }
-      ]
+      SECTION: [
+        // container2
+        {
+          SECTION: [
+            // container2 child
+            { STATICTEXT: [] }, // :before
+            { TEXT_LEAF: [] }, // primary text
+            { STATICTEXT: [] }, // :after
+          ],
+        },
+      ],
     };
     testAccessibleTree(container2, tree);
-  });
+  }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_hidden.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_hidden.js
@@ -8,22 +8,24 @@
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
 async function setHidden(browser, value) {
   let onReorder = waitForEvent(EVENT_REORDER, "container");
   await invokeSetAttribute(browser, "child", "hidden", value);
   await onReorder;
 }
 
-addAccessibleTask('<div id="container"><input id="child"></div>',
+addAccessibleTask(
+  '<div id="container"><input id="child"></div>',
   async function(browser, accDoc) {
     let container = findAccessibleChildByID(accDoc, "container");
 
-    testAccessibleTree(container, { SECTION: [ { ENTRY: [ ] } ] });
+    testAccessibleTree(container, { SECTION: [{ ENTRY: [] }] });
 
     // Set @hidden attribute
     await setHidden(browser, "true");
-    testAccessibleTree(container, { SECTION: [ ] });
+    testAccessibleTree(container, { SECTION: [] });
 
     // Remove @hidden attribute
     await setHidden(browser);
-    testAccessibleTree(container, { SECTION: [ { ENTRY: [ ] } ] });
-  });
+    testAccessibleTree(container, { SECTION: [{ ENTRY: [] }] });
+  }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_imagemap.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_imagemap.js
@@ -8,183 +8,192 @@
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
 async function testImageMap(browser, accDoc) {
   const id = "imgmap";
   const acc = findAccessibleChildByID(accDoc, id);
 
   /* ================= Initial tree test ==================================== */
   let tree = {
-    IMAGE_MAP: [
-      { role: ROLE_LINK, name: "b", children: [ ] }
-    ]
+    IMAGE_MAP: [{ role: ROLE_LINK, name: "b", children: [] }],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Insert area ========================================== */
   let onReorder = waitForEvent(EVENT_REORDER, id);
   await ContentTask.spawn(browser, {}, () => {
     let areaElm = content.document.createElement("area");
     let mapNode = content.document.getElementById("map");
-    areaElm.setAttribute("href",
-                         "http://www.bbc.co.uk/radio4/atoz/index.shtml#a");
+    areaElm.setAttribute(
+      "href",
+      "http://www.bbc.co.uk/radio4/atoz/index.shtml#a"
+    );
     areaElm.setAttribute("coords", "0,0,13,14");
     areaElm.setAttribute("alt", "a");
     areaElm.setAttribute("shape", "rect");
     mapNode.insertBefore(areaElm, mapNode.firstChild);
   });
   await onReorder;
 
   tree = {
     IMAGE_MAP: [
-      { role: ROLE_LINK, name: "a", children: [ ] },
-      { role: ROLE_LINK, name: "b", children: [ ] }
-    ]
+      { role: ROLE_LINK, name: "a", children: [] },
+      { role: ROLE_LINK, name: "b", children: [] },
+    ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Append area ========================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await ContentTask.spawn(browser, {}, () => {
     let areaElm = content.document.createElement("area");
     let mapNode = content.document.getElementById("map");
-    areaElm.setAttribute("href",
-                         "http://www.bbc.co.uk/radio4/atoz/index.shtml#c");
+    areaElm.setAttribute(
+      "href",
+      "http://www.bbc.co.uk/radio4/atoz/index.shtml#c"
+    );
     areaElm.setAttribute("coords", "34,0,47,14");
     areaElm.setAttribute("alt", "c");
     areaElm.setAttribute("shape", "rect");
     mapNode.appendChild(areaElm);
   });
   await onReorder;
 
   tree = {
     IMAGE_MAP: [
-      { role: ROLE_LINK, name: "a", children: [ ] },
-      { role: ROLE_LINK, name: "b", children: [ ] },
-      { role: ROLE_LINK, name: "c", children: [ ] }
-    ]
+      { role: ROLE_LINK, name: "a", children: [] },
+      { role: ROLE_LINK, name: "b", children: [] },
+      { role: ROLE_LINK, name: "c", children: [] },
+    ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Remove area ========================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await ContentTask.spawn(browser, {}, () => {
     let mapNode = content.document.getElementById("map");
     mapNode.removeChild(mapNode.firstElementChild);
   });
   await onReorder;
 
   tree = {
     IMAGE_MAP: [
-      { role: ROLE_LINK, name: "b", children: [ ] },
-      { role: ROLE_LINK, name: "c", children: [ ] }
-    ]
+      { role: ROLE_LINK, name: "b", children: [] },
+      { role: ROLE_LINK, name: "c", children: [] },
+    ],
   };
   testAccessibleTree(acc, tree);
 }
 
 async function testContainer(browser) {
   const id = "container";
   /* ================= Remove name on map =================================== */
   let onReorder = waitForEvent(EVENT_REORDER, id);
   await invokeSetAttribute(browser, "map", "name");
   let event = await onReorder;
   const acc = event.accessible;
 
   let tree = {
-    SECTION: [
-      { GRAPHIC: [ ] }
-    ]
+    SECTION: [{ GRAPHIC: [] }],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Restore name on map ================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await invokeSetAttribute(browser, "map", "name", "atoz_map");
   // XXX: force repainting of the image (see bug 745788 for details).
-  await BrowserTestUtils.synthesizeMouse("#imgmap", 10, 10,
-    { type: "mousemove" }, browser);
+  await BrowserTestUtils.synthesizeMouse(
+    "#imgmap",
+    10,
+    10,
+    { type: "mousemove" },
+    browser
+  );
   await onReorder;
 
   tree = {
-    SECTION: [ {
-      IMAGE_MAP: [
-        { LINK: [ ] },
-        { LINK: [ ] }
-      ]
-    } ]
+    SECTION: [
+      {
+        IMAGE_MAP: [{ LINK: [] }, { LINK: [] }],
+      },
+    ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Remove map =========================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await ContentTask.spawn(browser, {}, () => {
     let mapNode = content.document.getElementById("map");
     mapNode.remove();
   });
   await onReorder;
 
   tree = {
-    SECTION: [
-      { GRAPHIC: [ ] }
-    ]
+    SECTION: [{ GRAPHIC: [] }],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Insert map =========================================== */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await ContentTask.spawn(browser, id, contentId => {
     let map = content.document.createElement("map");
     let area = content.document.createElement("area");
 
     map.setAttribute("name", "atoz_map");
     map.setAttribute("id", "map");
 
-    area.setAttribute("href",
-                      "http://www.bbc.co.uk/radio4/atoz/index.shtml#b");
+    area.setAttribute("href", "http://www.bbc.co.uk/radio4/atoz/index.shtml#b");
     area.setAttribute("coords", "17,0,30,14");
     area.setAttribute("alt", "b");
     area.setAttribute("shape", "rect");
 
     map.appendChild(area);
     content.document.getElementById(contentId).appendChild(map);
   });
   await onReorder;
 
   tree = {
-    SECTION: [ {
-      IMAGE_MAP: [
-        { LINK: [ ] }
-      ]
-    } ]
+    SECTION: [
+      {
+        IMAGE_MAP: [{ LINK: [] }],
+      },
+    ],
   };
   testAccessibleTree(acc, tree);
 
   /* ================= Hide image map ======================================= */
   onReorder = waitForEvent(EVENT_REORDER, id);
   await invokeSetStyle(browser, "imgmap", "display", "none");
   await onReorder;
 
   tree = {
-    SECTION: [ ]
+    SECTION: [],
   };
   testAccessibleTree(acc, tree);
 }
 
 async function waitForImageMap(browser, accDoc) {
   const id = "imgmap";
   const acc = findAccessibleChildByID(accDoc, id);
   if (acc.firstChild) {
     return;
   }
 
   const onReorder = waitForEvent(EVENT_REORDER, id);
   // Wave over image map
-  await BrowserTestUtils.synthesizeMouse(`#${id}`, 10, 10,
-                                         { type: "mousemove" }, browser);
+  await BrowserTestUtils.synthesizeMouse(
+    `#${id}`,
+    10,
+    10,
+    { type: "mousemove" },
+    browser
+  );
   await onReorder;
 }
 
-addAccessibleTask("doc_treeupdate_imagemap.html", async function(browser, accDoc) {
+addAccessibleTask("doc_treeupdate_imagemap.html", async function(
+  browser,
+  accDoc
+) {
   await waitForImageMap(browser, accDoc);
   await testImageMap(browser, accDoc);
   await testContainer(browser);
 });
--- a/accessible/tests/browser/e10s/browser_treeupdate_list.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_list.js
@@ -8,35 +8,44 @@
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
 async function setDisplayAndWaitForReorder(browser, value) {
   let onReorder = waitForEvent(EVENT_REORDER, "ul");
   await invokeSetStyle(browser, "li", "display", value);
   return onReorder;
 }
 
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <ul id="ul">
     <li id="li">item1</li>
-  </ul>`, async function(browser, accDoc) {
-  let li = findAccessibleChildByID(accDoc, "li");
-  let bullet = li.firstChild;
-  let accTree = {
-    role: ROLE_LISTITEM,
-    children: [ {
-      role: ROLE_STATICTEXT,
-      children: []
-    }, {
-      role: ROLE_TEXT_LEAF,
-      children: []
-    } ]
-  };
-  testAccessibleTree(li, accTree);
+  </ul>`,
+  async function(browser, accDoc) {
+    let li = findAccessibleChildByID(accDoc, "li");
+    let bullet = li.firstChild;
+    let accTree = {
+      role: ROLE_LISTITEM,
+      children: [
+        {
+          role: ROLE_STATICTEXT,
+          children: [],
+        },
+        {
+          role: ROLE_TEXT_LEAF,
+          children: [],
+        },
+      ],
+    };
+    testAccessibleTree(li, accTree);
 
-  await setDisplayAndWaitForReorder(browser, "none");
+    await setDisplayAndWaitForReorder(browser, "none");
 
-  ok(isDefunct(li), "Check that li is defunct.");
-  ok(isDefunct(bullet), "Check that bullet is defunct.");
+    ok(isDefunct(li), "Check that li is defunct.");
+    ok(isDefunct(bullet), "Check that bullet is defunct.");
+
+    let event = await setDisplayAndWaitForReorder(browser, "list-item");
 
-  let event = await setDisplayAndWaitForReorder(browser, "list-item");
-
-  testAccessibleTree(findAccessibleChildByID(event.accessible, "li"), accTree);
-});
+    testAccessibleTree(
+      findAccessibleChildByID(event.accessible, "li"),
+      accTree
+    );
+  }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_list_editabledoc.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_list_editabledoc.js
@@ -7,31 +7,33 @@
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
 addAccessibleTask('<ol id="list"></ol>', async function(browser, accDoc) {
   let list = findAccessibleChildByID(accDoc, "list");
 
   testAccessibleTree(list, {
     role: ROLE_LIST,
-    children: [ ]
+    children: [],
   });
 
   await invokeSetAttribute(browser, "body", "contentEditable", "true");
   let onReorder = waitForEvent(EVENT_REORDER, "list");
   await ContentTask.spawn(browser, {}, () => {
     let li = content.document.createElement("li");
     li.textContent = "item";
     content.document.getElementById("list").appendChild(li);
   });
   await onReorder;
 
   testAccessibleTree(list, {
     role: ROLE_LIST,
-    children: [ {
-      role: ROLE_LISTITEM,
-      children: [
-        { role: ROLE_STATICTEXT, name: "1. ", children: [] },
-        { role: ROLE_TEXT_LEAF, children: [] }
-      ]
-    } ]
+    children: [
+      {
+        role: ROLE_LISTITEM,
+        children: [
+          { role: ROLE_STATICTEXT, name: "1. ", children: [] },
+          { role: ROLE_TEXT_LEAF, children: [] },
+        ],
+      },
+    ],
   });
 });
--- a/accessible/tests/browser/e10s/browser_treeupdate_listener.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_listener.js
@@ -2,27 +2,36 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask('<span id="parent"><span id="child"></span></span>',
+addAccessibleTask(
+  '<span id="parent"><span id="child"></span></span>',
   async function(browser, accDoc) {
-    is(findAccessibleChildByID(accDoc, "parent"), null,
-      "Check that parent is not accessible.");
-    is(findAccessibleChildByID(accDoc, "child"), null,
-      "Check that child is not accessible.");
+    is(
+      findAccessibleChildByID(accDoc, "parent"),
+      null,
+      "Check that parent is not accessible."
+    );
+    is(
+      findAccessibleChildByID(accDoc, "child"),
+      null,
+      "Check that child is not accessible."
+    );
 
     let onReorder = waitForEvent(EVENT_REORDER, "body");
     // Add an event listener to parent.
     await ContentTask.spawn(browser, {}, () => {
       content.window.dummyListener = () => {};
-      content.document.getElementById("parent").addEventListener(
-        "click", content.window.dummyListener);
+      content.document
+        .getElementById("parent")
+        .addEventListener("click", content.window.dummyListener);
     });
     await onReorder;
 
     let tree = { TEXT: [] };
     testAccessibleTree(findAccessibleChildByID(accDoc, "parent"), tree);
-  });
+  }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_optgroup.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_optgroup.js
@@ -2,17 +2,20 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask('<select id="select"></select>', async function(browser, accDoc) {
+addAccessibleTask('<select id="select"></select>', async function(
+  browser,
+  accDoc
+) {
   let select = findAccessibleChildByID(accDoc, "select");
 
   let onEvent = waitForEvent(EVENT_REORDER, "select");
   // Create a combobox with grouping and 2 standalone options
   await ContentTask.spawn(browser, {}, () => {
     let doc = content.document;
     let contentSelect = doc.getElementById("select");
     let optGroup = doc.createElement("optgroup");
@@ -30,61 +33,67 @@ addAccessibleTask('<select id="select"><
       contentSelect.add(opt, null);
     }
     contentSelect.firstChild.firstChild.id = "option1Node";
   });
   let event = await onEvent;
   let option1Node = findAccessibleChildByID(event.accessible, "option1Node");
 
   let tree = {
-    COMBOBOX: [ {
-      COMBOBOX_LIST: [ {
-        GROUPING: [
-          { COMBOBOX_OPTION: [ { TEXT_LEAF: [] } ] },
-          { COMBOBOX_OPTION: [ { TEXT_LEAF: [] } ] }
-        ]
-      }, {
-        COMBOBOX_OPTION: []
-      }, {
-        COMBOBOX_OPTION: []
-      } ]
-    } ]
+    COMBOBOX: [
+      {
+        COMBOBOX_LIST: [
+          {
+            GROUPING: [
+              { COMBOBOX_OPTION: [{ TEXT_LEAF: [] }] },
+              { COMBOBOX_OPTION: [{ TEXT_LEAF: [] }] },
+            ],
+          },
+          {
+            COMBOBOX_OPTION: [],
+          },
+          {
+            COMBOBOX_OPTION: [],
+          },
+        ],
+      },
+    ],
   };
   testAccessibleTree(select, tree);
   ok(!isDefunct(option1Node), "option shouldn't be defunct");
 
   onEvent = waitForEvent(EVENT_REORDER, "select");
   // Remove grouping from combobox
   await ContentTask.spawn(browser, {}, () => {
     let contentSelect = content.document.getElementById("select");
     contentSelect.firstChild.remove();
   });
   await onEvent;
 
   tree = {
-    COMBOBOX: [ {
-      COMBOBOX_LIST: [
-        { COMBOBOX_OPTION: [] },
-        { COMBOBOX_OPTION: [] }
-      ]
-    } ]
+    COMBOBOX: [
+      {
+        COMBOBOX_LIST: [{ COMBOBOX_OPTION: [] }, { COMBOBOX_OPTION: [] }],
+      },
+    ],
   };
   testAccessibleTree(select, tree);
-  ok(isDefunct(option1Node),
-    "removed option shouldn't be accessible anymore!");
+  ok(isDefunct(option1Node), "removed option shouldn't be accessible anymore!");
 
   onEvent = waitForEvent(EVENT_REORDER, "select");
   // Remove all options from combobox
   await ContentTask.spawn(browser, {}, () => {
     let contentSelect = content.document.getElementById("select");
     while (contentSelect.length) {
       contentSelect.remove(0);
     }
   });
   await onEvent;
 
   tree = {
-    COMBOBOX: [ {
-      COMBOBOX_LIST: [ ]
-    } ]
+    COMBOBOX: [
+      {
+        COMBOBOX_LIST: [],
+      },
+    ],
   };
   testAccessibleTree(select, tree);
 });
--- a/accessible/tests/browser/e10s/browser_treeupdate_removal.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_removal.js
@@ -2,37 +2,56 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask("doc_treeupdate_removal.xhtml", async function(browser, accDoc) {
-  ok(isAccessible(findAccessibleChildByID(accDoc, "the_table")),
-    "table should be accessible");
+addAccessibleTask("doc_treeupdate_removal.xhtml", async function(
+  browser,
+  accDoc
+) {
+  ok(
+    isAccessible(findAccessibleChildByID(accDoc, "the_table")),
+    "table should be accessible"
+  );
 
   // Move the_table element into hidden subtree.
   let onReorder = waitForEvent(EVENT_REORDER, "body");
-  await ContentTask.spawn(browser, {}, () => content.document.getElementById(
-    "the_displaynone").appendChild(content.document.getElementById(
-      "the_table")));
+  await ContentTask.spawn(browser, {}, () =>
+    content.document
+      .getElementById("the_displaynone")
+      .appendChild(content.document.getElementById("the_table"))
+  );
   await onReorder;
 
-  ok(!isAccessible(findAccessibleChildByID(accDoc, "the_table")),
-    "table in display none tree shouldn't be accessible");
-  ok(!isAccessible(findAccessibleChildByID(accDoc, "the_row")),
-    "row shouldn't be accessible");
+  ok(
+    !isAccessible(findAccessibleChildByID(accDoc, "the_table")),
+    "table in display none tree shouldn't be accessible"
+  );
+  ok(
+    !isAccessible(findAccessibleChildByID(accDoc, "the_row")),
+    "row shouldn't be accessible"
+  );
 
   // Remove the_row element (since it did not have accessible, no event needed).
   await ContentTask.spawn(browser, {}, () =>
     content.document.body.removeChild(
-      content.document.getElementById("the_row")));
+      content.document.getElementById("the_row")
+    )
+  );
 
   // make sure no accessibles have stuck around.
-  ok(!isAccessible(findAccessibleChildByID(accDoc, "the_row")),
-    "row shouldn't be accessible");
-  ok(!isAccessible(findAccessibleChildByID(accDoc, "the_table")),
-    "table shouldn't be accessible");
-  ok(!isAccessible(findAccessibleChildByID(accDoc, "the_displayNone")),
-    "display none things shouldn't be accessible");
+  ok(
+    !isAccessible(findAccessibleChildByID(accDoc, "the_row")),
+    "row shouldn't be accessible"
+  );
+  ok(
+    !isAccessible(findAccessibleChildByID(accDoc, "the_table")),
+    "table shouldn't be accessible"
+  );
+  ok(
+    !isAccessible(findAccessibleChildByID(accDoc, "the_displayNone")),
+    "display none things shouldn't be accessible"
+  );
 });
--- a/accessible/tests/browser/e10s/browser_treeupdate_table.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_table.js
@@ -2,49 +2,46 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <table id="table">
     <tr>
       <td>cell1</td>
       <td>cell2</td>
     </tr>
-  </table>`, async function(browser, accDoc) {
-  let table = findAccessibleChildByID(accDoc, "table");
+  </table>`,
+  async function(browser, accDoc) {
+    let table = findAccessibleChildByID(accDoc, "table");
 
-  let tree = {
-    TABLE: [
-      { ROW: [
-        { CELL: [ {TEXT_LEAF: [] }]},
-        { CELL: [ {TEXT_LEAF: [] }]}
-      ] }
-    ]
-  };
-  testAccessibleTree(table, tree);
+    let tree = {
+      TABLE: [
+        { ROW: [{ CELL: [{ TEXT_LEAF: [] }] }, { CELL: [{ TEXT_LEAF: [] }] }] },
+      ],
+    };
+    testAccessibleTree(table, tree);
 
-  let onReorder = waitForEvent(EVENT_REORDER, "table");
-  await ContentTask.spawn(browser, {}, () => {
-    // append a caption, it should appear as a first element in the
-    // accessible tree.
-    let doc = content.document;
-    let caption = doc.createElement("caption");
-    caption.textContent = "table caption";
-    doc.getElementById("table").appendChild(caption);
-  });
-  await onReorder;
+    let onReorder = waitForEvent(EVENT_REORDER, "table");
+    await ContentTask.spawn(browser, {}, () => {
+      // append a caption, it should appear as a first element in the
+      // accessible tree.
+      let doc = content.document;
+      let caption = doc.createElement("caption");
+      caption.textContent = "table caption";
+      doc.getElementById("table").appendChild(caption);
+    });
+    await onReorder;
 
-  tree = {
-    TABLE: [
-      { CAPTION: [ { TEXT_LEAF: [] } ] },
-      { ROW: [
-        { CELL: [ {TEXT_LEAF: [] }]},
-        { CELL: [ {TEXT_LEAF: [] }]}
-      ] }
-    ]
-  };
-  testAccessibleTree(table, tree);
-});
+    tree = {
+      TABLE: [
+        { CAPTION: [{ TEXT_LEAF: [] }] },
+        { ROW: [{ CELL: [{ TEXT_LEAF: [] }] }, { CELL: [{ TEXT_LEAF: [] }] }] },
+      ],
+    };
+    testAccessibleTree(table, tree);
+  }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_textleaf.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_textleaf.js
@@ -5,30 +5,33 @@
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
 async function removeTextData(browser, accessible, id, role) {
   let tree = {
     role,
-    children: [ { role: ROLE_TEXT_LEAF, name: "text" } ]
+    children: [{ role: ROLE_TEXT_LEAF, name: "text" }],
   };
   testAccessibleTree(accessible, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, id);
   await ContentTask.spawn(browser, id, contentId => {
     content.document.getElementById(contentId).firstChild.textContent = "";
   });
   await onReorder;
 
   tree = { role, children: [] };
   testAccessibleTree(accessible, tree);
 }
 
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <p id="p">text</p>
-  <pre id="pre">text</pre>`, async function(browser, accDoc) {
-  let p = findAccessibleChildByID(accDoc, "p");
-  let pre = findAccessibleChildByID(accDoc, "pre");
-  await removeTextData(browser, p, "p", ROLE_PARAGRAPH);
-  await removeTextData(browser, pre, "pre", ROLE_TEXT_CONTAINER);
-});
+  <pre id="pre">text</pre>`,
+  async function(browser, accDoc) {
+    let p = findAccessibleChildByID(accDoc, "p");
+    let pre = findAccessibleChildByID(accDoc, "pre");
+    await removeTextData(browser, p, "p", ROLE_PARAGRAPH);
+    await removeTextData(browser, pre, "pre", ROLE_TEXT_CONTAINER);
+  }
+);
--- a/accessible/tests/browser/e10s/browser_treeupdate_visibility.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_visibility.js
@@ -15,181 +15,327 @@ async function testTreeOnHide(browser, a
   await invokeSetStyle(browser, id, "visibility", "hidden");
   await onReorder;
 
   testAccessibleTree(acc, after);
 }
 
 async function test3(browser, accessible) {
   let tree = {
-    SECTION: [ // container
-      { SECTION: [ // parent
-        { SECTION: [ // child
-          { TEXT_LEAF: [] }
-        ] }
-      ] },
-      { SECTION: [ // parent2
-        { SECTION: [ // child2
-          { TEXT_LEAF: [] }
-        ] }
-      ] }
-    ] };
+    SECTION: [
+      // container
+      {
+        SECTION: [
+          // parent
+          {
+            SECTION: [
+              // child
+              { TEXT_LEAF: [] },
+            ],
+          },
+        ],
+      },
+      {
+        SECTION: [
+          // parent2
+          {
+            SECTION: [
+              // child2
+              { TEXT_LEAF: [] },
+            ],
+          },
+        ],
+      },
+    ],
+  };
   testAccessibleTree(accessible, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, "t3_container");
   await ContentTask.spawn(browser, {}, () => {
     let doc = content.document;
     doc.getElementById("t3_container").style.color = "red";
     doc.getElementById("t3_parent").style.visibility = "hidden";
     doc.getElementById("t3_parent2").style.visibility = "hidden";
   });
   await onReorder;
 
   tree = {
-    SECTION: [ // container
-      { SECTION: [ // child
-        { TEXT_LEAF: [] }
-      ] },
-      { SECTION: [ // child2
-        { TEXT_LEAF: [] }
-      ] }
-    ] };
+    SECTION: [
+      // container
+      {
+        SECTION: [
+          // child
+          { TEXT_LEAF: [] },
+        ],
+      },
+      {
+        SECTION: [
+          // child2
+          { TEXT_LEAF: [] },
+        ],
+      },
+    ],
+  };
   testAccessibleTree(accessible, tree);
 }
 
 async function test4(browser, accessible) {
   let tree = {
-    SECTION: [
-      { TABLE: [
-        { ROW: [
-          { CELL: [ ] }
-        ] }
-      ] }
-    ] };
+    SECTION: [{ TABLE: [{ ROW: [{ CELL: [] }] }] }],
+  };
   testAccessibleTree(accessible, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, "t4_parent");
   await ContentTask.spawn(browser, {}, () => {
     let doc = content.document;
     doc.getElementById("t4_container").style.color = "red";
     doc.getElementById("t4_child").style.visibility = "visible";
   });
   await onReorder;
 
   tree = {
-    SECTION: [{
-      TABLE: [{
-        ROW: [{
-          CELL: [{
-            SECTION: [{
-              TEXT_LEAF: []
-            }]
-          }]
-        }]
-      }]
-    }]
+    SECTION: [
+      {
+        TABLE: [
+          {
+            ROW: [
+              {
+                CELL: [
+                  {
+                    SECTION: [
+                      {
+                        TEXT_LEAF: [],
+                      },
+                    ],
+                  },
+                ],
+              },
+            ],
+          },
+        ],
+      },
+    ],
   };
   testAccessibleTree(accessible, tree);
 }
 
-addAccessibleTask("doc_treeupdate_visibility.html", async function(browser, accDoc) {
+addAccessibleTask("doc_treeupdate_visibility.html", async function(
+  browser,
+  accDoc
+) {
   let t3Container = findAccessibleChildByID(accDoc, "t3_container");
   let t4Container = findAccessibleChildByID(accDoc, "t4_container");
 
-  await testTreeOnHide(browser, accDoc, "t1_container", "t1_parent", {
-    SECTION: [{
-      SECTION: [{
-        SECTION: [ { TEXT_LEAF: [] } ]
-      }]
-    }]
-  }, {
-    SECTION: [ {
-      SECTION: [ { TEXT_LEAF: [] } ]
-    } ]
-  });
+  await testTreeOnHide(
+    browser,
+    accDoc,
+    "t1_container",
+    "t1_parent",
+    {
+      SECTION: [
+        {
+          SECTION: [
+            {
+              SECTION: [{ TEXT_LEAF: [] }],
+            },
+          ],
+        },
+      ],
+    },
+    {
+      SECTION: [
+        {
+          SECTION: [{ TEXT_LEAF: [] }],
+        },
+      ],
+    }
+  );
 
-  await testTreeOnHide(browser, accDoc, "t2_container", "t2_grandparent", {
-    SECTION: [{ // container
-      SECTION: [{ // grand parent
-        SECTION: [{
-          SECTION: [{ // child
-            TEXT_LEAF: []
-          }]
-        }, {
-          SECTION: [{ // child2
-            TEXT_LEAF: []
-          }]
-        }]
-      }]
-    }]
-  }, {
-    SECTION: [{ // container
-      SECTION: [{ // child
-        TEXT_LEAF: []
-      }]
-    }, {
-      SECTION: [{ // child2
-        TEXT_LEAF: []
-      }]
-    }]
-  });
+  await testTreeOnHide(
+    browser,
+    accDoc,
+    "t2_container",
+    "t2_grandparent",
+    {
+      SECTION: [
+        {
+          // container
+          SECTION: [
+            {
+              // grand parent
+              SECTION: [
+                {
+                  SECTION: [
+                    {
+                      // child
+                      TEXT_LEAF: [],
+                    },
+                  ],
+                },
+                {
+                  SECTION: [
+                    {
+                      // child2
+                      TEXT_LEAF: [],
+                    },
+                  ],
+                },
+              ],
+            },
+          ],
+        },
+      ],
+    },
+    {
+      SECTION: [
+        {
+          // container
+          SECTION: [
+            {
+              // child
+              TEXT_LEAF: [],
+            },
+          ],
+        },
+        {
+          SECTION: [
+            {
+              // child2
+              TEXT_LEAF: [],
+            },
+          ],
+        },
+      ],
+    }
+  );
 
   await test3(browser, t3Container);
   await test4(browser, t4Container);
 
-  await testTreeOnHide(browser, accDoc, "t5_container", "t5_subcontainer", {
-    SECTION: [{ // container
-      SECTION: [{ // subcontainer
-        TABLE: [{
-          ROW: [{
-            CELL: [{
-              SECTION: [{ // child
-                TEXT_LEAF: []
-              }]
-            }]
-          }]
-        }]
-      }]
-    }]
-  }, {
-    SECTION: [{ // container
-      SECTION: [{ // child
-        TEXT_LEAF: []
-      }]
-    }]
-  });
+  await testTreeOnHide(
+    browser,
+    accDoc,
+    "t5_container",
+    "t5_subcontainer",
+    {
+      SECTION: [
+        {
+          // container
+          SECTION: [
+            {
+              // subcontainer
+              TABLE: [
+                {
+                  ROW: [
+                    {
+                      CELL: [
+                        {
+                          SECTION: [
+                            {
+                              // child
+                              TEXT_LEAF: [],
+                            },
+                          ],
+                        },
+                      ],
+                    },
+                  ],
+                },
+              ],
+            },
+          ],
+        },
+      ],
+    },
+    {
+      SECTION: [
+        {
+          // container
+          SECTION: [
+            {
+              // child
+              TEXT_LEAF: [],
+            },
+          ],
+        },
+      ],
+    }
+  );
 
-  await testTreeOnHide(browser, accDoc, "t6_container", "t6_subcontainer", {
-    SECTION: [{ // container
-      SECTION: [{ // subcontainer
-        TABLE: [{
-          ROW: [{
-            CELL: [{
-              TABLE: [{ // nested table
-                ROW: [{
-                  CELL: [{
-                    SECTION: [{ // child
-                      TEXT_LEAF: []
-                    }]
-                  }]
-                }]
-              }]
-            }]
-          }]
-        }]
-      }, {
-        SECTION: [{ // child2
-          TEXT_LEAF: []
-        }]
-      }]
-    }]
-  }, {
-    SECTION: [{ // container
-      SECTION: [{ // child
-        TEXT_LEAF: []
-      }]
-    }, {
-      SECTION: [{ // child2
-        TEXT_LEAF: []
-      }]
-    }]
-  });
+  await testTreeOnHide(
+    browser,
+    accDoc,
+    "t6_container",
+    "t6_subcontainer",
+    {
+      SECTION: [
+        {
+          // container
+          SECTION: [
+            {
+              // subcontainer
+              TABLE: [
+                {
+                  ROW: [
+                    {
+                      CELL: [
+                        {
+                          TABLE: [
+                            {
+                              // nested table
+                              ROW: [
+                                {
+                                  CELL: [
+                                    {
+                                      SECTION: [
+                                        {
+                                          // child
+                                          TEXT_LEAF: [],
+                                        },
+                                      ],
+                                    },
+                                  ],
+                                },
+                              ],
+                            },
+                          ],
+                        },
+                      ],
+                    },
+                  ],
+                },
+              ],
+            },
+            {
+              SECTION: [
+                {
+                  // child2
+                  TEXT_LEAF: [],
+                },
+              ],
+            },
+          ],
+        },
+      ],
+    },
+    {
+      SECTION: [
+        {
+          // container
+          SECTION: [
+            {
+              // child
+              TEXT_LEAF: [],
+            },
+          ],
+        },
+        {
+          SECTION: [
+            {
+              // child2
+              TEXT_LEAF: [],
+            },
+          ],
+        },
+      ],
+    }
+  );
 });
--- a/accessible/tests/browser/e10s/browser_treeupdate_whitespace.js
+++ b/accessible/tests/browser/e10s/browser_treeupdate_whitespace.js
@@ -2,69 +2,66 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/role.js */
 loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
 
-addAccessibleTask("doc_treeupdate_whitespace.html", async function(browser, accDoc) {
+addAccessibleTask("doc_treeupdate_whitespace.html", async function(
+  browser,
+  accDoc
+) {
   let container1 = findAccessibleChildByID(accDoc, "container1");
   let container2Parent = findAccessibleChildByID(accDoc, "container2-parent");
 
   let tree = {
     SECTION: [
       { GRAPHIC: [] },
       { TEXT_LEAF: [] },
       { GRAPHIC: [] },
       { TEXT_LEAF: [] },
-      { GRAPHIC: [] }
-    ]
+      { GRAPHIC: [] },
+    ],
   };
   testAccessibleTree(container1, tree);
 
   let onReorder = waitForEvent(EVENT_REORDER, "container1");
   // Remove img1 from container1
   await ContentTask.spawn(browser, {}, () => {
     let doc = content.document;
-    doc.getElementById("container1").removeChild(
-      doc.getElementById("img1"));
+    doc.getElementById("container1").removeChild(doc.getElementById("img1"));
   });
   await onReorder;
 
   tree = {
-    SECTION: [
-      { GRAPHIC: [] },
-      { TEXT_LEAF: [] },
-      { GRAPHIC: [] }
-    ]
+    SECTION: [{ GRAPHIC: [] }, { TEXT_LEAF: [] }, { GRAPHIC: [] }],
   };
   testAccessibleTree(container1, tree);
 
   tree = {
-    SECTION: [
-      { LINK: [] },
-      { LINK: [ { GRAPHIC: [] } ] }
-    ]
+    SECTION: [{ LINK: [] }, { LINK: [{ GRAPHIC: [] }] }],
   };
   testAccessibleTree(container2Parent, tree);
 
   onReorder = waitForEvent(EVENT_REORDER, "container2-parent");
   // Append an img with valid src to container2
   await ContentTask.spawn(browser, {}, () => {
     let doc = content.document;
     let img = doc.createElement("img");
-    img.setAttribute("src",
-      "http://example.com/a11y/accessible/tests/mochitest/moz.png");
+    img.setAttribute(
+      "src",
+      "http://example.com/a11y/accessible/tests/mochitest/moz.png"
+    );
     doc.getElementById("container2").appendChild(img);
   });
   await onReorder;
 
   tree = {
     SECTION: [
-      { LINK: [ { GRAPHIC: [ ] } ] },
-      { TEXT_LEAF: [ ] },
-      { LINK: [ { GRAPHIC: [ ] } ] }
-    ]
+      { LINK: [{ GRAPHIC: [] }] },
+      { TEXT_LEAF: [] },
+      { LINK: [{ GRAPHIC: [] }] },
+    ],
   };
   testAccessibleTree(container2Parent, tree);
 });
--- a/accessible/tests/browser/e10s/head.js
+++ b/accessible/tests/browser/e10s/head.js
@@ -3,13 +3,14 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 // Load the shared-head file first.
 /* import-globals-from ../shared-head.js */
 Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js",
-  this);
+  this
+);
 
 // Loading and common.js from accessible/tests/mochitest/ for all tests, as
 // well as events.js.
 loadScripts({ name: "common.js", dir: MOCHITESTS_DIR }, "events.js");
--- a/accessible/tests/browser/events.js
+++ b/accessible/tests/browser/events.js
@@ -14,49 +14,55 @@
             EVENT_TEXT_REMOVED, EVENT_DOCUMENT_LOAD_COMPLETE, EVENT_HIDE,
             EVENT_TEXT_CARET_MOVED, EVENT_DESCRIPTION_CHANGE, EVENT_NAME_CHANGE,
             EVENT_STATE_CHANGE, EVENT_VALUE_CHANGE, EVENT_TEXT_VALUE_CHANGE,
             EVENT_FOCUS, EVENT_DOCUMENT_RELOAD, EVENT_VIRTUALCURSOR_CHANGED,
             UnexpectedEvents, contentSpawnMutation, waitForEvent, waitForEvents,
             waitForOrderedEvents */
 
 const EVENT_ANNOUNCEMENT = nsIAccessibleEvent.EVENT_ANNOUNCEMENT;
-const EVENT_DOCUMENT_LOAD_COMPLETE = nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE;
+const EVENT_DOCUMENT_LOAD_COMPLETE =
+  nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE;
 const EVENT_HIDE = nsIAccessibleEvent.EVENT_HIDE;
 const EVENT_REORDER = nsIAccessibleEvent.EVENT_REORDER;
 const EVENT_SCROLLING = nsIAccessibleEvent.EVENT_SCROLLING;
 const EVENT_SCROLLING_END = nsIAccessibleEvent.EVENT_SCROLLING_END;
 const EVENT_SHOW = nsIAccessibleEvent.EVENT_SHOW;
 const EVENT_STATE_CHANGE = nsIAccessibleEvent.EVENT_STATE_CHANGE;
 const EVENT_TEXT_CARET_MOVED = nsIAccessibleEvent.EVENT_TEXT_CARET_MOVED;
 const EVENT_TEXT_INSERTED = nsIAccessibleEvent.EVENT_TEXT_INSERTED;
 const EVENT_TEXT_REMOVED = nsIAccessibleEvent.EVENT_TEXT_REMOVED;
 const EVENT_DESCRIPTION_CHANGE = nsIAccessibleEvent.EVENT_DESCRIPTION_CHANGE;
 const EVENT_NAME_CHANGE = nsIAccessibleEvent.EVENT_NAME_CHANGE;
 const EVENT_VALUE_CHANGE = nsIAccessibleEvent.EVENT_VALUE_CHANGE;
 const EVENT_TEXT_VALUE_CHANGE = nsIAccessibleEvent.EVENT_TEXT_VALUE_CHANGE;
 const EVENT_FOCUS = nsIAccessibleEvent.EVENT_FOCUS;
 const EVENT_DOCUMENT_RELOAD = nsIAccessibleEvent.EVENT_DOCUMENT_RELOAD;
-const EVENT_VIRTUALCURSOR_CHANGED = nsIAccessibleEvent.EVENT_VIRTUALCURSOR_CHANGED;
+const EVENT_VIRTUALCURSOR_CHANGED =
+  nsIAccessibleEvent.EVENT_VIRTUALCURSOR_CHANGED;
 
 /**
  * Describe an event in string format.
  * @param  {nsIAccessibleEvent}  event  event to strigify
  */
 function eventToString(event) {
   let type = eventTypeToString(event.eventType);
   let info = `Event type: ${type}`;
 
   if (event instanceof nsIAccessibleStateChangeEvent) {
-    let stateStr = statesToString(event.isExtraState ? 0 : event.state,
-                                  event.isExtraState ? event.state : 0);
+    let stateStr = statesToString(
+      event.isExtraState ? 0 : event.state,
+      event.isExtraState ? event.state : 0
+    );
     info += `, state: ${stateStr}, is enabled: ${event.isEnabled}`;
   } else if (event instanceof nsIAccessibleTextChangeEvent) {
     let tcType = event.isInserted ? "inserted" : "removed";
-    info += `, start: ${event.start}, length: ${event.length}, ${tcType} text: ${event.modifiedText}`;
+    info += `, start: ${event.start}, length: ${
+      event.length
+    }, ${tcType} text: ${event.modifiedText}`;
   }
 
   info += `. Target: ${prettyName(event.accessible)}`;
   return info;
 }
 
 function matchEvent(event, matchCriteria) {
   let acc = event.accessible;
@@ -116,17 +122,17 @@ function waitForEvent(eventType, matchCr
           return;
         }
 
         if (matchEvent(event, matchCriteria)) {
           Logger.log(`Correct event type: ${eventTypeToString(eventType)}`);
           Services.obs.removeObserver(this, "accessible-event");
           resolve(event);
         }
-      }
+      },
     };
     Services.obs.addObserver(eventObserver, "accessible-event");
   });
 }
 
 class UnexpectedEvents {
   constructor(unexpected) {
     if (unexpected.length) {
@@ -137,18 +143,20 @@ class UnexpectedEvents {
 
   observe(subject, topic, data) {
     if (topic !== "accessible-event") {
       return;
     }
 
     let event = subject.QueryInterface(nsIAccessibleEvent);
 
-    let unexpectedEvent = this.unexpected.find(([etype, criteria]) =>
-      etype === event.eventType && matchEvent(event, criteria));
+    let unexpectedEvent = this.unexpected.find(
+      ([etype, criteria]) =>
+        etype === event.eventType && matchEvent(event, criteria)
+    );
 
     if (unexpectedEvent) {
       ok(false, `Got unexpected event: ${eventToString(event)}`);
     }
   }
 
   stop() {
     if (this.unexpected) {
@@ -166,26 +174,27 @@ class UnexpectedEvents {
 function waitForEvents(events, ordered = false) {
   let expected = events.expected || events;
   let unexpected = events.unexpected || [];
   // Next expected event index.
   let currentIdx = 0;
 
   let unexpectedListener = new UnexpectedEvents(unexpected);
 
-  return Promise.all(expected.map((evt, idx) => {
-    let promise = evt instanceof Array ? waitForEvent(...evt) : evt;
-    return promise.then(result => {
-      if (ordered) {
-        is(idx, currentIdx++,
-          `Unexpected event order: ${result}`);
-      }
-      return result;
-    });
-  })).then(results => {
+  return Promise.all(
+    expected.map((evt, idx) => {
+      let promise = evt instanceof Array ? waitForEvent(...evt) : evt;
+      return promise.then(result => {
+        if (ordered) {
+          is(idx, currentIdx++, `Unexpected event order: ${result}`);
+        }
+        return result;
+      });
+    })
+  ).then(results => {
     unexpectedListener.stop();
     return results;
   });
 }
 
 function waitForOrderedEvents(events) {
   return waitForEvents(events, true);
 }
--- a/accessible/tests/browser/events/browser_test_docload.js
+++ b/accessible/tests/browser/events/browser_test_docload.js
@@ -30,83 +30,88 @@ function urlChecker(url) {
   };
 }
 
 async function runTests(browser, accDoc) {
   let onLoadEvents = waitForEvents({
     expected: [
       [EVENT_REORDER, getAccessible(browser)],
       [EVENT_DOCUMENT_LOAD_COMPLETE, "body2"],
-      [EVENT_STATE_CHANGE, busyChecker(false)]],
+      [EVENT_STATE_CHANGE, busyChecker(false)],
+    ],
     unexpected: [
       [EVENT_DOCUMENT_LOAD_COMPLETE, inIframeChecker("iframe1")],
-      [EVENT_STATE_CHANGE, inIframeChecker("iframe1")]]
+      [EVENT_STATE_CHANGE, inIframeChecker("iframe1")],
+    ],
   });
 
-  BrowserTestUtils.loadURI(browser, `data:text/html;charset=utf-8,
+  BrowserTestUtils.loadURI(
+    browser,
+    `data:text/html;charset=utf-8,
     <html><body id="body2">
       <iframe id="iframe1" src="http://example.com"></iframe>
-    </body></html>`);
+    </body></html>`
+  );
 
   await onLoadEvents;
 
   onLoadEvents = waitForEvents([
-      [EVENT_DOCUMENT_LOAD_COMPLETE, urlChecker("about:about")],
-      [EVENT_STATE_CHANGE, busyChecker(false)],
-      [EVENT_REORDER, getAccessible(browser)]
+    [EVENT_DOCUMENT_LOAD_COMPLETE, urlChecker("about:about")],
+    [EVENT_STATE_CHANGE, busyChecker(false)],
+    [EVENT_REORDER, getAccessible(browser)],
   ]);
 
   BrowserTestUtils.loadURI(browser, "about:about");
 
   await onLoadEvents;
 
   onLoadEvents = waitForEvents([
     [EVENT_DOCUMENT_RELOAD, evt => evt.isFromUserInput],
     [EVENT_REORDER, getAccessible(browser)],
-    [EVENT_STATE_CHANGE, busyChecker(false)]
+    [EVENT_STATE_CHANGE, busyChecker(false)],
   ]);
 
   EventUtils.synthesizeKey("VK_F5", {}, browser.ownerGlobal);
 
   await onLoadEvents;
 
   onLoadEvents = waitForEvents([
     [EVENT_DOCUMENT_LOAD_COMPLETE, urlChecker("about:mozilla")],
     [EVENT_STATE_CHANGE, busyChecker(false)],
-    [EVENT_REORDER, getAccessible(browser)]
+    [EVENT_REORDER, getAccessible(browser)],
   ]);
 
   BrowserTestUtils.loadURI(browser, "about:mozilla");
 
   await onLoadEvents;
 
   onLoadEvents = waitForEvents([
     [EVENT_DOCUMENT_RELOAD, evt => !evt.isFromUserInput],
     [EVENT_REORDER, getAccessible(browser)],
-    [EVENT_STATE_CHANGE, busyChecker(false)]
+    [EVENT_STATE_CHANGE, busyChecker(false)],
   ]);
 
   browser.reload();
 
   await onLoadEvents;
 
   onLoadEvents = waitForEvents([
     [EVENT_DOCUMENT_LOAD_COMPLETE, urlChecker("http://www.wronguri.wronguri/")],
     [EVENT_STATE_CHANGE, busyChecker(false)],
-    [EVENT_REORDER, getAccessible(browser)]
+    [EVENT_REORDER, getAccessible(browser)],
   ]);
 
   BrowserTestUtils.loadURI(browser, "http://www.wronguri.wronguri/");
 
   await onLoadEvents;
 
   onLoadEvents = waitForEvents([
     [EVENT_DOCUMENT_LOAD_COMPLETE, urlChecker("https://nocert.example.com/")],
     [EVENT_STATE_CHANGE, busyChecker(false)],
-    [EVENT_REORDER, getAccessible(browser)]
+    [EVENT_REORDER, getAccessible(browser)],
   ]);
 
   BrowserTestUtils.loadURI(browser, "https://nocert.example.com:443/");
 
   await onLoadEvents;
 }
 
 /**
--- a/accessible/tests/browser/events/browser_test_focus_browserui.js
+++ b/accessible/tests/browser/events/browser_test_focus_browserui.js
@@ -1,29 +1,33 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/states.js */
 /* import-globals-from ../../mochitest/role.js */
-loadScripts({ name: "states.js", dir: MOCHITESTS_DIR },
-            { name: "role.js", dir: MOCHITESTS_DIR });
+loadScripts(
+  { name: "states.js", dir: MOCHITESTS_DIR },
+  { name: "role.js", dir: MOCHITESTS_DIR }
+);
 
 async function runTests(browser, accDoc) {
   let onFocus = waitForEvent(EVENT_FOCUS, "input");
   EventUtils.synthesizeKey("VK_TAB", {}, browser.ownerGlobal);
   let evt = await onFocus;
   testStates(evt.accessible, STATE_FOCUSED);
 
   onFocus = waitForEvent(EVENT_FOCUS, "buttonInputDoc");
-  let url = snippetToURL(`<input id="input" type="button" value="button">`, { id: "buttonInputDoc" });
+  let url = snippetToURL(`<input id="input" type="button" value="button">`, {
+    id: "buttonInputDoc",
+  });
   browser.loadURI(url, {
-    triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()
+    triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
   });
   evt = await onFocus;
   testStates(evt.accessible, STATE_FOCUSED);
 
   onFocus = waitForEvent(EVENT_FOCUS, "input");
   browser.goBack();
   evt = await onFocus;
   testStates(evt.accessible, STATE_FOCUSED);
--- a/accessible/tests/browser/events/browser_test_focus_dialog.js
+++ b/accessible/tests/browser/events/browser_test_focus_dialog.js
@@ -1,18 +1,20 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/states.js */
 /* import-globals-from ../../mochitest/role.js */
-loadScripts({ name: "states.js", dir: MOCHITESTS_DIR },
-            { name: "role.js", dir: MOCHITESTS_DIR });
+loadScripts(
+  { name: "states.js", dir: MOCHITESTS_DIR },
+  { name: "role.js", dir: MOCHITESTS_DIR }
+);
 
 async function runTests(browser, accDoc) {
   let onFocus = waitForEvent(EVENT_FOCUS, "button");
   await ContentTask.spawn(browser, {}, () => {
     content.document.getElementById("button").focus();
   });
   let button = (await onFocus).accessible;
   testStates(button, STATE_FOCUSED);
@@ -27,17 +29,19 @@ async function runTests(browser, accDoc)
   testStates(button, 0, 0, STATE_FOCUSED);
 
   onFocus = waitForEvent(EVENT_FOCUS, "button");
   await BrowserTestUtils.closeWindow(newWin);
   testStates((await onFocus).accessible, STATE_FOCUSED);
 
   onFocus = waitForEvent(EVENT_FOCUS, "body2");
   await ContentTask.spawn(browser, {}, () => {
-    content.document.getElementById("editabledoc").contentWindow.document.body.focus();
+    content.document
+      .getElementById("editabledoc")
+      .contentWindow.document.body.focus();
   });
   testStates((await onFocus).accessible, STATE_FOCUSED);
 
   onFocus = waitForEvent(EVENT_FOCUS, "body2");
   newWin = await BrowserTestUtils.openNewBrowserWindow();
   await BrowserTestUtils.closeWindow(newWin);
   testStates((await onFocus).accessible, STATE_FOCUSED);
 
@@ -50,18 +54,21 @@ async function runTests(browser, accDoc)
   });
   await onShow;
   testStates((await onFocus).accessible, STATE_FOCUSED);
 }
 
 /**
  * Accessible dialog focus testing
  */
-addAccessibleTask(`
+addAccessibleTask(
+  `
   <button id="button">button</button>
   <iframe id="editabledoc"
-          src="${snippetToURL("", { id: "body2", contentEditable: "true"})}">
+          src="${snippetToURL("", { id: "body2", contentEditable: "true" })}">
   </iframe>
   <div id="alertdialog" style="display: none" tabindex="-1" role="alertdialog" aria-labelledby="title2" aria-describedby="desc2">
     <div id="title2">Blah blah</div>
     <div id="desc2">Woof woof woof.</div>
     <button>Close</button>
-  </div>`, runTests);
+  </div>`,
+  runTests
+);
--- a/accessible/tests/browser/events/browser_test_focus_urlbar.js
+++ b/accessible/tests/browser/events/browser_test_focus_urlbar.js
@@ -1,60 +1,73 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 /* import-globals-from ../../mochitest/states.js */
 /* import-globals-from ../../mochitest/role.js */
-loadScripts({ name: "states.js", dir: MOCHITESTS_DIR },
-            { name: "role.js", dir: MOCHITESTS_DIR });
-ChromeUtils.defineModuleGetter(this, "PlacesTestUtils",
-  "resource://testing-common/PlacesTestUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "PlacesUtils",
-  "resource://gre/modules/PlacesUtils.jsm");
+loadScripts(
+  { name: "states.js", dir: MOCHITESTS_DIR },
+  { name: "role.js", dir: MOCHITESTS_DIR }
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "PlacesTestUtils",
+  "resource://testing-common/PlacesTestUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "PlacesUtils",
+  "resource://gre/modules/PlacesUtils.jsm"
+);
 
 function isEventForAutocompleteItem(event) {
   return event.accessible.role == ROLE_COMBOBOX_OPTION;
 }
 
 /**
  * Wait for an autocomplete search to finish.
  * This is necessary to ensure predictable results, as these searches are
  * async. Pressing down arrow will use results from the previous input if the
  * search isn't finished yet.
  */
 function waitForSearchFinish() {
   if (UrlbarPrefs.get("quantumbar")) {
     return Promise.all([
       gURLBar.lastQueryContextPromise,
-      BrowserTestUtils.waitForCondition(() => gURLBar.view.isOpen)
+      BrowserTestUtils.waitForCondition(() => gURLBar.view.isOpen),
     ]);
   }
-  return BrowserTestUtils.waitForCondition(() =>
-    (gURLBar.popupOpen && gURLBar.controller.searchStatus >=
-      Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH),
-    "Waiting for search to complete");
+  return BrowserTestUtils.waitForCondition(
+    () =>
+      gURLBar.popupOpen &&
+      gURLBar.controller.searchStatus >=
+        Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH,
+    "Waiting for search to complete"
+  );
 }
 
 // Check that the URL bar manages accessibility focus appropriately.
 async function runTests() {
   registerCleanupFunction(async function() {
     await PlacesUtils.history.clear();
   });
 
   await PlacesTestUtils.addVisits([
-    {uri: makeURI("http://example1.com/blah")},
-    {uri: makeURI("http://example2.com/blah")},
-    {uri: makeURI("http://example1.com/")},
-    {uri: makeURI("http://example2.com/")}
+    { uri: makeURI("http://example1.com/blah") },
+    { uri: makeURI("http://example2.com/blah") },
+    { uri: makeURI("http://example1.com/") },
+    { uri: makeURI("http://example2.com/") },
   ]);
 
-  let focused = waitForEvent(EVENT_FOCUS,
-                             event => event.accessible.role == ROLE_ENTRY);
+  let focused = waitForEvent(
+    EVENT_FOCUS,
+    event => event.accessible.role == ROLE_ENTRY
+  );
   gURLBar.focus();
   let event = await focused;
   let textBox = event.accessible;
   // Ensure the URL bar is ready for a new URL to be typed.
   // Sometimes, when this test runs, the existing text isn't selected when the
   // URL bar is focused. Pressing escape twice ensures that the popup is
   // closed and that the existing text is selected.
   EventUtils.synthesizeKey("KEY_Escape");
@@ -70,17 +83,17 @@ async function runTests() {
   info("Ensuring no focus change on backspace");
   EventUtils.synthesizeKey("KEY_Backspace");
   await waitForSearchFinish();
   // Wait a tick for a11y events to fire.
   await TestUtils.waitForTick();
   testStates(textBox, STATE_FOCUSED);
 
   info("Ensuring no focus change on text selection and delete");
-  EventUtils.synthesizeKey("KEY_ArrowLeft", {shiftKey: true});
+  EventUtils.synthesizeKey("KEY_ArrowLeft", { shiftKey: true });
   EventUtils.synthesizeKey("KEY_Delete");
   await waitForSearchFinish();
   // Wait a tick for a11y events to fire.
   await TestUtils.waitForTick();
   testStates(textBox, STATE_FOCUSED);
 
   info("Ensuring autocomplete focus on down arrow (1)");
   focused = waitForEvent(EVENT_FOCUS, isEventForAutocompleteItem);
@@ -92,23 +105,23 @@ async function runTests() {
   focused = waitForEvent(EVENT_FOCUS, isEventForAutocompleteItem);
   EventUtils.synthesizeKey("KEY_ArrowDown");
   event = await focused;
   testStates(event.accessible, STATE_FOCUSED);
 
   if (AppConstants.platform == "macosx") {
     info("Ensuring focus of another autocomplete item on ctrl-n");
     focused = waitForEvent(EVENT_FOCUS, isEventForAutocompleteItem);
-    EventUtils.synthesizeKey("n", {ctrlKey: true});
+    EventUtils.synthesizeKey("n", { ctrlKey: true });
     event = await focused;
     testStates(event.accessible, STATE_FOCUSED);
 
     info("Ensuring focus of another autocomplete item on ctrl-p");
     focused = waitForEvent(EVENT_FOCUS, isEventForAutocompleteItem);
-    EventUtils.synthesizeKey("p", {ctrlKey: true});
+    EventUtils.synthesizeKey("p", { ctrlKey: true });
     event = await focused;
     testStates(event.accessible, STATE_FOCUSED);
   }
 
   info("Ensuring focus of another autocomplete item on up arrow");
   focused = waitForEvent(EVENT_FOCUS, isEventForAutocompleteItem);
   EventUtils.synthesizeKey("KEY_ArrowUp");
   event = await focused;
@@ -159,26 +172,26 @@ async function runTests() {
   // selects a one-off search button. We arrow back up to re-select the
   // autocomplete result.
   EventUtils.synthesizeKey("KEY_ArrowUp");
   event = await focused;
   testStates(event.accessible, STATE_FOCUSED);
 
   info("Ensuring text box focus on text selection");
   focused = waitForEvent(EVENT_FOCUS, textBox);
-  EventUtils.synthesizeKey("KEY_ArrowLeft", {shiftKey: true});
+  EventUtils.synthesizeKey("KEY_ArrowLeft", { shiftKey: true });
   await focused;
   testStates(textBox, STATE_FOCUSED);
 
   if (AppConstants.platform == "macosx") {
     // On Mac, ctrl-n after arrow left/right does not re-open the popup.
     // Type some text so the next press of ctrl-n opens the popup.
     EventUtils.sendString("ple");
 
     info("Ensuring autocomplete focus on ctrl-n");
     focused = waitForEvent(EVENT_FOCUS, isEventForAutocompleteItem);
-    EventUtils.synthesizeKey("n", {ctrlKey: true});
+    EventUtils.synthesizeKey("n", { ctrlKey: true });
     event = await focused;
     testStates(event.accessible, STATE_FOCUSED);
   }
 }
 
 addAccessibleTask(``, runTests);
--- a/accessible/tests/browser/events/browser_test_scrolling.js
+++ b/accessible/tests/browser/events/browser_test_scrolling.js
@@ -1,50 +1,74 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-addAccessibleTask(`
+addAccessibleTask(
+  `
     <div style="height: 100vh" id="one">one</div>
     <div style="height: 100vh" id="two">two</div>
     <div style="height: 100vh; width: 200vw" id="three">three</div>`,
   async function(browser, accDoc) {
     let onScrolling = waitForEvents([
-      [EVENT_SCROLLING, accDoc], [EVENT_SCROLLING_END, accDoc]]);
+      [EVENT_SCROLLING, accDoc],
+      [EVENT_SCROLLING_END, accDoc],
+    ]);
     await ContentTask.spawn(browser, null, () => {
       content.location.hash = "#two";
     });
     let [scrollEvent1, scrollEndEvent1] = await onScrolling;
     scrollEvent1.QueryInterface(nsIAccessibleScrollingEvent);
-    ok(scrollEvent1.maxScrollY >= scrollEvent1.scrollY, "scrollY is within max");
+    ok(
+      scrollEvent1.maxScrollY >= scrollEvent1.scrollY,
+      "scrollY is within max"
+    );
     scrollEndEvent1.QueryInterface(nsIAccessibleScrollingEvent);
-    ok(scrollEndEvent1.maxScrollY >= scrollEndEvent1.scrollY,
-      "scrollY is within max");
+    ok(
+      scrollEndEvent1.maxScrollY >= scrollEndEvent1.scrollY,
+      "scrollY is within max"
+    );
 
     onScrolling = waitForEvents([
-      [EVENT_SCROLLING, accDoc], [EVENT_SCROLLING_END, accDoc]]);
+      [EVENT_SCROLLING, accDoc],
+      [EVENT_SCROLLING_END, accDoc],
+    ]);
     await ContentTask.spawn(browser, null, () => {
       content.location.hash = "#three";
     });
     let [scrollEvent2, scrollEndEvent2] = await onScrolling;
     scrollEvent2.QueryInterface(nsIAccessibleScrollingEvent);
-    ok(scrollEvent2.scrollY > scrollEvent1.scrollY,
-      `${scrollEvent2.scrollY} > ${scrollEvent1.scrollY}`);
+    ok(
+      scrollEvent2.scrollY > scrollEvent1.scrollY,
+      `${scrollEvent2.scrollY} > ${scrollEvent1.scrollY}`
+    );
     scrollEndEvent2.QueryInterface(nsIAccessibleScrollingEvent);
-    ok(scrollEndEvent2.maxScrollY >= scrollEndEvent2.scrollY,
-      "scrollY is within max");
+    ok(
+      scrollEndEvent2.maxScrollY >= scrollEndEvent2.scrollY,
+      "scrollY is within max"
+    );
 
     onScrolling = waitForEvents([
-      [EVENT_SCROLLING, accDoc], [EVENT_SCROLLING_END, accDoc]]);
+      [EVENT_SCROLLING, accDoc],
+      [EVENT_SCROLLING_END, accDoc],
+    ]);
     await ContentTask.spawn(browser, null, () => {
       content.scrollTo(10, 0);
     });
     let [scrollEvent3, scrollEndEvent3] = await onScrolling;
     scrollEvent3.QueryInterface(nsIAccessibleScrollingEvent);
-    ok(scrollEvent3.maxScrollX >= scrollEvent3.scrollX, "scrollX is within max");
+    ok(
+      scrollEvent3.maxScrollX >= scrollEvent3.scrollX,
+      "scrollX is within max"
+    );
     scrollEndEvent3.QueryInterface(nsIAccessibleScrollingEvent);
-    ok(scrollEndEvent3.maxScrollX >= scrollEndEvent3.scrollX,
-      "scrollY is within max");
-    ok(scrollEvent3.scrollX > scrollEvent2.scrollX,
-      `${scrollEvent3.scrollX} > ${scrollEvent2.scrollX}`);
-  });
+    ok(
+      scrollEndEvent3.maxScrollX >= scrollEndEvent3.scrollX,
+      "scrollY is within max"
+    );
+    ok(
+      scrollEvent3.scrollX > scrollEvent2.scrollX,
+      `${scrollEvent3.scrollX} > ${scrollEvent2.scrollX}`
+    );
+  }
+);
--- a/accessible/tests/browser/events/browser_test_textcaret.js
+++ b/accessible/tests/browser/events/browser_test_textcaret.js
@@ -4,51 +4,52 @@
 "use strict";
 
 /**
  * Caret move events checker.
  */
 function caretMoveChecker(target, caretOffset) {
   return function(event) {
     let cmEvent = event.QueryInterface(nsIAccessibleCaretMoveEvent);
-    return cmEvent.accessible == getAccessible(target) && cmEvent.caretOffset == caretOffset;
+    return (
+      cmEvent.accessible == getAccessible(target) &&
+      cmEvent.caretOffset == caretOffset
+    );
   };
 }
 
 async function checkURLBarCaretEvents() {
   const kURL = "about:mozilla";
   let newWin = await BrowserTestUtils.openNewBrowserWindow();
   BrowserTestUtils.loadURI(newWin.gBrowser.selectedBrowser, kURL);
 
-  await waitForEvent(
-    EVENT_DOCUMENT_LOAD_COMPLETE,
-    event => {
-      try {
-        return event.accessible.QueryInterface(nsIAccessibleDocument).URL == kURL;
-      } catch (e) {
-        return false;
-      }
+  await waitForEvent(EVENT_DOCUMENT_LOAD_COMPLETE, event => {
+    try {
+      return event.accessible.QueryInterface(nsIAccessibleDocument).URL == kURL;
+    } catch (e) {
+      return false;
     }
-  );
+  });
   info("Loaded " + kURL);
 
   let urlbarInputEl = newWin.document.getElementById("urlbar").inputField;
-  let urlbarInput = getAccessible(urlbarInputEl, [ nsIAccessibleText ]);
+  let urlbarInput = getAccessible(urlbarInputEl, [nsIAccessibleText]);
 
   let onCaretMove = waitForEvents([
-    [ EVENT_TEXT_CARET_MOVED, caretMoveChecker(urlbarInput, kURL.length) ],
-    [ EVENT_FOCUS, urlbarInput ]
+    [EVENT_TEXT_CARET_MOVED, caretMoveChecker(urlbarInput, kURL.length)],
+    [EVENT_FOCUS, urlbarInput],
   ]);
 
   urlbarInput.caretOffset = -1;
   await onCaretMove;
<