Bug 1376347 - Enable the ESLint func-call-spacing, key-spacing, keyword-spacing, and no-trailing-spaces rules for accessible/ r?Standard8 draft
authorHemant Singh Patwal <hemantsingh1612@gmail.com>
Tue, 04 Jul 2017 18:57:02 +0530
changeset 603744 2c41f8a2729366ad9db4e7ba331fdf0e57b4ae43
parent 603741 5bed7af5695125fa7aca66239fe15698e0fd4a3c
child 635981 d552942176d152129985c429c72ccae4140cf44d
push id66841
push userbmo:hemantsingh1612@gmail.com
push dateTue, 04 Jul 2017 13:28:08 +0000
reviewersStandard8
bugs1376347
milestone56.0a1
Bug 1376347 - Enable the ESLint func-call-spacing, key-spacing, keyword-spacing, and no-trailing-spaces rules for accessible/ r?Standard8 MozReview-Commit-ID: AtUmUpOSvhi
accessible/.eslintrc.js
accessible/jsat/AccessFu.jsm
accessible/jsat/ContentControl.jsm
accessible/jsat/OutputGenerator.jsm
accessible/jsat/PointerAdapter.jsm
accessible/jsat/Utils.jsm
accessible/tests/mochitest/attributes.js
accessible/tests/mochitest/attributes/test_dpub_aria_xml-roles.html
accessible/tests/mochitest/attributes/test_obj.html
accessible/tests/mochitest/attributes/test_obj_group.html
accessible/tests/mochitest/attributes/test_tag.html
accessible/tests/mochitest/attributes/test_xml-roles.html
accessible/tests/mochitest/common.js
accessible/tests/mochitest/elm/test_HTMLSpec.html
accessible/tests/mochitest/elm/test_figure.html
accessible/tests/mochitest/elm/test_nsApplicationAcc.html
accessible/tests/mochitest/events/test_aria_objattr.html
accessible/tests/mochitest/events/test_dragndrop.html
accessible/tests/mochitest/events/test_textselchange.html
accessible/tests/mochitest/events/test_valuechange.html
accessible/tests/mochitest/grid.js
accessible/tests/mochitest/hittest/test_browser.html
accessible/tests/mochitest/jsat/test_content_text.html
accessible/tests/mochitest/jsat/test_landmarks.html
accessible/tests/mochitest/jsat/test_output.html
accessible/tests/mochitest/jsat/test_output_mathml.html
accessible/tests/mochitest/name/markup.js
accessible/tests/mochitest/name/test_general.html
accessible/tests/mochitest/role.js
accessible/tests/mochitest/role/test_aria.html
accessible/tests/mochitest/selectable/test_aria.html
accessible/tests/mochitest/states.js
accessible/tests/mochitest/states/test_aria.html
accessible/tests/mochitest/states/test_docarticle.html
accessible/tests/mochitest/table.js
accessible/tests/mochitest/table/test_layoutguess.html
accessible/tests/mochitest/table/test_table_2.html
accessible/tests/mochitest/test_OuterDocAccessible.html
accessible/tests/mochitest/test_nsIAccessibleDocument.html
accessible/tests/mochitest/test_nsIAccessibleImage.html
accessible/tests/mochitest/textattrs/test_general.html
accessible/tests/mochitest/tree/test_brokencontext.html
accessible/tests/mochitest/tree/test_txtctrl.html
accessible/tests/mochitest/treeupdate/test_table.html
accessible/tests/mochitest/treeview.js
--- a/accessible/.eslintrc.js
+++ b/accessible/.eslintrc.js
@@ -5,24 +5,20 @@ module.exports = {
     // Warn about cyclomatic complexity in functions.
     "complexity": ["error", 42],
 
     // XXX These are rules that are enabled in the recommended configuration, but
     // disabled here due to failures when initially implemented. They should be
     // removed (and hence enabled) at some stage.
     "brace-style": "off",
     "consistent-return": "off",
-    "func-call-spacing": "off",
     "quotes": "off",
     "object-shorthand": "off",
     "space-before-function-paren": "off",
     "space-infix-ops": "off",
-    "key-spacing": "off",
-    "keyword-spacing": "off",
     "no-else-return": "off",
     "no-multi-spaces": "off",
-    "no-trailing-spaces": "off",
     "no-unexpected-multiline": "off",
     "no-unsafe-finally": "off",
     "no-useless-call": "off",
     "spaced-comment": "off",
   }
 };
--- a/accessible/jsat/AccessFu.jsm
+++ b/accessible/jsat/AccessFu.jsm
@@ -589,17 +589,17 @@ var Output = {
 
     for (let androidEvent of aDetails) {
       androidEvent.type = 'Accessibility:Event';
       if (androidEvent.bounds) {
         androidEvent.bounds = AccessFu.adjustContentBounds(
           androidEvent.bounds, aBrowser);
       }
 
-      switch(androidEvent.eventType) {
+      switch (androidEvent.eventType) {
         case ANDROID_VIEW_TEXT_CHANGED:
           androidEvent.brailleOutput = this.brailleState.adjustText(
             androidEvent.text);
           break;
         case ANDROID_VIEW_TEXT_SELECTION_CHANGED:
           androidEvent.brailleOutput = this.brailleState.adjustSelection(
             androidEvent.brailleOutput);
           break;
--- a/accessible/jsat/ContentControl.jsm
+++ b/accessible/jsat/ContentControl.jsm
@@ -319,17 +319,17 @@ this.ContentControl.prototype = {
     return true;
   },
 
   handleMoveByGranularity: function cc_handleMoveByGranularity(aMessage) {
     // XXX: Add sendToChild. Right now this is only used in Android, so no need.
     let direction = aMessage.json.direction;
     let granularity;
 
-    switch(aMessage.json.granularity) {
+    switch (aMessage.json.granularity) {
       case MOVEMENT_GRANULARITY_CHARACTER:
         granularity = Ci.nsIAccessiblePivot.CHAR_BOUNDARY;
         break;
       case MOVEMENT_GRANULARITY_WORD:
         granularity = Ci.nsIAccessiblePivot.WORD_BOUNDARY;
         break;
       default:
         return;
--- a/accessible/jsat/OutputGenerator.jsm
+++ b/accessible/jsat/OutputGenerator.jsm
@@ -209,17 +209,17 @@ var OutputGenerator = {
    * Adds math roles to the output, for a MathML accessible.
    * @param {Array} aOutput Output array.
    * @param {nsIAccessible} aAccessible current accessible object.
    * @param {String} aRoleStr aAccessible's role string.
    */
   _addMathRoles: function _addMathRoles(aOutput, aAccessible, aRoleStr) {
     // First, determine the actual role to use (e.g. mathmlfraction).
     let roleStr = aRoleStr;
-    switch(aAccessible.role) {
+    switch (aAccessible.role) {
       case Roles.MATHML_CELL:
       case Roles.MATHML_ENCLOSED:
       case Roles.MATHML_LABELED_ROW:
       case Roles.MATHML_ROOT:
       case Roles.MATHML_SQUARE_ROOT:
       case Roles.MATHML_TABLE:
       case Roles.MATHML_TABLE_ROW:
         // Use the default role string.
@@ -253,22 +253,22 @@ var OutputGenerator = {
         roleStr = null;
         break;
     }
 
     // Get the math role based on the position in the parent accessible
     // (e.g. numerator for the first child of a mathmlfraction).
     let mathRole = Utils.getMathRole(aAccessible);
     if (mathRole) {
-      aOutput[this.outputOrder === OUTPUT_DESC_FIRST ? 'push' : 'unshift']
-        ({string: this._getOutputName(mathRole)});
+      aOutput[this.outputOrder === OUTPUT_DESC_FIRST ? 'push' : 'unshift']({
+        string: this._getOutputName(mathRole)});
     }
     if (roleStr) {
-      aOutput[this.outputOrder === OUTPUT_DESC_FIRST ? 'push' : 'unshift']
-        ({string: this._getOutputName(roleStr)});
+      aOutput[this.outputOrder === OUTPUT_DESC_FIRST ? 'push' : 'unshift']({
+        string: this._getOutputName(roleStr)});
     }
   },
 
   /**
    * Adds MathML menclose notations to the output.
    * @param {Array} aOutput Output array.
    * @param {nsIAccessible} aAccessible current accessible object.
    */
@@ -679,24 +679,24 @@ this.UtteranceGenerator = {  // jshint i
 
       this._addName(utterance, aAccessible, aFlags);
       this._addLandmark(utterance, aAccessible);
 
       return utterance;
     },
 
     list: function list(aAccessible, aRoleStr, aState, aFlags) {
-      return this._getListUtterance
-        (aAccessible, aRoleStr, aFlags, aAccessible.childCount);
+      return this._getListUtterance(aAccessible, aRoleStr, aFlags,
+        aAccessible.childCount);
     },
 
     definitionlist:
       function definitionlist(aAccessible, aRoleStr, aState, aFlags) {
-        return this._getListUtterance
-          (aAccessible, aRoleStr, aFlags, aAccessible.childCount / 2);
+        return this._getListUtterance(aAccessible, aRoleStr, aFlags,
+          aAccessible.childCount / 2);
       },
 
     application: function application(aAccessible, aRoleStr, aState, aFlags) {
       // Don't utter location of applications, it gets tiring.
       if (aAccessible.name != aAccessible.DOMNode.location) {
         return this.objectOutputFunctions.defaultFunc.apply(this,
           [aAccessible, aRoleStr, aState, aFlags]);
       }
--- a/accessible/jsat/PointerAdapter.jsm
+++ b/accessible/jsat/PointerAdapter.jsm
@@ -34,57 +34,57 @@ var PointerRelay = { // jshint ignore:li
    * value of |false| are cancelled and do not propogate to content.
    */
   get _eventsOfInterest() {
     delete this._eventsOfInterest;
 
     switch (Utils.widgetToolkit) {
       case 'android':
         this._eventsOfInterest = {
-          'touchstart' : true,
-          'touchmove' : true,
-          'touchend' : true };
+          'touchstart': true,
+          'touchmove': true,
+          'touchend': true };
         break;
 
       case 'gonk':
         this._eventsOfInterest = {
-          'touchstart' : true,
-          'touchmove' : true,
-          'touchend' : true,
-          'mousedown' : false,
-          'mousemove' : false,
+          'touchstart': true,
+          'touchmove': true,
+          'touchend': true,
+          'mousedown': false,
+          'mousemove': false,
           'mouseup': false,
           'click': false };
         break;
 
       default:
         // Desktop.
         this._eventsOfInterest = {
-          'mousemove' : true,
-          'mousedown' : true,
+          'mousemove': true,
+          'mousedown': true,
           'mouseup': true,
           'click': false
         };
         if ('ontouchstart' in Utils.win) {
           for (let eventType of ['touchstart', 'touchmove', 'touchend']) {
             this._eventsOfInterest[eventType] = true;
           }
         }
         break;
     }
 
     return this._eventsOfInterest;
   },
 
   _eventMap: {
-    'touchstart' : 'pointerdown',
-    'mousedown' : 'pointerdown',
-    'touchmove' : 'pointermove',
-    'mousemove' : 'pointermove',
-    'touchend' : 'pointerup',
+    'touchstart': 'pointerdown',
+    'mousedown': 'pointerdown',
+    'touchmove': 'pointermove',
+    'mousemove': 'pointermove',
+    'touchend': 'pointerup',
     'mouseup': 'pointerup'
   },
 
   start: function PointerRelay_start(aOnPointerEvent) {
     Logger.debug('PointerRelay.start');
     this.onPointerEvent = aOnPointerEvent;
     for (let eventType in this._eventsOfInterest) {
       Utils.win.addEventListener(eventType, this, true, true);
--- a/accessible/jsat/Utils.jsm
+++ b/accessible/jsat/Utils.jsm
@@ -488,17 +488,17 @@ this.Utils = { // jshint ignore:line
     return parent.role === Roles.LISTITEM && parent.childCount > 1 &&
       aStaticText.indexInParent === 0;
   },
 
   dispatchChromeEvent: function dispatchChromeEvent(aType, aDetails) {
     let details = {
       type: aType,
       details: JSON.stringify(
-        typeof aDetails === 'string' ? { eventType : aDetails } : aDetails)
+        typeof aDetails === 'string' ? { eventType: aDetails } : aDetails)
     };
     let window = this.win;
     let shell = window.shell || window.content.shell;
     if (shell) {
       // On B2G device.
       shell.sendChromeEvent(details);
     } else {
       // Dispatch custom event to have support for desktop and screen reader
@@ -632,17 +632,17 @@ this.Logger = { // jshint ignore:line
   },
 
   accessibleToString: function accessibleToString(aAccessible) {
     if (!aAccessible) {
       return '[ null ]';
     }
 
     try {
-      return'[ ' + Utils.AccService.getStringRole(aAccessible.role) +
+      return '[ ' + Utils.AccService.getStringRole(aAccessible.role) +
         ' | ' + aAccessible.name + ' ]';
     } catch (x) {
       return '[ defunct ]';
     }
   },
 
   eventToString: function eventToString(aEvent) {
     let str = Utils.AccService.getStringEventType(aEvent.eventType);
@@ -1063,11 +1063,11 @@ PrefCache.prototype = {
       try {
         this.callback(this.name, this.value, false);
       } catch (x) {
         Logger.logException(x);
       }
     }
   },
 
-  QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver,
+  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                           Ci.nsISupportsWeakReference])
 };
--- a/accessible/tests/mochitest/attributes.js
+++ b/accessible/tests/mochitest/attributes.js
@@ -91,17 +91,17 @@ function testGroupAttrs(aAccOrElmOrID, a
     };
     testAttrs(aAccOrElmOrID, attrs, true);
   }
 
   if (aLevel) {
     is(levelObj.value, aLevel,
        "Wrong group level for " + prettyName(aAccOrElmOrID));
 
-    var attrs = { "level" : String(aLevel) };
+    var attrs = { "level": String(aLevel) };
     testAttrs(aAccOrElmOrID, attrs, true);
   }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // Text attributes.
 
 /**
@@ -154,17 +154,17 @@ function testTextAttrs(aID, aOffset, aAt
 
   for (var name in aDefAttrs) {
     if (!(name in expectedAttrs))
       expectedAttrs[name] = aDefAttrs[name];
   }
 
   attrs = getTextAttributes(aID, accessible, true, aOffset,
                             startOffset, endOffset);
-  
+
   if (!attrs)
     return;
 
   compareAttrs(errorMsg, attrs, expectedAttrs, aSkipUnexpectedAttrs);
 }
 
 /**
  * Test default text attributes.
@@ -176,28 +176,28 @@ function testTextAttrs(aID, aOffset, aAt
  * @param aSkipUnexpectedAttrs  [in] points the function doesn't fail if
  *                              unexpected attribute is encountered
  */
 function testDefaultTextAttrs(aID, aDefAttrs, aSkipUnexpectedAttrs)
 {
   var accessible = getAccessible(aID, [nsIAccessibleText]);
   if (!accessible)
     return;
-  
+
   var defAttrs = null;
-  try{
+  try {
     defAttrs = accessible.defaultTextAttributes;
   } catch (e) {
   }
-  
+
   if (!defAttrs) {
     ok(false, "Can't get default text attributes for " + aID);
     return;
   }
-  
+
   var errorMsg = ". Getting default text attributes for " + aID;
   compareAttrs(errorMsg, defAttrs, aDefAttrs, aSkipUnexpectedAttrs);
 }
 
 /**
  * Test text attributes for wrong offset.
  */
 function testTextAttrsWrongOffset(aID, aOffset)
@@ -313,22 +313,22 @@ function testAttrsInternal(aAccOrElmOrID
   var accessible = getAccessible(aAccOrElmOrID);
   if (!accessible)
     return;
 
   var attrs = null;
   try {
     attrs = accessible.attributes;
   } catch (e) { }
-  
+
   if (!attrs) {
     ok(false, "Can't get object attributes for " + prettyName(aAccOrElmOrID));
     return;
   }
-  
+
   var errorMsg = " for " + prettyName(aAccOrElmOrID);
   compareAttrs(errorMsg, attrs, aAttrs, aSkipUnexpectedAttrs, aAbsentAttrs);
 }
 
 function compareAttrs(aErrorMsg, aAttrs, aExpectedAttrs, aSkipUnexpectedAttrs,
                       aAbsentAttrs)
 {
   // Check if all obtained attributes are expected and have expected value.
@@ -351,17 +351,17 @@ function compareAttrs(aErrorMsg, aAttrs,
     }
   }
 
   // Check if all expected attributes are presented.
   for (var name in aExpectedAttrs) {
     var value = "";
     try {
       value = aAttrs.getStringProperty(name);
-    } catch(e) { }
+    } catch (e) { }
 
     if (!value)
       ok(false,
          "There is no expected attribute '" + name + "' " + aErrorMsg);
   }
 
   // Check if all unexpected attributes are absent.
   if (aAbsentAttrs) {
--- a/accessible/tests/mochitest/attributes/test_dpub_aria_xml-roles.html
+++ b/accessible/tests/mochitest/attributes/test_dpub_aria_xml-roles.html
@@ -57,17 +57,17 @@
         'doc-prologue',
         'doc-pullquote',
         'doc-qna',
         'doc-subtitle',
         'doc-tip',
         'doc-toc'
       ];
       for (let attr of dpub_attrs) {
-        testAttrs(attr, {"xml-roles" : attr}, true);
+        testAttrs(attr, {"xml-roles": attr}, true);
       }
       SimpleTest.finish();
     }
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
 <body>
--- a/accessible/tests/mochitest/attributes/test_obj.html
+++ b/accessible/tests/mochitest/attributes/test_obj.html
@@ -17,115 +17,115 @@ https://bugzilla.mozilla.org/show_bug.cg
           src="../common.js"></script>
   <script type="application/javascript"
           src="../attributes.js"></script>
 
   <script type="application/javascript">
     function doTest()
     {
       // aria
-      testAttrs("atomic", {"atomic" : "true", "container-atomic" : "true"}, true);
-      testAttrs(getNode("atomic").firstChild, {"container-atomic" : "true"}, true);
-      testAbsentAttrs("atomic_false", {"atomic" : "false", "container-atomic" : "false"});
-      testAbsentAttrs(getNode("atomic_false").firstChild, {"container-atomic" : "false"});
+      testAttrs("atomic", {"atomic": "true", "container-atomic": "true"}, true);
+      testAttrs(getNode("atomic").firstChild, {"container-atomic": "true"}, true);
+      testAbsentAttrs("atomic_false", {"atomic": "false", "container-atomic": "false"});
+      testAbsentAttrs(getNode("atomic_false").firstChild, {"container-atomic": "false"});
 
-      testAttrs("autocomplete", {"autocomplete" : "true"}, true);
-      testAttrs("checkbox", {"checkable" : "true"}, true);
-      testAttrs("checkedCheckbox", {"checkable" : "true"}, true);
-      testAbsentAttrs("checkedMenuitem", {"checkable" : "true"}, true);
-      testAttrs("checkedMenuitemCheckbox", {"checkable" : "true"}, true);
-      testAttrs("checkedMenuitemRadio", {"checkable" : "true"}, true);
-      testAttrs("checkedOption", {"checkable" : "true"}, true);
-      testAttrs("checkedRadio", {"checkable" : "true"}, true);
-      testAttrs("checkedTreeitem", {"checkable" : "true"}, true);
-      testAttrs("dropeffect", {"dropeffect" : "copy"}, true);
-      testAttrs("grabbed", {"grabbed" : "true"}, true);
+      testAttrs("autocomplete", {"autocomplete": "true"}, true);
+      testAttrs("checkbox", {"checkable": "true"}, true);
+      testAttrs("checkedCheckbox", {"checkable": "true"}, true);
+      testAbsentAttrs("checkedMenuitem", {"checkable": "true"}, true);
+      testAttrs("checkedMenuitemCheckbox", {"checkable": "true"}, true);
+      testAttrs("checkedMenuitemRadio", {"checkable": "true"}, true);
+      testAttrs("checkedOption", {"checkable": "true"}, true);
+      testAttrs("checkedRadio", {"checkable": "true"}, true);
+      testAttrs("checkedTreeitem", {"checkable": "true"}, true);
+      testAttrs("dropeffect", {"dropeffect": "copy"}, true);
+      testAttrs("grabbed", {"grabbed": "true"}, true);
       testAttrs("haspopupTrue", { "haspopup": "true" }, true);
       testAbsentAttrs("haspopupFalse", { "haspopup": "false" });
       testAbsentAttrs("haspopupEmpty", { "haspopup": "" });
-      testAttrs("hidden", {"hidden" : "true"}, true);
+      testAttrs("hidden", {"hidden": "true"}, true);
       testAbsentAttrs("hidden_false", { "hidden": "false" });
-      testAbsentAttrs("modal", {"modal" : "true"});
-      testAttrs("sortAscending", {"sort" : "ascending"}, true);
-      testAttrs("sortDescending", {"sort" : "descending"}, true);
-      testAttrs("sortNone", {"sort" : "none"}, true);
-      testAttrs("sortOther", {"sort" : "other"}, true);
-      testAttrs("roledescr", {"roledescription" : "spreadshit"}, true);
-      testAttrs("currentPage", {"current" : "page"}, true);
+      testAbsentAttrs("modal", {"modal": "true"});
+      testAttrs("sortAscending", {"sort": "ascending"}, true);
+      testAttrs("sortDescending", {"sort": "descending"}, true);
+      testAttrs("sortNone", {"sort": "none"}, true);
+      testAttrs("sortOther", {"sort": "other"}, true);
+      testAttrs("roledescr", {"roledescription": "spreadshit"}, true);
+      testAttrs("currentPage", {"current": "page"}, true);
 
       // inherited attributes by subdocuments
       var subdoc = getAccessible("iframe").firstChild;
-      testAttrs(subdoc, {"busy" : "true"}, true);
+      testAttrs(subdoc, {"busy": "true"}, true);
 
       // live object attribute
 
       // HTML
-      testAttrs("output", {"live" : "polite"}, true);
+      testAttrs("output", {"live": "polite"}, true);
 
       // ARIA
-      testAttrs("live", {"live" : "polite"}, true);
-      testAttrs("live2", {"live" : "polite"}, true);
-      testAbsentAttrs("live3", {"live" : ""});
-      testAttrs("log", {"live" : "polite"}, true);
-      testAttrs("logAssertive", {"live" : "assertive"}, true);
-      testAttrs("marquee", {"live" : "off"}, true);
-      testAttrs("status", {"live" : "polite"}, true);
-      testAttrs("timer", {"live" : "off"}, true);
-      testAbsentAttrs("tablist", {"live" : "polite"});
+      testAttrs("live", {"live": "polite"}, true);
+      testAttrs("live2", {"live": "polite"}, true);
+      testAbsentAttrs("live3", {"live": ""});
+      testAttrs("log", {"live": "polite"}, true);
+      testAttrs("logAssertive", {"live": "assertive"}, true);
+      testAttrs("marquee", {"live": "off"}, true);
+      testAttrs("status", {"live": "polite"}, true);
+      testAttrs("timer", {"live": "off"}, true);
+      testAbsentAttrs("tablist", {"live": "polite"});
 
       // container-live object attribute
-      testAttrs("liveChild", {"container-live" : "polite"}, true);
-      testAttrs("live2Child", {"container-live" : "polite"}, true);
-      testAttrs("logChild", {"container-live" : "polite"}, true);
-      testAttrs("logAssertiveChild", {"container-live" : "assertive"}, true);
-      testAttrs("marqueeChild", {"container-live" : "off"}, true);
-      testAttrs("statusChild", {"container-live" : "polite"}, true);
-      testAttrs("timerChild", {"container-live" : "off"}, true);
-      testAbsentAttrs("tablistChild", {"container-live" : "polite"});
+      testAttrs("liveChild", {"container-live": "polite"}, true);
+      testAttrs("live2Child", {"container-live": "polite"}, true);
+      testAttrs("logChild", {"container-live": "polite"}, true);
+      testAttrs("logAssertiveChild", {"container-live": "assertive"}, true);
+      testAttrs("marqueeChild", {"container-live": "off"}, true);
+      testAttrs("statusChild", {"container-live": "polite"}, true);
+      testAttrs("timerChild", {"container-live": "off"}, true);
+      testAbsentAttrs("tablistChild", {"container-live": "polite"});
 
       // container-live-role object attribute
-      testAttrs("log", {"container-live-role" : "log"}, true);
-      testAttrs("logAssertive", {"container-live-role" : "log"}, true);
-      testAttrs("marquee", {"container-live-role" : "marquee"}, true);
-      testAttrs("status", {"container-live-role" : "status"}, true);
-      testAttrs("timer", {"container-live-role" : "timer"}, true);
-      testAttrs("logChild", {"container-live-role" : "log"}, true);
-      testAttrs("logAssertive", {"container-live-role" : "log"}, true);
-      testAttrs("logAssertiveChild", {"container-live-role" : "log"}, true);
-      testAttrs("marqueeChild", {"container-live-role" : "marquee"}, true);
-      testAttrs("statusChild", {"container-live-role" : "status"}, true);
-      testAttrs("timerChild", {"container-live-role" : "timer"}, true);
-      testAbsentAttrs("tablistChild", {"container-live-role" : "tablist"});
+      testAttrs("log", {"container-live-role": "log"}, true);
+      testAttrs("logAssertive", {"container-live-role": "log"}, true);
+      testAttrs("marquee", {"container-live-role": "marquee"}, true);
+      testAttrs("status", {"container-live-role": "status"}, true);
+      testAttrs("timer", {"container-live-role": "timer"}, true);
+      testAttrs("logChild", {"container-live-role": "log"}, true);
+      testAttrs("logAssertive", {"container-live-role": "log"}, true);
+      testAttrs("logAssertiveChild", {"container-live-role": "log"}, true);
+      testAttrs("marqueeChild", {"container-live-role": "marquee"}, true);
+      testAttrs("statusChild", {"container-live-role": "status"}, true);
+      testAttrs("timerChild", {"container-live-role": "timer"}, true);
+      testAbsentAttrs("tablistChild", {"container-live-role": "tablist"});
 
       // absent aria-label and aria-labelledby object attribute
-      testAbsentAttrs("label", {"label" : "foo"});
-      testAbsentAttrs("labelledby", {"labelledby" : "label"});
+      testAbsentAttrs("label", {"label": "foo"});
+      testAbsentAttrs("labelledby", {"labelledby": "label"});
 
       // container that has no default live attribute
-      testAttrs("liveGroup", {"live" : "polite"}, true);
-      testAttrs("liveGroupChild", {"container-live" : "polite"}, true);
-      testAttrs("liveGroup", {"container-live-role" : "group"}, true);
-      testAttrs("liveGroupChild", {"container-live-role" : "group"}, true);
+      testAttrs("liveGroup", {"live": "polite"}, true);
+      testAttrs("liveGroupChild", {"container-live": "polite"}, true);
+      testAttrs("liveGroup", {"container-live-role": "group"}, true);
+      testAttrs("liveGroupChild", {"container-live-role": "group"}, true);
 
       // text input type
       testAbsentAttrs("button", { "text-input-type": "button"});
       testAbsentAttrs("checkbox", { "text-input-type": "checkbox"});
       testAbsentAttrs("radio", { "text-input-type": "radio"});
-      testAttrs("email", {"text-input-type" : "email"}, true);
-      testAttrs("search", {"text-input-type" : "search"}, true);
-      testAttrs("tel", {"text-input-type" : "tel"}, true);
-      testAttrs("url", {"text-input-type" : "url"}, true);
+      testAttrs("email", {"text-input-type": "email"}, true);
+      testAttrs("search", {"text-input-type": "search"}, true);
+      testAttrs("tel", {"text-input-type": "tel"}, true);
+      testAttrs("url", {"text-input-type": "url"}, true);
 
       // ARIA
-      testAttrs("searchbox", {"text-input-type" : "search"}, true);
+      testAttrs("searchbox", {"text-input-type": "search"}, true);
 
       // html
-      testAttrs("radio", {"checkable" : "true"}, true); 
-      testAttrs("checkbox", {"checkable" : "true"}, true); 
-      testAttrs("draggable", {"draggable" : "true"}, true);
+      testAttrs("radio", {"checkable": "true"}, true);
+      testAttrs("checkbox", {"checkable": "true"}, true);
+      testAttrs("draggable", {"draggable": "true"}, true);
       testAttrs("th1", { "abbr": "SS#" }, true);
       testAttrs("th2", { "abbr": "SS#" }, true);
       testAttrs("th2", { "axis": "social" }, true);
 
       // don't barf on an empty abbr element.
       testAbsentAttrs("th3", { "abbr": "" }, true);
 
       // application accessible
@@ -137,17 +137,17 @@ https://bugzilla.mozilla.org/show_bug.cg
         }
         testAttrs(getApplicationAccessible(), attrs, false);
       }
 
       // no object attributes
       testAbsentAttrs(getAccessible("listitem").firstChild, { "tag": "" });
 
       // experimental aria
-      testAttrs("experimental", {"blah" : "true"}, true);
+      testAttrs("experimental", {"blah": "true"}, true);
 
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
--- a/accessible/tests/mochitest/attributes/test_obj_group.html
+++ b/accessible/tests/mochitest/attributes/test_obj_group.html
@@ -144,36 +144,36 @@
       testGroupAttrs("tree3_ti1b", 2, 2, 2);
       testGroupAttrs("tree3_ti2", 2, 2, 1);
       testGroupAttrs("tree3_ti2a", 1, 2, 2);
       testGroupAttrs("tree3_ti2b", 2, 2, 2);
 
       //////////////////////////////////////////////////////////////////////////
       // ARIA grid
       testGroupAttrs("grid_row1", 1, 2);
-      testAbsentAttrs("grid_cell1", {"posinset":"", "setsize":""});
-      testAbsentAttrs("grid_cell2", {"posinset":"", "setsize":""});
+      testAbsentAttrs("grid_cell1", {"posinset": "", "setsize": ""});
+      testAbsentAttrs("grid_cell2", {"posinset": "", "setsize": ""});
 
       testGroupAttrs("grid_row2", 2, 2);
-      testAbsentAttrs("grid_cell3", {"posinset":"", "setsize":""});
-      testAbsentAttrs("grid_cell4", {"posinset":"", "setsize":""});
+      testAbsentAttrs("grid_cell3", {"posinset": "", "setsize": ""});
+      testAbsentAttrs("grid_cell4", {"posinset": "", "setsize": ""});
 
       //////////////////////////////////////////////////////////////////////////
       // ARIA treegrid
       testGroupAttrs("treegrid_row1", 1, 2, 1);
-      testAbsentAttrs("treegrid_cell1", {"posinset":"", "setsize":""});
-      testAbsentAttrs("treegrid_cell2", {"posinset":"", "setsize":""});
+      testAbsentAttrs("treegrid_cell1", {"posinset": "", "setsize": ""});
+      testAbsentAttrs("treegrid_cell2", {"posinset": "", "setsize": ""});
 
       testGroupAttrs("treegrid_row2", 1, 1, 2);
-      testAbsentAttrs("treegrid_cell3", {"posinset":"", "setsize":""});
-      testAbsentAttrs("treegrid_cell4", {"posinset":"", "setsize":""});
+      testAbsentAttrs("treegrid_cell3", {"posinset": "", "setsize": ""});
+      testAbsentAttrs("treegrid_cell4", {"posinset": "", "setsize": ""});
 
       testGroupAttrs("treegrid_row3", 2, 2, 1);
-      testAbsentAttrs("treegrid_cell5", {"posinset":"", "setsize":""});
-      testAbsentAttrs("treegrid_cell6", {"posinset":"", "setsize":""});
+      testAbsentAttrs("treegrid_cell5", {"posinset": "", "setsize": ""});
+      testAbsentAttrs("treegrid_cell6", {"posinset": "", "setsize": ""});
 
       //////////////////////////////////////////////////////////////////////////
       // HTML headings
       testGroupAttrs("h1", 0, 0, 1);
       testGroupAttrs("h2", 0, 0, 2);
       testGroupAttrs("h3", 0, 0, 3);
       testGroupAttrs("h4", 0, 0, 4);
       testGroupAttrs("h5", 0, 0, 5);
--- a/accessible/tests/mochitest/attributes/test_tag.html
+++ b/accessible/tests/mochitest/attributes/test_tag.html
@@ -15,24 +15,24 @@
   <script type="application/javascript"
           src="../attributes.js"></script>
 
   <script type="application/javascript">
 
     function doTest()
     {
       // And some AT may look for this
-      testAttrs("nav", {"tag" : "nav"}, true);
-      testAttrs("header", {"tag" : "header"}, true);
-      testAttrs("footer", {"tag" : "footer"}, true);
-      testAttrs("article", {"tag" : "article"}, true);
-      testAttrs("aside", {"tag" : "aside"}, true);
-      testAttrs("section", {"tag" : "section"}, true);
-      testAttrs("main", {"tag" : "article"}, true);
-      testAttrs("form", {"tag" : "article"}, true);
+      testAttrs("nav", {"tag": "nav"}, true);
+      testAttrs("header", {"tag": "header"}, true);
+      testAttrs("footer", {"tag": "footer"}, true);
+      testAttrs("article", {"tag": "article"}, true);
+      testAttrs("aside", {"tag": "aside"}, true);
+      testAttrs("section", {"tag": "section"}, true);
+      testAttrs("main", {"tag": "article"}, true);
+      testAttrs("form", {"tag": "article"}, true);
 
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
--- a/accessible/tests/mochitest/attributes/test_xml-roles.html
+++ b/accessible/tests/mochitest/attributes/test_xml-roles.html
@@ -15,86 +15,86 @@
   <script type="application/javascript"
           src="../attributes.js"></script>
 
   <script type="application/javascript">
 
     function doTest()
     {
       // Some AT may look for this
-      testAttrs("nav", {"xml-roles" : "navigation"}, true);
-      testAttrs("header", {"xml-roles" : "banner"}, true);
-      testAbsentAttrs("article_header", {"xml-roles" : "banner"});
-      testAbsentAttrs("section_header", {"xml-roles" : "banner"});
-      testAttrs("footer", {"xml-roles" : "contentinfo"}, true);
-      testAbsentAttrs("article_footer", {"xml-roles" : "contentinfo"});
-      testAbsentAttrs("section_footer", {"xml-roles" : "contentinfo"});
-      testAttrs("aside", {"xml-roles" : "complementary"}, true);
-      testAttrs("section", {"xml-roles" : "region"}, true);
-      testAttrs("main", {"xml-roles" : "main"}, true); // // ARIA override
-      testAttrs("form", {"xml-roles" : "form"}, true);
-      testAttrs("feed", {"xml-roles" : "feed"}, true);
-      testAttrs("article", {"xml-roles" : "article"}, true);
-      testAttrs("main_element", {"xml-roles" : "main"}, true);
+      testAttrs("nav", {"xml-roles": "navigation"}, true);
+      testAttrs("header", {"xml-roles": "banner"}, true);
+      testAbsentAttrs("article_header", {"xml-roles": "banner"});
+      testAbsentAttrs("section_header", {"xml-roles": "banner"});
+      testAttrs("footer", {"xml-roles": "contentinfo"}, true);
+      testAbsentAttrs("article_footer", {"xml-roles": "contentinfo"});
+      testAbsentAttrs("section_footer", {"xml-roles": "contentinfo"});
+      testAttrs("aside", {"xml-roles": "complementary"}, true);
+      testAttrs("section", {"xml-roles": "region"}, true);
+      testAttrs("main", {"xml-roles": "main"}, true); // // ARIA override
+      testAttrs("form", {"xml-roles": "form"}, true);
+      testAttrs("feed", {"xml-roles": "feed"}, true);
+      testAttrs("article", {"xml-roles": "article"}, true);
+      testAttrs("main_element", {"xml-roles": "main"}, true);
 
-      testAttrs("search", {"xml-roles" : "searchbox"}, true);
+      testAttrs("search", {"xml-roles": "searchbox"}, true);
 
-      testAttrs("open-1", {"xml-roles" : "open-fence"}, true);
-      testAttrs("open-2", {"xml-roles" : "open-fence"}, true);
-      testAttrs("open-3", {"xml-roles" : "open-fence"}, true);
-      testAttrs("open-4", {"xml-roles" : "open-fence"}, true);
-      testAttrs("open-5", {"xml-roles" : "open-fence"}, true);
-      testAttrs("open-6", {"xml-roles" : "open-fence"}, true);
-      testAttrs("open-7", {"xml-roles" : "open-fence"}, true);
+      testAttrs("open-1", {"xml-roles": "open-fence"}, true);
+      testAttrs("open-2", {"xml-roles": "open-fence"}, true);
+      testAttrs("open-3", {"xml-roles": "open-fence"}, true);
+      testAttrs("open-4", {"xml-roles": "open-fence"}, true);
+      testAttrs("open-5", {"xml-roles": "open-fence"}, true);
+      testAttrs("open-6", {"xml-roles": "open-fence"}, true);
+      testAttrs("open-7", {"xml-roles": "open-fence"}, true);
 
-      testAttrs("sep-1", {"xml-roles" : "separator"}, true);
-      testAttrs("sep-2", {"xml-roles" : "separator"}, true);
-      testAttrs("sep-3", {"xml-roles" : "separator"}, true);
-      testAttrs("sep-4", {"xml-roles" : "separator"}, true);
-      testAttrs("sep-5", {"xml-roles" : "separator"}, true);
-      testAttrs("sep-6", {"xml-roles" : "separator"}, true);
-      testAttrs("sep-7", {"xml-roles" : "separator"}, true);
+      testAttrs("sep-1", {"xml-roles": "separator"}, true);
+      testAttrs("sep-2", {"xml-roles": "separator"}, true);
+      testAttrs("sep-3", {"xml-roles": "separator"}, true);
+      testAttrs("sep-4", {"xml-roles": "separator"}, true);
+      testAttrs("sep-5", {"xml-roles": "separator"}, true);
+      testAttrs("sep-6", {"xml-roles": "separator"}, true);
+      testAttrs("sep-7", {"xml-roles": "separator"}, true);
 
-      testAttrs("close-1", {"xml-roles" : "close-fence"}, true);
-      testAttrs("close-2", {"xml-roles" : "close-fence"}, true);
-      testAttrs("close-3", {"xml-roles" : "close-fence"}, true);
-      testAttrs("close-4", {"xml-roles" : "close-fence"}, true);
-      testAttrs("close-5", {"xml-roles" : "close-fence"}, true);
-      testAttrs("close-6", {"xml-roles" : "close-fence"}, true);
-      testAttrs("close-7", {"xml-roles" : "close-fence"}, true);
+      testAttrs("close-1", {"xml-roles": "close-fence"}, true);
+      testAttrs("close-2", {"xml-roles": "close-fence"}, true);
+      testAttrs("close-3", {"xml-roles": "close-fence"}, true);
+      testAttrs("close-4", {"xml-roles": "close-fence"}, true);
+      testAttrs("close-5", {"xml-roles": "close-fence"}, true);
+      testAttrs("close-6", {"xml-roles": "close-fence"}, true);
+      testAttrs("close-7", {"xml-roles": "close-fence"}, true);
 
-      testAttrs("num", {"xml-roles" : "numerator"}, true);
-      testAttrs("den", {"xml-roles" : "denominator"}, true);
+      testAttrs("num", {"xml-roles": "numerator"}, true);
+      testAttrs("den", {"xml-roles": "denominator"}, true);
 
-      testAttrs("sub-1", {"xml-roles" : "subscript"}, true);
-      testAttrs("sub-2", {"xml-roles" : "subscript"}, true);
-      testAttrs("sub-3", {"xml-roles" : "subscript"}, true);
-      testAttrs("sup-1", {"xml-roles" : "superscript"}, true);
-      testAttrs("sup-2", {"xml-roles" : "superscript"}, true);
-      testAttrs("sup-3", {"xml-roles" : "superscript"}, true);
-      testAttrs("sup-4", {"xml-roles" : "superscript"}, true);
-      testAttrs("presub-1", {"xml-roles" : "presubscript"}, true);
-      testAttrs("presub-2", {"xml-roles" : "presubscript"}, true);
-      testAttrs("presup-1", {"xml-roles" : "presuperscript"}, true);
+      testAttrs("sub-1", {"xml-roles": "subscript"}, true);
+      testAttrs("sub-2", {"xml-roles": "subscript"}, true);
+      testAttrs("sub-3", {"xml-roles": "subscript"}, true);
+      testAttrs("sup-1", {"xml-roles": "superscript"}, true);
+      testAttrs("sup-2", {"xml-roles": "superscript"}, true);
+      testAttrs("sup-3", {"xml-roles": "superscript"}, true);
+      testAttrs("sup-4", {"xml-roles": "superscript"}, true);
+      testAttrs("presub-1", {"xml-roles": "presubscript"}, true);
+      testAttrs("presub-2", {"xml-roles": "presubscript"}, true);
+      testAttrs("presup-1", {"xml-roles": "presuperscript"}, true);
 
-      testAttrs("under-1", {"xml-roles" : "underscript"}, true);
-      testAttrs("under-2", {"xml-roles" : "underscript"}, true);
-      testAttrs("over-1", {"xml-roles" : "overscript"}, true);
-      testAttrs("over-2", {"xml-roles" : "overscript"}, true);
+      testAttrs("under-1", {"xml-roles": "underscript"}, true);
+      testAttrs("under-2", {"xml-roles": "underscript"}, true);
+      testAttrs("over-1", {"xml-roles": "overscript"}, true);
+      testAttrs("over-2", {"xml-roles": "overscript"}, true);
 
-      testAttrs("root-index-1", {"xml-roles" : "root-index"}, true);
+      testAttrs("root-index-1", {"xml-roles": "root-index"}, true);
 
-      testAttrs("base-1", {"xml-roles" : "base"}, true);
-      testAttrs("base-2", {"xml-roles" : "base"}, true);
-      testAttrs("base-3", {"xml-roles" : "base"}, true);
-      testAttrs("base-4", {"xml-roles" : "base"}, true);
-      testAttrs("base-5", {"xml-roles" : "base"}, true);
-      testAttrs("base-6", {"xml-roles" : "base"}, true);
-      testAttrs("base-7", {"xml-roles" : "base"}, true);
-      testAttrs("base-8", {"xml-roles" : "base"}, true);
+      testAttrs("base-1", {"xml-roles": "base"}, true);
+      testAttrs("base-2", {"xml-roles": "base"}, true);
+      testAttrs("base-3", {"xml-roles": "base"}, true);
+      testAttrs("base-4", {"xml-roles": "base"}, true);
+      testAttrs("base-5", {"xml-roles": "base"}, true);
+      testAttrs("base-6", {"xml-roles": "base"}, true);
+      testAttrs("base-7", {"xml-roles": "base"}, true);
+      testAttrs("base-8", {"xml-roles": "base"}, true);
 
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
--- a/accessible/tests/mochitest/common.js
+++ b/accessible/tests/mochitest/common.js
@@ -248,17 +248,17 @@ const DONOTFAIL_IF_NO_INTERFACE = 2;
 function getAccessible(aAccOrElmOrID, aInterfaces, aElmObj, aDoNotFailIf)
 {
   if (!aAccOrElmOrID)
     return null;
 
   var elm = null;
 
   if (aAccOrElmOrID instanceof nsIAccessible) {
-    try { elm = aAccOrElmOrID.DOMNode; } catch(e) { }
+    try { elm = aAccOrElmOrID.DOMNode; } catch (e) { }
 
   } else if (aAccOrElmOrID instanceof nsIDOMNode) {
     elm = aAccOrElmOrID;
 
   } else {
     elm = document.getElementById(aAccOrElmOrID);
     if (!elm) {
       ok(false, "Can't get DOM element for " + aAccOrElmOrID);
@@ -545,17 +545,17 @@ function testAccessibleTree(aAccOrElmOrI
 
         // nsIAccessible::parent
         var parent = null;
         try { parent = child.parent; } catch (e) {}
         is(parent, acc, "Wrong parent of " + prettyName(child));
 
         // nsIAccessible::indexInParent
         var indexInParent = -1;
-        try { indexInParent = child.indexInParent; } catch(e) {}
+        try { indexInParent = child.indexInParent; } catch (e) {}
         is(indexInParent, i,
            "Wrong index in parent of " + prettyName(child));
 
         // nsIAccessible::nextSibling
         var expectedNextSibling = (i < childCount - 1) ?
           children.queryElementAt(i + 1, nsIAccessible) : null;
         var nextSibling = null;
         try { nextSibling = child.nextSibling; } catch (e) {}
--- a/accessible/tests/mochitest/elm/test_HTMLSpec.html
+++ b/accessible/tests/mochitest/elm/test_HTMLSpec.html
@@ -301,18 +301,18 @@
         ]
       };
       testElm("code_container", obj);
 
       //////////////////////////////////////////////////////////////////////////
       // HTML:col and HTML:colgroup under table
 
       obj =
-        { TABLE : [
-          { ROW :[
+        { TABLE: [
+          { ROW: [
             { role: ROLE_CELL },
             { role: ROLE_CELL },
             { role: ROLE_CELL }
           ] }
         ] };
       testElm("colNcolgroup_table", obj);
 
       //////////////////////////////////////////////////////////////////////////
@@ -854,17 +854,17 @@
       //////////////////////////////////////////////////////////////////////////
       // HTML:keygen
 
       obj = {
         role: ROLE_COMBOBOX,
         states: STATE_COLLAPSED | STATE_HASPOPUP,
         extraStates: EXT_STATE_EXPANDABLE,
         actions: "open",
-        children: [ 
+        children: [
           { COMBOBOX_LIST: [
             { role: ROLE_COMBOBOX_OPTION }, // high grade
             { role: ROLE_COMBOBOX_OPTION } // medium grade
           ] }
         ]
       };
       testElm("keygen", obj);
 
@@ -1267,17 +1267,17 @@
 
       //////////////////////////////////////////////////////////////////////////
       // HTML:u contained by paragraph
 
       obj = {
         role: ROLE_PARAGRAPH,
         textAttrs: {
           0: { },
-          6: { "text-underline-style" : "solid" }
+          6: { "text-underline-style": "solid" }
         },
         children: [
           { role: ROLE_TEXT_LEAF }, // plain text
           { role: ROLE_TEXT_LEAF } // HTML:u text
         ]
       };
       testElm("u_container", obj);
 
--- a/accessible/tests/mochitest/elm/test_figure.html
+++ b/accessible/tests/mochitest/elm/test_figure.html
@@ -28,17 +28,17 @@
 
       todo(false, "figure name gets extra whitespace in the end!");
       testName("figure", "figure caption ");
       testName("figcaption", null);
 
       testRelation("figure", RELATION_LABELLED_BY, "figcaption");
       testRelation("figcaption", RELATION_LABEL_FOR, "figure");
 
-      testAttrs("figure", {"xml-roles" : "figure"}, true);
+      testAttrs("figure", {"xml-roles": "figure"}, true);
 
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 </head>
--- a/accessible/tests/mochitest/elm/test_nsApplicationAcc.html
+++ b/accessible/tests/mochitest/elm/test_nsApplicationAcc.html
@@ -32,23 +32,23 @@
 
       // nsIAccessible::name
       var applicationName = "";
       if (LINUX || SOLARIS) {
         applicationName = appInfo.name;
       } else {
         try {
           applicationName = brandBundle.GetStringFromName("brandShortName");
-        } catch(e) {
+        } catch (e) {
         }
 
         if (applicationName == "")
           applicationName = "Gecko based application";
       }
-      is (accessible.name, applicationName, "wrong application accessible name");
+      is(accessible.name, applicationName, "wrong application accessible name");
 
       // nsIAccessibleApplication
       is(accessible.appName, appInfo.name, "Wrong application name");
       is(accessible.appVersion, appInfo.version, "Wrong application version");
       is(accessible.platformName, "Gecko", "Wrong platform name");
       is(accessible.platformVersion, appInfo.platformVersion,
          "Wrong platform version");
 
--- a/accessible/tests/mochitest/events/test_aria_objattr.html
+++ b/accessible/tests/mochitest/events/test_aria_objattr.html
@@ -45,18 +45,18 @@
     function updateARIAHidden(aID, aIsDefined, aChildId)
     {
       this.__proto__ = new updateAttribute(aID, "aria-hidden",
                                            aIsDefined ? "true" : "false");
 
       this.finalCheck = function updateARIAHidden()
       {
         if (aIsDefined) {
-          testAttrs(aID, {"hidden" : "true"}, true);
-          testAttrs(aChildId, {"hidden" : "true"}, true);
+          testAttrs(aID, {"hidden": "true"}, true);
+          testAttrs(aChildId, {"hidden": "true"}, true);
         } else {
           testAbsentAttrs(aID, { "hidden": "true"});
           testAbsentAttrs(aChildId, { "hidden": "true"});
         }
       }
     }
 
     // Debug stuff.
--- a/accessible/tests/mochitest/events/test_dragndrop.html
+++ b/accessible/tests/mochitest/events/test_dragndrop.html
@@ -31,17 +31,17 @@
 
       this.invoke = function changeGrabbed_invoke() {
         if (aGrabValue != undefined) {
           this.DOMNode.setAttribute("aria-grabbed", aGrabValue);
         }
       }
 
       this.check = function changeGrabbed_check() {
-        testAttrs(aNodeOrID, {"grabbed" : aGrabValue}, true);
+        testAttrs(aNodeOrID, {"grabbed": aGrabValue}, true);
       }
 
       this.getID = function changeGrabbed_getID() {
         return prettyName(aNodeOrID) + " aria-grabbed changed";
       }
     }
 
     // aria dropeffect invoker
@@ -51,17 +51,17 @@
 
       this.invoke = function changeDropeffect_invoke() {
         if (aDropeffectValue != undefined) {
           this.DOMNode.setAttribute("aria-dropeffect", aDropeffectValue);
         }
       }
 
       this.check = function changeDropeffect_check() {
-        testAttrs(aNodeOrID, {"dropeffect" : aDropeffectValue}, true);
+        testAttrs(aNodeOrID, {"dropeffect": aDropeffectValue}, true);
       }
 
       this.getID = function changeDropeffect_getID() {
         return prettyName(aNodeOrID) + " aria-dropeffect changed";
       }
     }
 
     function doTests()
--- a/accessible/tests/mochitest/events/test_textselchange.html
+++ b/accessible/tests/mochitest/events/test_textselchange.html
@@ -22,17 +22,17 @@
     var gQueue = null;
 
     // gA11yEventDumpID = "eventdump"; // debug stuff
     //gA11yEventDumpToConsole = true;
 
     function getOnclickSeq(aID)
     {
       return [
-        new caretMoveChecker(0, aID), 
+        new caretMoveChecker(0, aID),
         new unexpectedInvokerChecker(EVENT_TEXT_SELECTION_CHANGED, aID)
       ];
     }
 
     function doTests()
     {
       // test caret move events and caret offsets
       gQueue = new eventQueue();
--- a/accessible/tests/mochitest/events/test_valuechange.html
+++ b/accessible/tests/mochitest/events/test_valuechange.html
@@ -35,28 +35,28 @@
         ];
 
       this.invoke = function changeARIAValue_invoke() {
 
         // Note: this should not fire an EVENT_VALUE_CHANGE when aria-valuetext
         // is not empty
         if (aValuenow != undefined)
           this.DOMNode.setAttribute("aria-valuenow", aValuenow);
- 
+
         // Note: this should always fire an EVENT_VALUE_CHANGE
         if (aValuetext != undefined)
           this.DOMNode.setAttribute("aria-valuetext", aValuetext);
       }
 
       this.check = function changeARIAValue_check() {
         var acc = getAccessible(aNodeOrID, [nsIAccessibleValue]);
         if (!acc)
           return;
 
-        // Note: always test against valuetext first because the existence of 
+        // Note: always test against valuetext first because the existence of
         // aria-valuetext takes precedence over aria-valuenow in gecko.
         is(acc.value, (aValuetext != undefined)? aValuetext : aValuenow,
             "Wrong value of " + prettyName(aNodeOrID));
       }
 
       this.getID = function changeARIAValue_getID() {
         return prettyName(aNodeOrID) + " value changed";
       }
--- a/accessible/tests/mochitest/grid.js
+++ b/accessible/tests/mochitest/grid.js
@@ -76,17 +76,17 @@ function grid(aTableIdentifier)
   }
 
   this.handleKeyEvent = function handleKeyEvent(aEvent)
   {
     if (aEvent.target.localName != "td")
       return;
 
     var cell = aEvent.target;
-    switch(aEvent.keyCode) {
+    switch (aEvent.keyCode) {
       case nsIDOMKeyEvent.DOM_VK_UP:
         var colsCount = this.getColsCount();
         var idx = this.getIndexByCell(cell);
         var upidx = idx - colsCount;
         if (upidx >= 0) {
           cell.removeAttribute("tabindex");
           var upcell = this.getCellAtIndex(upidx);
           upcell.setAttribute("tabindex", "0");
--- a/accessible/tests/mochitest/hittest/test_browser.html
+++ b/accessible/tests/mochitest/hittest/test_browser.html
@@ -25,27 +25,27 @@
       var tgtX = hitX + hitWidth / 2;
       var tgtY = hitY + hitHeight / 2;
 
       var rootAcc = getRootAccessible();
       var docAcc = getAccessible(document);
       var outerDocAcc = docAcc.parent;
 
       var hitAcc = rootAcc.getDeepestChildAtPoint(tgtX, tgtY);
-      is(hitAcc, hititem, "Hit match at " + tgtX + "," + tgtY + 
+      is(hitAcc, hititem, "Hit match at " + tgtX + "," + tgtY +
                           ". Found: " + prettyName(hitAcc));
       var hitAcc2 = docAcc.getDeepestChildAtPoint(tgtX, tgtY);
-      is(hitAcc, hitAcc2, "Hit match at " + tgtX + "," + tgtY + 
+      is(hitAcc, hitAcc2, "Hit match at " + tgtX + "," + tgtY +
                           ". Found: " + prettyName(hitAcc2));
 
       hitAcc = outerDocAcc.getChildAtPoint(tgtX, tgtY);
-      is(hitAcc, docAcc, "Hit match at " + tgtX + "," + tgtY + 
+      is(hitAcc, docAcc, "Hit match at " + tgtX + "," + tgtY +
                          ". Found: " + prettyName(hitAcc));
       hitAcc = docAcc.getChildAtPoint(tgtX, tgtY);
-      is(hitAcc, hittest, "Hit match at " + tgtX + "," + tgtY + 
+      is(hitAcc, hittest, "Hit match at " + tgtX + "," + tgtY +
                           ". Found: " + prettyName(hitAcc));
 
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
--- a/accessible/tests/mochitest/jsat/test_content_text.html
+++ b/accessible/tests/mochitest/jsat/test_content_text.html
@@ -120,17 +120,17 @@
            new ExpectedAnnouncement('navigating'),
            new ExpectedEditState({
             editing: false,
             multiline: false,
             atStart: true,
             atEnd: false })],
           [ContentMessages.simpleMoveNext,
            new ExpectedCursorChange(
-            [{ string : 'entry' }],
+            [{ string: 'entry' }],
             { focused: 'html'})],
           [ContentMessages.activateCurrent(0),
            new ExpectedClickAction(),
            new ExpectedAnnouncement('editing'),
            new ExpectedEditState({
             editing: true,
             multiline: false,
             atStart: true,
@@ -146,17 +146,17 @@
             editing: false,
             multiline: false,
             atStart: true,
             atEnd: false
            },{ focused: 'html' })
          ],
           [ContentMessages.simpleMoveNext,
            new ExpectedCursorChange(
-            [{ string : 'entry' }],
+            [{ string: 'entry' }],
             { focused: 'html'})],
           [ContentMessages.activateCurrent(0),
            new ExpectedClickAction(),
            new ExpectedAnnouncement('editing'),
            new ExpectedEditState({
             editing: true,
             multiline: false,
             atStart: true,
--- a/accessible/tests/mochitest/jsat/test_landmarks.html
+++ b/accessible/tests/mochitest/jsat/test_landmarks.html
@@ -57,21 +57,21 @@
         expectedUtterance: [
           [{"string": "footer"}, "a footer within an article"],
           ["a footer within an article", {"string": "footer"}]],
         expectedBraille: [
           [{"string": "footerAbbr"}, "a footer within an article"],
           ["a footer within an article", {"string": "footerAbbr"}]]
       }, {
         accOrElmOrID: "section_header",
-        expectedUtterance: [[{"string":"header"}, "a header within a section"],
-                            ["a header within a section", {"string":"header"}]],
+        expectedUtterance: [[{"string": "header"}, "a header within a section"],
+                            ["a header within a section", {"string": "header"}]],
         expectedBraille: [
-          [{"string":"headerAbbr"}, "a header within a section"],
-          ["a header within a section", {"string":"headerAbbr"}]]
+          [{"string": "headerAbbr"}, "a header within a section"],
+          ["a header within a section", {"string": "headerAbbr"}]]
       }, {
         accOrElmOrID: "section_footer",
         expectedUtterance: [
           [{"string": "footer"}, "a footer within a section"],
           ["a footer within a section", {"string": "footer"}]],
         expectedBraille: [
           [{"string": "footerAbbr"}, "a footer within a section"],
           ["a footer within a section", {"string": "footerAbbr"}]]
--- a/accessible/tests/mochitest/jsat/test_output.html
+++ b/accessible/tests/mochitest/jsat/test_output.html
@@ -60,19 +60,19 @@ https://bugzilla.mozilla.org/show_bug.cg
           expectedUtterance: [[{"string": "headingLevel", "args": [1]},
             "Test heading"], ["Test heading",
             {"string": "headingLevel", "args": [1]}]],
           expectedBraille: [[{"string": "headingAbbr"}, "Test heading"],
                             ["Test heading", {"string": "headingAbbr"}]]
         }, {
           accOrElmOrID: "list",
           expectedUtterance: [[{"string": "list"},
-            {"string": "listItemsCount", "count":1}, {"string": "listStart"},
+            {"string": "listItemsCount", "count": 1}, {"string": "listStart"},
             "1.", "list one"], ["1.", "list one", {"string": "listStart"},
-            {"string": "list"}, {"string": "listItemsCount", "count":1}]
+            {"string": "list"}, {"string": "listItemsCount", "count": 1}]
           ],
           expectedBraille: [[{"string": "listAbbr"}, "list one"],
             ["list one", {"string": "listAbbr"}]]
         }, {
           accOrElmOrID: "dlist",
           expectedUtterance: [[{"string": "definitionlist"},
             {"string": "listItemsCount", "count": 0.5}, "dd one"], ["dd one",
             {"string": "definitionlist"},
@@ -94,32 +94,32 @@ https://bugzilla.mozilla.org/show_bug.cg
           expectedUtterance: [[{"string": "list"},
             {"string": "listItemsCount", "count": 1}, {"string": "listStart"},
             "list two"], ["list two", {"string": "listStart"},
             {"string": "list"}, {"string": "listItemsCount", "count": 1}]
           ],
           expectedBraille: [["*", "list two"], ["*", "list two"]]
         }, {
           accOrElmOrID: "cell",
-          expectedUtterance: [[{"string":"table"},
+          expectedUtterance: [[{"string": "table"},
             {"string": "tblColumnInfo", "count": 1},
             {"string": "tblRowInfo", "count": 1}, "Fruits and vegetables",
             {"string": "columnInfo", "args": [1]},
             {"string": "rowInfo", "args": [1]}, {"string": "list"},
             {"string": "listItemsCount", "count": 4}, {"string": "listStart"},
             {"string": "link"}, "Apples", {"string": "link"}, "Bananas",
             {"string": "link"}, "Peaches", {"string": "listEnd"},
             {"string": "link"}, "Plums"], ["Apples", {"string": "link"},
             {"string": "listStart"}, "Bananas", {"string": "link"}, "Peaches",
             {"string": "link"}, "Plums", {"string": "link"},
             {"string": "listEnd"}, {"string": "list"},
             {"string": "listItemsCount", "count": 4},
             {"string": "columnInfo", "args": [1]},
             {"string": "rowInfo", "args": [1]}, "Fruits and vegetables",
-            {"string":"table"}, {"string": "tblColumnInfo", "count": 1},
+            {"string": "table"}, {"string": "tblColumnInfo", "count": 1},
             {"string": "tblRowInfo", "count": 1}]],
           expectedBraille: [[{"string": "cellInfoAbbr", "args": [ 1, 1]},
             {"string": "listAbbr"}, {"string": "linkAbbr"}, "Apples",
             {"string": "linkAbbr"}, "Bananas", {"string": "linkAbbr"},
             "Peaches", {"string": "linkAbbr"}, "Plums"], ["Apples",
             {"string": "linkAbbr"}, "Bananas", {"string": "linkAbbr"},
             "Peaches", {"string": "linkAbbr"}, "Plums", {"string": "linkAbbr"},
             {"string": "listAbbr"},
@@ -404,19 +404,19 @@ https://bugzilla.mozilla.org/show_bug.cg
           expectedUtterance: [[{"string": "listboxoption"}, "555-12345"],
                               ["555-12345", {"string": "listboxoption"}]],
           expectedBraille: [[{"string": "listboxoptionAbbr"}, "555-12345"],
                             ["555-12345", {"string": "listboxoptionAbbr"}]]
         }, {
           accOrElmOrID: "columnheader",
           oldAccOrElmOrID: "grid",
           expectedUtterance: [[{"string": "columnInfo", "args": [1]},
-            {"string": "rowInfo", "args" :[1]}, "Sunday"], ["Sunday",
+            {"string": "rowInfo", "args": [1]}, "Sunday"], ["Sunday",
             {"string": "columnInfo", "args": [1]},
-            {"string": "rowInfo", "args" :[1]}]],
+            {"string": "rowInfo", "args": [1]}]],
           expectedBraille: [[{"string": "cellInfoAbbr", "args": [1, 1]},
             "Sunday"], ["Sunday", {"string": "cellInfoAbbr", "args": [1, 1]}]]
         }, {
           accOrElmOrID: "rowheader",
           oldAccOrElmOrID: "grid",
           expectedUtterance: [[{"string": "columnInfo", "args": [1]},
             {"string": "rowInfo", "args": [2]}, "Sunday", "Week 1"], ["Week 1",
             {"string": "columnInfo", "args": [1]},
--- a/accessible/tests/mochitest/jsat/test_output_mathml.html
+++ b/accessible/tests/mochitest/jsat/test_output_mathml.html
@@ -14,162 +14,162 @@
           src="jsatcommon.js"></script>
   <script type="application/javascript">
 
     function doTest() {
       // Test the following accOrElmOrID.
       var tests = [{
           accOrElmOrID: "math-1",
           expectedUtterance: [
-            [{"string":"open-fence"},"(","x",",","y",{"string":"close-fence"},")"],
-            ["(",{"string":"open-fence"},"x",",","y",")",{"string":"close-fence"}]
+            [{"string": "open-fence"},"(","x",",","y",{"string": "close-fence"},")"],
+            ["(",{"string": "open-fence"},"x",",","y",")",{"string": "close-fence"}]
           ],
           expectedBraille: [
-            [{"string":"open-fenceAbbr"},"(","x",",","y",{"string":"close-fenceAbbr"},")"],
-            ["(",{"string":"open-fenceAbbr"},"x",",","y",")",{"string":"close-fenceAbbr"}]
+            [{"string": "open-fenceAbbr"},"(","x",",","y",{"string": "close-fenceAbbr"},")"],
+            ["(",{"string": "open-fenceAbbr"},"x",",","y",")",{"string": "close-fenceAbbr"}]
           ]
         }, {
           accOrElmOrID: "mfrac-1",
           expectedUtterance: [
-            [{"string":"mathmlfraction"},{"string":"numerator"},"a",{"string":"denominator"},"b"],
-            ["a",{"string":"numerator"},"b",{"string":"denominator"},{"string":"mathmlfraction"}]
+            [{"string": "mathmlfraction"},{"string": "numerator"},"a",{"string": "denominator"},"b"],
+            ["a",{"string": "numerator"},"b",{"string": "denominator"},{"string": "mathmlfraction"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlfractionAbbr"},{"string":"numeratorAbbr"},"a",{"string":"denominatorAbbr"},"b"],
-            ["a",{"string":"numeratorAbbr"},"b",{"string":"denominatorAbbr"},{"string":"mathmlfractionAbbr"}]
+            [{"string": "mathmlfractionAbbr"},{"string": "numeratorAbbr"},"a",{"string": "denominatorAbbr"},"b"],
+            ["a",{"string": "numeratorAbbr"},"b",{"string": "denominatorAbbr"},{"string": "mathmlfractionAbbr"}]
           ]
         }, {
           accOrElmOrID: "mfrac-2",
           expectedUtterance: [
-            [{"string":"mathmlfractionwithoutbar"},{"string":"numerator"},"a",{"string":"denominator"},"b"],
-            ["a",{"string":"numerator"},"b",{"string":"denominator"},{"string":"mathmlfractionwithoutbar"}]
+            [{"string": "mathmlfractionwithoutbar"},{"string": "numerator"},"a",{"string": "denominator"},"b"],
+            ["a",{"string": "numerator"},"b",{"string": "denominator"},{"string": "mathmlfractionwithoutbar"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlfractionwithoutbarAbbr"},{"string":"numeratorAbbr"},"a",{"string":"denominatorAbbr"},"b"],
-            ["a",{"string":"numeratorAbbr"},"b",{"string":"denominatorAbbr"},{"string":"mathmlfractionwithoutbarAbbr"}]
+            [{"string": "mathmlfractionwithoutbarAbbr"},{"string": "numeratorAbbr"},"a",{"string": "denominatorAbbr"},"b"],
+            ["a",{"string": "numeratorAbbr"},"b",{"string": "denominatorAbbr"},{"string": "mathmlfractionwithoutbarAbbr"}]
           ]
         }, {
           accOrElmOrID: "msub-1",
           expectedUtterance: [
-            [{"string":"mathmlscripted"},{"string":"base"},"a",{"string":"subscript"},"b"],
-            ["a",{"string":"base"},"b",{"string":"subscript"},{"string":"mathmlscripted"}]
+            [{"string": "mathmlscripted"},{"string": "base"},"a",{"string": "subscript"},"b"],
+            ["a",{"string": "base"},"b",{"string": "subscript"},{"string": "mathmlscripted"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlscriptedAbbr"},{"string":"baseAbbr"},"a",{"string":"subscriptAbbr"},"b"],
-            ["a",{"string":"baseAbbr"},"b",{"string":"subscriptAbbr"},{"string":"mathmlscriptedAbbr"}]
+            [{"string": "mathmlscriptedAbbr"},{"string": "baseAbbr"},"a",{"string": "subscriptAbbr"},"b"],
+            ["a",{"string": "baseAbbr"},"b",{"string": "subscriptAbbr"},{"string": "mathmlscriptedAbbr"}]
           ]
         }, {
           accOrElmOrID: "msup-1",
           expectedUtterance: [
-            [{"string":"mathmlscripted"},{"string":"base"},"a",{"string":"superscript"},"b"],
-            ["a",{"string":"base"},"b",{"string":"superscript"},{"string":"mathmlscripted"}]
+            [{"string": "mathmlscripted"},{"string": "base"},"a",{"string": "superscript"},"b"],
+            ["a",{"string": "base"},"b",{"string": "superscript"},{"string": "mathmlscripted"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlscriptedAbbr"},{"string":"baseAbbr"},"a",{"string":"superscriptAbbr"},"b"],
-            ["a",{"string":"baseAbbr"},"b",{"string":"superscriptAbbr"},{"string":"mathmlscriptedAbbr"}]
+            [{"string": "mathmlscriptedAbbr"},{"string": "baseAbbr"},"a",{"string": "superscriptAbbr"},"b"],
+            ["a",{"string": "baseAbbr"},"b",{"string": "superscriptAbbr"},{"string": "mathmlscriptedAbbr"}]
           ]
         }, {
           accOrElmOrID: "msubsup-1",
           expectedUtterance: [
-            [{"string":"mathmlscripted"},{"string":"base"},"a",{"string":"subscript"},"b",{"string":"superscript"},"c"],
-            ["a",{"string":"base"},"b",{"string":"subscript"},"c",{"string":"superscript"},{"string":"mathmlscripted"}]
+            [{"string": "mathmlscripted"},{"string": "base"},"a",{"string": "subscript"},"b",{"string": "superscript"},"c"],
+            ["a",{"string": "base"},"b",{"string": "subscript"},"c",{"string": "superscript"},{"string": "mathmlscripted"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlscriptedAbbr"},{"string":"baseAbbr"},"a",{"string":"subscriptAbbr"},"b",{"string":"superscriptAbbr"},"c"],
-            ["a",{"string":"baseAbbr"},"b",{"string":"subscriptAbbr"},"c",{"string":"superscriptAbbr"},{"string":"mathmlscriptedAbbr"}]
+            [{"string": "mathmlscriptedAbbr"},{"string": "baseAbbr"},"a",{"string": "subscriptAbbr"},"b",{"string": "superscriptAbbr"},"c"],
+            ["a",{"string": "baseAbbr"},"b",{"string": "subscriptAbbr"},"c",{"string": "superscriptAbbr"},{"string": "mathmlscriptedAbbr"}]
           ]
         }, {
           accOrElmOrID: "mmultiscripts-1",
           expectedUtterance: [
-            [{"string":"mathmlscripted"},{"string":"base"},"a",{"string":"subscript"},"b",{"string":"superscript"},"c",{"string":"superscript"},"d",{"string":"presubscript"},"e",{"string":"presubscript"},"f",{"string":"presuperscript"},"g"],
-            ["a",{"string":"base"},"b",{"string":"subscript"},"c",{"string":"superscript"},"d",{"string":"superscript"},"e",{"string":"presubscript"},"f",{"string":"presubscript"},"g",{"string":"presuperscript"},{"string":"mathmlscripted"}]
+            [{"string": "mathmlscripted"},{"string": "base"},"a",{"string": "subscript"},"b",{"string": "superscript"},"c",{"string": "superscript"},"d",{"string": "presubscript"},"e",{"string": "presubscript"},"f",{"string": "presuperscript"},"g"],
+            ["a",{"string": "base"},"b",{"string": "subscript"},"c",{"string": "superscript"},"d",{"string": "superscript"},"e",{"string": "presubscript"},"f",{"string": "presubscript"},"g",{"string": "presuperscript"},{"string": "mathmlscripted"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlscriptedAbbr"},{"string":"baseAbbr"},"a",{"string":"subscriptAbbr"},"b",{"string":"superscriptAbbr"},"c",{"string":"superscriptAbbr"},"d",{"string":"presubscriptAbbr"},"e",{"string":"presubscriptAbbr"},"f",{"string":"presuperscriptAbbr"},"g"],
-            ["a",{"string":"baseAbbr"},"b",{"string":"subscriptAbbr"},"c",{"string":"superscriptAbbr"},"d",{"string":"superscriptAbbr"},"e",{"string":"presubscriptAbbr"},"f",{"string":"presubscriptAbbr"},"g",{"string":"presuperscriptAbbr"},{"string":"mathmlscriptedAbbr"}]
+            [{"string": "mathmlscriptedAbbr"},{"string": "baseAbbr"},"a",{"string": "subscriptAbbr"},"b",{"string": "superscriptAbbr"},"c",{"string": "superscriptAbbr"},"d",{"string": "presubscriptAbbr"},"e",{"string": "presubscriptAbbr"},"f",{"string": "presuperscriptAbbr"},"g"],
+            ["a",{"string": "baseAbbr"},"b",{"string": "subscriptAbbr"},"c",{"string": "superscriptAbbr"},"d",{"string": "superscriptAbbr"},"e",{"string": "presubscriptAbbr"},"f",{"string": "presubscriptAbbr"},"g",{"string": "presuperscriptAbbr"},{"string": "mathmlscriptedAbbr"}]
           ]
         }, {
           accOrElmOrID: "munder-1",
           expectedUtterance: [
-            [{"string":"mathmlscripted"},{"string":"base"},"a",{"string":"underscript"},"b"],
-            ["a",{"string":"base"},"b",{"string":"underscript"},{"string":"mathmlscripted"}]
+            [{"string": "mathmlscripted"},{"string": "base"},"a",{"string": "underscript"},"b"],
+            ["a",{"string": "base"},"b",{"string": "underscript"},{"string": "mathmlscripted"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlscriptedAbbr"},{"string":"baseAbbr"},"a",{"string":"underscriptAbbr"},"b"],
-            ["a",{"string":"baseAbbr"},"b",{"string":"underscriptAbbr"},{"string":"mathmlscriptedAbbr"}]
+            [{"string": "mathmlscriptedAbbr"},{"string": "baseAbbr"},"a",{"string": "underscriptAbbr"},"b"],
+            ["a",{"string": "baseAbbr"},"b",{"string": "underscriptAbbr"},{"string": "mathmlscriptedAbbr"}]
           ]
         }, {
           accOrElmOrID: "mover-1",
           expectedUtterance: [
-            [{"string":"mathmlscripted"},{"string":"base"},"a",{"string":"overscript"},"b"],
-            ["a",{"string":"base"},"b",{"string":"overscript"},{"string":"mathmlscripted"}]
+            [{"string": "mathmlscripted"},{"string": "base"},"a",{"string": "overscript"},"b"],
+            ["a",{"string": "base"},"b",{"string": "overscript"},{"string": "mathmlscripted"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlscriptedAbbr"},{"string":"baseAbbr"},"a",{"string":"overscriptAbbr"},"b"],
-            ["a",{"string":"baseAbbr"},"b",{"string":"overscriptAbbr"},{"string":"mathmlscriptedAbbr"}]
+            [{"string": "mathmlscriptedAbbr"},{"string": "baseAbbr"},"a",{"string": "overscriptAbbr"},"b"],
+            ["a",{"string": "baseAbbr"},"b",{"string": "overscriptAbbr"},{"string": "mathmlscriptedAbbr"}]
           ]
         }, {
           accOrElmOrID: "munderover-1",
           expectedUtterance: [
-            [{"string":"mathmlscripted"},{"string":"base"},"a",{"string":"underscript"},"b",{"string":"overscript"},"c"],
-            ["a",{"string":"base"},"b",{"string":"underscript"},"c",{"string":"overscript"},{"string":"mathmlscripted"}]
+            [{"string": "mathmlscripted"},{"string": "base"},"a",{"string": "underscript"},"b",{"string": "overscript"},"c"],
+            ["a",{"string": "base"},"b",{"string": "underscript"},"c",{"string": "overscript"},{"string": "mathmlscripted"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlscriptedAbbr"},{"string":"baseAbbr"},"a",{"string":"underscriptAbbr"},"b",{"string":"overscriptAbbr"},"c"],
-            ["a",{"string":"baseAbbr"},"b",{"string":"underscriptAbbr"},"c",{"string":"overscriptAbbr"},{"string":"mathmlscriptedAbbr"}]
+            [{"string": "mathmlscriptedAbbr"},{"string": "baseAbbr"},"a",{"string": "underscriptAbbr"},"b",{"string": "overscriptAbbr"},"c"],
+            ["a",{"string": "baseAbbr"},"b",{"string": "underscriptAbbr"},"c",{"string": "overscriptAbbr"},{"string": "mathmlscriptedAbbr"}]
           ]
         }, {
           accOrElmOrID: "mroot-1",
           expectedUtterance: [
-            [{"string":"mathmlroot"},{"string":"base"},"a",{"string":"root-index"},"b"],
-            ["a",{"string":"base"},"b",{"string":"root-index"},{"string":"mathmlroot"}]
+            [{"string": "mathmlroot"},{"string": "base"},"a",{"string": "root-index"},"b"],
+            ["a",{"string": "base"},"b",{"string": "root-index"},{"string": "mathmlroot"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlrootAbbr"},{"string":"baseAbbr"},"a",{"string":"root-indexAbbr"},"b"],
-            ["a",{"string":"baseAbbr"},"b",{"string":"root-indexAbbr"},{"string":"mathmlrootAbbr"}]
+            [{"string": "mathmlrootAbbr"},{"string": "baseAbbr"},"a",{"string": "root-indexAbbr"},"b"],
+            ["a",{"string": "baseAbbr"},"b",{"string": "root-indexAbbr"},{"string": "mathmlrootAbbr"}]
           ]
         }, {
           accOrElmOrID: "mtable-1",
           expectedUtterance: [
-            [{"string":"mathmltable"},{"string":"tblColumnInfo","count":3},{"string":"tblRowInfo","count":2},{"string":"columnInfo","args":[1]},{"string":"rowInfo","args":[1]},"a",{"string":"columnInfo","args":[2]},{"string":"rowInfo","args":[1]},"b",{"string":"columnInfo","args":[3]},{"string":"rowInfo","args":[1]},"c",{"string":"columnInfo","args":[1]},{"string":"rowInfo","args":[2]},"d",{"string":"columnInfo","args":[2]},{"string":"rowInfo","args":[2]},"e",{"string":"columnInfo","args":[3]},{"string":"rowInfo","args":[2]},"f"],
-            ["a",{"string":"columnInfo","args":[1]},{"string":"rowInfo","args":[1]},"b",{"string":"columnInfo","args":[2]},{"string":"rowInfo","args":[1]},"c",{"string":"columnInfo","args":[3]},{"string":"rowInfo","args":[1]},"d",{"string":"columnInfo","args":[1]},{"string":"rowInfo","args":[2]},"e",{"string":"columnInfo","args":[2]},{"string":"rowInfo","args":[2]},"f",{"string":"columnInfo","args":[3]},{"string":"rowInfo","args":[2]},{"string":"mathmltable"},{"string":"tblColumnInfo","count":3},{"string":"tblRowInfo","count":2}]
+            [{"string": "mathmltable"},{"string": "tblColumnInfo","count": 3},{"string": "tblRowInfo","count": 2},{"string": "columnInfo","args": [1]},{"string": "rowInfo","args": [1]},"a",{"string": "columnInfo","args": [2]},{"string": "rowInfo","args": [1]},"b",{"string": "columnInfo","args": [3]},{"string": "rowInfo","args": [1]},"c",{"string": "columnInfo","args": [1]},{"string": "rowInfo","args": [2]},"d",{"string": "columnInfo","args": [2]},{"string": "rowInfo","args": [2]},"e",{"string": "columnInfo","args": [3]},{"string": "rowInfo","args": [2]},"f"],
+            ["a",{"string": "columnInfo","args": [1]},{"string": "rowInfo","args": [1]},"b",{"string": "columnInfo","args": [2]},{"string": "rowInfo","args": [1]},"c",{"string": "columnInfo","args": [3]},{"string": "rowInfo","args": [1]},"d",{"string": "columnInfo","args": [1]},{"string": "rowInfo","args": [2]},"e",{"string": "columnInfo","args": [2]},{"string": "rowInfo","args": [2]},"f",{"string": "columnInfo","args": [3]},{"string": "rowInfo","args": [2]},{"string": "mathmltable"},{"string": "tblColumnInfo","count": 3},{"string": "tblRowInfo","count": 2}]
           ],
           expectedBraille: [
-            [{"string":"mathmltableAbbr"},{"string":"tblColumnInfoAbbr","count":3},{"string":"tblRowInfoAbbr","count":2},{"string":"cellInfoAbbr","args":[1,1]},"a",{"string":"cellInfoAbbr","args":[2,1]},"b",{"string":"cellInfoAbbr","args":[3,1]},"c",{"string":"cellInfoAbbr","args":[1,2]},"d",{"string":"cellInfoAbbr","args":[2,2]},"e",{"string":"cellInfoAbbr","args":[3,2]},"f"],
-            ["a",{"string":"cellInfoAbbr","args":[1,1]},"b",{"string":"cellInfoAbbr","args":[2,1]},"c",{"string":"cellInfoAbbr","args":[3,1]},"d",{"string":"cellInfoAbbr","args":[1,2]},"e",{"string":"cellInfoAbbr","args":[2,2]},"f",{"string":"cellInfoAbbr","args":[3,2]},{"string":"mathmltableAbbr"},{"string":"tblColumnInfoAbbr","count":3},{"string":"tblRowInfoAbbr","count":2}]
+            [{"string": "mathmltableAbbr"},{"string": "tblColumnInfoAbbr","count": 3},{"string": "tblRowInfoAbbr","count": 2},{"string": "cellInfoAbbr","args": [1,1]},"a",{"string": "cellInfoAbbr","args": [2,1]},"b",{"string": "cellInfoAbbr","args": [3,1]},"c",{"string": "cellInfoAbbr","args": [1,2]},"d",{"string": "cellInfoAbbr","args": [2,2]},"e",{"string": "cellInfoAbbr","args": [3,2]},"f"],
+            ["a",{"string": "cellInfoAbbr","args": [1,1]},"b",{"string": "cellInfoAbbr","args": [2,1]},"c",{"string": "cellInfoAbbr","args": [3,1]},"d",{"string": "cellInfoAbbr","args": [1,2]},"e",{"string": "cellInfoAbbr","args": [2,2]},"f",{"string": "cellInfoAbbr","args": [3,2]},{"string": "mathmltableAbbr"},{"string": "tblColumnInfoAbbr","count": 3},{"string": "tblRowInfoAbbr","count": 2}]
           ]
       }, {
           accOrElmOrID: "menclose-1",
           expectedUtterance: [
-            [{"string":"mathmlenclosed"},{"string":"notation-longdiv"},"a"],
-            ["a",{"string":"notation-longdiv"},{"string":"mathmlenclosed"}]
+            [{"string": "mathmlenclosed"},{"string": "notation-longdiv"},"a"],
+            ["a",{"string": "notation-longdiv"},{"string": "mathmlenclosed"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlenclosedAbbr"},{"string":"notation-longdivAbbr"},"a"],
-            ["a",{"string":"notation-longdivAbbr"},{"string":"mathmlenclosedAbbr"}]
+            [{"string": "mathmlenclosedAbbr"},{"string": "notation-longdivAbbr"},"a"],
+            ["a",{"string": "notation-longdivAbbr"},{"string": "mathmlenclosedAbbr"}]
           ]
         }, {
           accOrElmOrID: "menclose-2",
           expectedUtterance: [
-            [{"string":"mathmlenclosed"},{"string":"notation-circle"},"a"],
-            ["a",{"string":"notation-circle"},{"string":"mathmlenclosed"}]
+            [{"string": "mathmlenclosed"},{"string": "notation-circle"},"a"],
+            ["a",{"string": "notation-circle"},{"string": "mathmlenclosed"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlenclosedAbbr"},{"string":"notation-circleAbbr"},"a"],
-            ["a",{"string":"notation-circleAbbr"},{"string":"mathmlenclosedAbbr"}]
+            [{"string": "mathmlenclosedAbbr"},{"string": "notation-circleAbbr"},"a"],
+            ["a",{"string": "notation-circleAbbr"},{"string": "mathmlenclosedAbbr"}]
           ]
         }, {
           accOrElmOrID: "menclose-3",
           expectedUtterance: [
-            [{"string":"mathmlenclosed"},{"string":"notation-left"},{"string":"notation-top"},{"string":"notation-bottom"},"a"],
-            ["a",{"string":"notation-left"},{"string":"notation-top"},{"string":"notation-bottom"},{"string":"mathmlenclosed"}]
+            [{"string": "mathmlenclosed"},{"string": "notation-left"},{"string": "notation-top"},{"string": "notation-bottom"},"a"],
+            ["a",{"string": "notation-left"},{"string": "notation-top"},{"string": "notation-bottom"},{"string": "mathmlenclosed"}]
           ],
           expectedBraille: [
-            [{"string":"mathmlenclosedAbbr"},{"string":"notation-leftAbbr"},{"string":"notation-topAbbr"},{"string":"notation-bottomAbbr"},"a"],
-            ["a",{"string":"notation-leftAbbr"},{"string":"notation-topAbbr"},{"string":"notation-bottomAbbr"},{"string":"mathmlenclosedAbbr"}]
+            [{"string": "mathmlenclosedAbbr"},{"string": "notation-leftAbbr"},{"string": "notation-topAbbr"},{"string": "notation-bottomAbbr"},"a"],
+            ["a",{"string": "notation-leftAbbr"},{"string": "notation-topAbbr"},{"string": "notation-bottomAbbr"},{"string": "mathmlenclosedAbbr"}]
           ]
         }];
 
       // Test all possible utterance order preference values.
       function testOutputOrder(aOutputOrder) {
         return function() {
           SpecialPowers.pushPrefEnv({
             "set": [[PREF_UTTERANCE_ORDER, aOutputOrder]]
--- a/accessible/tests/mochitest/name/markup.js
+++ b/accessible/tests/mochitest/name/markup.js
@@ -64,17 +64,17 @@ var gTestIterator =
 
     this.ruleIdx++;
     if (this.ruleIdx == this.ruleElms.length) {
       // When test is finished then name is empty and no explict-name.
       var defaultName = this.ruleSetElm.hasAttribute("defaultName") ?
         this.ruleSetElm.getAttribute("defaultName") : null;
       testName(this.elm, defaultName,
                "Default name test (" + gTestIterator.testID + "). ");
-      testAbsentAttrs(this.elm, {"explicit-name" : "true"});
+      testAbsentAttrs(this.elm, {"explicit-name": "true"});
 
       this.markupIdx++;
       if (this.markupIdx == this.markupElms.length) {
         //disableLogging("tree"); // debugging
         SimpleTest.finish();
         return;
       }
 
@@ -212,19 +212,19 @@ function testNameForAttrRule(aElm, aRule
       name += labelElm.getAttribute("textequiv");
     }
   }
 
   var msg = "Attribute '" + attr + "' test (" + gTestIterator.testID + "). ";
   testName(aElm, name, msg);
 
   if (aRule.getAttribute("explict-name") != "false")
-    testAttrs(aElm, {"explicit-name" : "true"}, true);
+    testAttrs(aElm, {"explicit-name": "true"}, true);
   else
-    testAbsentAttrs(aElm, {"explicit-name" : "true"});
+    testAbsentAttrs(aElm, {"explicit-name": "true"});
 
   // If @recreated attribute is used then this attribute change recreates an
   // accessible. Wait for reorder event in this case or otherwise proceed next
   // test immediately.
   if (aRule.hasAttribute("recreated")) {
     waitForEvent(EVENT_REORDER, aElm.parentNode,
                  gTestIterator.iterateNext, gTestIterator);
     aElm.removeAttribute(attr);
@@ -282,17 +282,17 @@ function testNameForElmRule(aElm, aRule)
   if (!labelElm) {
     ok(false, msg + " Failed to find '" + tagname + "' element.");
     gTestIterator.iterateNext();
     return;
   }
 
   var msg = "Element '" + tagname + "' test (" + gTestIterator.testID + ").";
   testName(aElm, labelElm.getAttribute("textequiv"), msg);
-  testAttrs(aElm, {"explicit-name" : "true"}, true);
+  testAttrs(aElm, {"explicit-name": "true"}, true);
 
   var parentNode = labelElm.parentNode;
 
   if (gDumpToConsole) {
     dump("\nProcessed elm rule. Wait for reorder event on " +
          prettyName(parentNode) + "\n");
   }
   waitForEvent(EVENT_REORDER, parentNode,
@@ -300,17 +300,17 @@ function testNameForElmRule(aElm, aRule)
 
   parentNode.removeChild(labelElm);
 }
 
 function testNameForSubtreeRule(aElm, aRule)
 {
   var msg = "From subtree test (" + gTestIterator.testID + ").";
   testName(aElm, aElm.getAttribute("textequiv"), msg);
-  testAbsentAttrs(aElm, {"explicit-name" : "true"});
+  testAbsentAttrs(aElm, {"explicit-name": "true"});
 
   if (gDumpToConsole) {
     dump("\nProcessed from subtree rule. Wait for reorder event on " +
          prettyName(aElm) + "\n");
   }
   waitForEvent(EVENT_REORDER, aElm, gTestIterator.iterateNext, gTestIterator);
 
   while (aElm.firstChild)
@@ -369,12 +369,12 @@ function evaluateXPath(aNode, aExpr, aRe
   while (res = result.iterateNext())
     found.push(res);
 
   return found;
 }
 
 function htmlDocResolver(aPrefix) {
   var ns = {
-    'html' : 'http://www.w3.org/1999/xhtml'
+    'html': 'http://www.w3.org/1999/xhtml'
   };
   return ns[aPrefix] || null;
 }
--- a/accessible/tests/mochitest/name/test_general.html
+++ b/accessible/tests/mochitest/name/test_general.html
@@ -22,41 +22,41 @@
       // Simple label provided via ARIA
       testName("btn_simple_aria_label", "I am a button");
 
       // aria-label and aria-labelledby, expect aria-labelledby
       testName("btn_both_aria_labels", "text I am a button, two");
 
       //////////////////////////////////////////////////////////////////////////
       // aria-labelledby
-      
+    
       // Single relation. The value of 'aria-labelledby' contains the ID of
       // an element. Gets the name from text node of that element.
       testName("btn_labelledby_text", "text");
 
       // Multiple relations. The value of 'aria-labelledby' contains the IDs
       // of elements. Gets the name from text nodes of those elements.
       testName("btn_labelledby_texts", "text1 text2");
 
       //////////////////////////////////////////////////////////////////////////
       // Name from named accessible
 
       testName("input_labelledby_namedacc", "Data");
 
       //////////////////////////////////////////////////////////////////////////
       // Name from subtree (single relation labelled_by).
-      
+    
       // Gets the name from text nodes contained by nested elements
       testName("btn_labelledby_mixed", "nomore text");
 
       // Gets the name from text nodes contained by nested elements, ignores
       // hidden elements (bug 443081).
       testName("btn_labelledby_mixed_hidden_child", "nomore text2");
 
-      // Gets the name from hidden text nodes contained by nested elements, 
+      // Gets the name from hidden text nodes contained by nested elements,
       // (label element is hidden entirely), (bug 443081).
       testName("btn_labelledby_mixed_hidden", "lala more hidden text");
 
       // Gets the name from text nodes contained by nested elements having block
       // representation (every text node value in the name should be devided by
       // spaces)
       testName("btn_labelledby_mixed_block", "text more text");
 
@@ -157,17 +157,17 @@
 
       //////////////////////////////////////////////////////////////////////////
       // textarea name
 
       // textarea's name should have the value, which initially is specified by
       // a text child.
       testName("textareawithchild", "Story Foo is ended.");
 
-      // new textarea name should reflect the value change. 
+      // new textarea name should reflect the value change.
       var elem = document.getElementById("textareawithchild");
       elem.value = "Bar";
 
       testName("textareawithchild", "Story Bar is ended.");
 
       //////////////////////////////////////////////////////////////////////////
       // controls having a value used as a part of computed name
 
--- a/accessible/tests/mochitest/role.js
+++ b/accessible/tests/mochitest/role.js
@@ -149,17 +149,17 @@ function getRole(aAccOrElmOrID)
 {
   var acc = getAccessible(aAccOrElmOrID);
   if (!acc)
     return -1;
 
   var role = -1;
   try {
     role = acc.role;
-  } catch(e) {
+  } catch (e) {
     ok(false, "Role for " + aAccOrElmOrID + " could not be retrieved!");
   }
 
   return role;
 }
 
 /**
  * Analogy of SimpleTest.is function used to check the role.
--- a/accessible/tests/mochitest/role/test_aria.html
+++ b/accessible/tests/mochitest/role/test_aria.html
@@ -102,21 +102,21 @@
       var weak_landmarks = ["banner", "complementary", "contentinfo",
           "main", "navigation", "search"];
       for (l in weak_landmarks)
         testRole(weak_landmarks[l], ROLE_SECTION);
 
       for (l in weak_landmarks) {
         var id = weak_landmarks[l] + "_table";
         testRole(id, ROLE_TABLE);
-        
+    
         var accessibleTable = getAccessible(id, [nsIAccessibleTable], null,
                                             DONOTFAIL_IF_NO_INTERFACE);
         ok(!!accessibleTable, "landmarked table should have nsIAccessibleTable");
-        
+    
         if (accessibleTable)
           is(accessibleTable.getCellAt(0,0).firstChild.name, "hi", "no cell");
       }
 
       //////////////////////////////////////////////////////////////////////////
       // test gEmptyRoleMap
       testRole("buttontable_row", ROLE_NOTHING);
       testRole("buttontable_cell", ROLE_NOTHING);
--- a/accessible/tests/mochitest/selectable/test_aria.html
+++ b/accessible/tests/mochitest/selectable/test_aria.html
@@ -67,17 +67,17 @@
       select.addItemToSelection(0);
       testSelectableSelection(id, [ "listbox2_item1" ]);
       select.removeItemFromSelection(0);
       testSelectableSelection(id, [ ]);
       select.selectAll();
       testSelectableSelection(id, [ "listbox2_item1", "listbox2_item2" ]);
       select.unselectAll();
       testSelectableSelection(id, [ ]);
-      
+    
       //////////////////////////////////////////////////////////////////////////
       // role="grid"
 
       id = "grid1";
       ok(isAccessible(id, [nsIAccessibleSelectable]),
          "No selectable accessible for " + id);
 
       testSelectableSelection(id, [ ]);
--- a/accessible/tests/mochitest/states.js
+++ b/accessible/tests/mochitest/states.js
@@ -182,17 +182,17 @@ function testStatesInSubtree(aAccOrElmOr
     // Right now, text leafs don't get tested because the states are not being
     // propagated.
     testStates(acc, aState, aExtraState, aAbsentState);
 
   // Iterate over its children to see if the state got propagated.
   var children = null;
   try {
     children = acc.children;
-  } catch(e) {}
+  } catch (e) {}
   ok(children, "Could not get children for " + aAccOrElmOrID +"!");
 
   if (children) {
     for (var i = 0; i < children.length; i++) {
       var childAcc = children.queryElementAt(i, nsIAccessible);
       testStatesInSubtree(childAcc, aState, aExtraState, aAbsentState);
     }
   }
--- a/accessible/tests/mochitest/states/test_aria.html
+++ b/accessible/tests/mochitest/states/test_aria.html
@@ -41,17 +41,17 @@
           testStates(acc, STATE_FOCUSABLE);
         }
       }
 
       // Iterate over its children to see if the state got propagated.
       var children = null;
       try {
         children = acc.children;
-      } catch(e) {}
+      } catch (e) {}
       ok(children, "Could not get children for " + aAccOrElmOrID +"!");
 
       if (children) {
         for (var i = 0; i < children.length; i++) {
           var childAcc = children.queryElementAt(i, nsIAccessible);
           testAriaDisabledTree(childAcc);
         }
       }
--- a/accessible/tests/mochitest/states/test_docarticle.html
+++ b/accessible/tests/mochitest/states/test_docarticle.html
@@ -29,17 +29,17 @@
 
         document.designMode = "on";
 
         testStates(docAcc, 0, EXT_STATE_EDITABLE, STATE_READONLY);
         testStates("aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
         testStates("editable_aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
         testStates("article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
         testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
-  
+
         document.designMode = "off";
 
         testStates(docAcc, STATE_READONLY);
         testStates("aria_article", STATE_READONLY);
         testStates("editable_aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
         testStates("article", STATE_READONLY);
         testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
       }
--- a/accessible/tests/mochitest/table.js
+++ b/accessible/tests/mochitest/table.js
@@ -298,17 +298,17 @@ function testTableIndexes(aIdentifier, a
           try {
             strIdx = attrs.getStringProperty("table-cell-index");
           } catch (e) {
             ok(false,
                cellId + ": no cell index from object attributes on the cell accessible at index " + idx + ".");
           }
 
           if (strIdx) {
-            is (parseInt(strIdx), idx,
+            is(parseInt(strIdx), idx,
                 cellId + ": cell index from object attributes of cell accessible isn't corrent.");
           }
 
           // cell: table
           try {
             is(cellAcc.table, tableAcc,
                cellId + ": wrong table accessible for the cell.");
 
@@ -399,22 +399,22 @@ function testTableSelection(aIdentifier,
   is(acc.selectedColumnCount, selCols.length,
      msg + "Wrong count of selected columns for " + prettyName(aIdentifier));
 
   // getSelectedColumns test
   var actualSelColsCountObj = { value: null };
   var actualSelCols = acc.getSelectedColumnIndices(actualSelColsCountObj);
 
   var actualSelColsCount = actualSelColsCountObj.value;
-  is (actualSelColsCount, selCols.length,
+  is(actualSelColsCount, selCols.length,
       msg + "Wrong count of selected columns for " + prettyName(aIdentifier) +
       "from getSelectedColumns.");
 
   for (var i = 0; i < actualSelColsCount; i++) {
-    is (actualSelCols[i], selCols[i],
+    is(actualSelCols[i], selCols[i],
         msg + "Column at index " + selCols[i] + " should be selected.");
   }
 
   // Rows selection tests.
   var selRows = [];
 
   // isRowSelected test
   for (var rowIdx = 0; rowIdx < rowCount; rowIdx++) {
@@ -439,22 +439,22 @@ function testTableSelection(aIdentifier,
   is(acc.selectedRowCount, selRows.length,
      msg + "Wrong count of selected rows for " + prettyName(aIdentifier));
 
   // getSelectedRows test
   var actualSelrowCountObj = { value: null };
   var actualSelRows = acc.getSelectedRowIndices(actualSelrowCountObj);
 
   var actualSelrowCount = actualSelrowCountObj.value;
-  is (actualSelrowCount, selRows.length,
+  is(actualSelrowCount, selRows.length,
       msg + "Wrong count of selected rows for " + prettyName(aIdentifier) +
       "from getSelectedRows.");
 
   for (var i = 0; i < actualSelrowCount; i++) {
-    is (actualSelRows[i], selRows[i],
+    is(actualSelRows[i], selRows[i],
         msg + "Row at index " + selRows[i] + " should be selected.");
   }
 
   // Cells selection tests.
   var selCells = [];
 
   // isCellSelected test
   for (var rowIdx = 0; rowIdx < rowCount; rowIdx++) {
--- a/accessible/tests/mochitest/table/test_layoutguess.html
+++ b/accessible/tests/mochitest/table/test_layoutguess.html
@@ -61,17 +61,17 @@
       testAbsentAttrs("table6.2.3", attr);
 
       // table with abbr element
       testAbsentAttrs("table6.3", attr);
 
       // table with abbr element having empty text node
       testAbsentAttrs("table6.4", attr);
 
-      // table with abbr element and non-empty text node 
+      // table with abbr element and non-empty text node
       testAttrs("table6.5", attr, true);
 
       // layout table with nested table
       testAttrs("table9", attr, true);
 
       // layout table with 1 column
       testAttrs("table10", attr, true);
 
--- a/accessible/tests/mochitest/table/test_table_2.html
+++ b/accessible/tests/mochitest/table/test_table_2.html
@@ -10,21 +10,21 @@
           src="../common.js"></script>
   <script type="application/javascript"
           src="../role.js"></script>
 
   <script type="text/javascript">
 
 function doTest()
 {
-  // Test table with role=alert. 
+  // Test table with role=alert.
   var tableInterfaceExposed = true;
   var accTable3 = getAccessible("table3", [nsIAccessibleTable], null, DONOTFAIL_IF_NO_INTERFACE);
   if (!accTable3)
-    tableInterfaceExposed = false;  
+    tableInterfaceExposed = false;
   ok(tableInterfaceExposed, "table interface is not exposed");
 
   if (tableInterfaceExposed) {
     testRole(accTable3, ROLE_ALERT);
 
     is(accTable3.getCellAt(0,0).firstChild.name, "cell0", "wrong cell");
     is(accTable3.getCellAt(0,1).firstChild.name, "cell1", "wrong cell");
   }
--- a/accessible/tests/mochitest/test_OuterDocAccessible.html
+++ b/accessible/tests/mochitest/test_OuterDocAccessible.html
@@ -39,33 +39,33 @@ https://bugzilla.mozilla.org/show_bug.cg
 
           // see bug 440770, no actions wanted on outer doc
           is(outerDocAcc.actionCount, 0,
              "Wrong number of actions for internal frame!");
 
           try {
             outerDocAcc.getActionName(0);
             do_throw("No exception thrown for actionName!");
-          } catch(e) {
+          } catch (e) {
             ok(e.result, ns_error_invalid_arg,
                "Wrong return value for actionName call!");
           }
 
           try {
             actionTempStr = outerDocAcc.getActionDescription(0);
             do_throw("No exception thrown for actionDescription!");
-          } catch(e) {
+          } catch (e) {
             ok(e.result, ns_error_invalid_arg,
                "Wrong return value for actionDescription call!");
           }
 
           try {
             outerDocAcc.doAction(0);
             do_throw("No exception thrown for doAction!");
-          } catch(e) {
+          } catch (e) {
             ok(e.result, ns_error_invalid_arg,
                "Wrong return value for doAction call!");
           }
         }
       }
 
       SimpleTest.finish();
     }
--- a/accessible/tests/mochitest/test_nsIAccessibleDocument.html
+++ b/accessible/tests/mochitest/test_nsIAccessibleDocument.html
@@ -56,25 +56,25 @@ https://bugzilla.mozilla.org/show_bug.cg
         // uncomment the below two lines to enable the test.
 //        is(docAcc.docType, "HTML",
 //           "Wrong type of document!");
 
         // Test for correct nsIDOMDocument retrieval.
         var domDoc = null;
         try {
           domDoc = docAcc.DOMDocument.QueryInterface(nsIDOMDocument);
-        } catch(e) {}
+        } catch (e) {}
         ok(domDoc, "no nsIDOMDocument for this doc accessible!");
         is(domDoc, document, "Document nodes do not match!");
 
         // Test for correct nsIDOMWindow retrieval.
         var domWindow = null;
         try {
           domWindow = docAcc.window.QueryInterface(nsIDOMWindow);
-        } catch(e) {}
+        } catch (e) {}
         ok(domWindow, "no nsIDOMWindow for this doc accessible!");
         is(domWindow, window, "Window nodes do not match!");
       }
 
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
--- a/accessible/tests/mochitest/test_nsIAccessibleImage.html
+++ b/accessible/tests/mochitest/test_nsIAccessibleImage.html
@@ -43,25 +43,25 @@ https://bugzilla.mozilla.org/show_bug.cg
       if (parentY.value < 0)
         parentY.value = -1;
 
       // See if asking image for child at image's screen coordinates gives
       // correct accessible. getChildAtPoint operates on screen coordinates.
       var tempAcc = null;
       try {
         tempAcc = aAcc.getChildAtPoint(screenX.value, screenY.value);
-      } catch(e) {}
+      } catch (e) {}
       is(tempAcc, aAcc,
          "Wrong accessible returned for position of " + aID + "!");
 
       // get image's parent.
       var imageParentAcc = null;
       try {
         imageParentAcc = aAcc.parent;
-      } catch(e) {}
+      } catch (e) {}
       ok(imageParentAcc, "no parent accessible for " + aID + "!");
 
       if (imageParentAcc) {
         // See if parent's screen coordinates plus image's parent relative
         // coordinates equal to image's screen coordinates.
         var parentAccX = {}, parentAccY = {}, parentAccWidth = {},
             parentAccHeight = {};
         imageParentAcc.getBounds(parentAccX, parentAccY, parentAccWidth,
--- a/accessible/tests/mochitest/textattrs/test_general.html
+++ b/accessible/tests/mochitest/textattrs/test_general.html
@@ -548,17 +548,17 @@
        //////////////////////////////////////////////////////////////////////////
       // area19, "HTML5 mark tag" test
       // text enclosed in mark tag will have a different background color
       ID = "area19";
       defAttrs = buildDefaultTextAttrs(ID, "12pt");
 
       attrs = {};
       testTextAttrs(ID, 0, attrs, defAttrs, 0, 10);
-      
+    
       tempElem = getNode(ID).firstChild.nextSibling;
       gComputedStyle = document.defaultView.getComputedStyle(tempElem);
       attrs = { "background-color": gComputedStyle.backgroundColor };
       testTextAttrs(ID, 11, attrs, defAttrs, 10, 17);
 
       attrs = {};
       testTextAttrs(ID, 18, attrs, defAttrs, 17, 28);
 
--- a/accessible/tests/mochitest/tree/test_brokencontext.html
+++ b/accessible/tests/mochitest/tree/test_brokencontext.html
@@ -65,17 +65,17 @@
 
     // HTML table display:inline inside table. We shouldn't be fooled
     // by the outside table and shouldn't create table accessible and table cell
     // accessible in this case.
     checkIfNotAccessible("inline_table2");
     checkIfNotAccessible("tr_in_inline_table2");
     checkIfTDGeneric("td_in_inline_table2");
 
-    // HTML table display:block inside table. 
+    // HTML table display:block inside table.
     checkIfNotAccessible("block_table");
     checkIfNotAccessible("tr_in_block_table");
     checkIfTDGeneric("td_in_block_table");
 
     ////////////////////////////////////////////////////////////////////////////
     // HTML list elements outside list context.
 
     ok(!isAccessible("presentation_ul"),
--- a/accessible/tests/mochitest/tree/test_txtctrl.html
+++ b/accessible/tests/mochitest/tree/test_txtctrl.html
@@ -68,17 +68,17 @@
           {
             role: ROLE_TEXT_LEAF,
             children: []
           }
         ]
       };
 
       testAccessibleTree("txc5", accTree);
-      
+    
       // input@type="tel", value
       accTree = {
         role: ROLE_ENTRY,
         children: [
           { // text child
             role: ROLE_TEXT_LEAF,
             children: []
           }
--- a/accessible/tests/mochitest/treeupdate/test_table.html
+++ b/accessible/tests/mochitest/treeupdate/test_table.html
@@ -31,20 +31,20 @@
       this.eventSeq = [
         new invokerChecker(EVENT_REORDER, aTableID)
       ];
 
       this.finalCheck = function appendCaption_finalCheck()
       {
         var tree =
           { TABLE: [
-            { CAPTION: [ 
+            { CAPTION: [
               { TEXT_LEAF: [] }
             ] },
-            { ROW: [ 
+            { ROW: [
               { CELL: [ {TEXT_LEAF: [] }]},
               { CELL: [ {TEXT_LEAF: [] }]}
             ] }
           ] };
         testAccessibleTree(aTableID, tree);
       }
 
       this.getID = function appendCaption_getID()
--- a/accessible/tests/mochitest/treeview.js
+++ b/accessible/tests/mochitest/treeview.js
@@ -143,17 +143,17 @@ nsTreeView.prototype =
   isSorted: function isSorted() {},
   toggleOpenState: function toggleOpenState(aIndex)
   {
     var data = this.getDataForIndex(aIndex);
 
     data.open = !data.open;
     var rowCount = this.getRowCountIntl(data.children);
 
-    if (data.open) 
+    if (data.open)
       this.mTree.rowCountChanged(aIndex + 1, rowCount);
     else
       this.mTree.rowCountChanged(aIndex + 1, -rowCount);
   },
   selectionChanged: function selectionChanged() {},
   cycleHeader: function cycleHeader(aCol) {},
   cycleCell: function cycleCell(aRow, aCol)
   {
@@ -213,17 +213,17 @@ nsTreeView.prototype =
   },
 
   getRowCountIntl: function getRowCountIntl(aChildren)
   {
     var rowCount = 0;
     for (var childIdx = 0; childIdx < aChildren.length; childIdx++) {
       rowCount++;
 
-      var data = aChildren[childIdx];      
+      var data = aChildren[childIdx];
       if (data.open)
         rowCount += this.getRowCountIntl(data.children);
     }
 
     return rowCount;
   },
 
   getInfoByIndexIntl: function getInfoByIndexIntl(aRowIdx, aInfo,