Bug 1561435 - Fix linting errors for accessible/, r=standard8
authorVictor Porof <vporof@mozilla.com>
Fri, 28 Jun 2019 19:38:45 +0200
changeset 481364 e78cfc62325608065dbb0819d2ceecf38fb0e233
parent 481363 59f51c65dbf0c25ac557546d970c32648ab5d007
child 481365 fb99af508d47ca0bfecbe0e6be3fc3f998576d63
push id36243
push uservporof@mozilla.com
push dateFri, 05 Jul 2019 14:04:25 +0000
treeherdermozilla-central@041abaa4aa85 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstandard8
bugs1561435
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1561435 - Fix linting errors for accessible/, r=standard8 # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D36408
accessible/tests/mochitest/common.js
accessible/tests/mochitest/relations.js
accessible/tests/mochitest/table.js
--- a/accessible/tests/mochitest/common.js
+++ b/accessible/tests/mochitest/common.js
@@ -347,16 +347,17 @@ function isAccessible(aAccOrElmOrID, aIn
  * Return an accessible that contains the DOM node for the given identifier.
  */
 function getContainerAccessible(aAccOrElmOrID) {
   var node = getNode(aAccOrElmOrID);
   if (!node) {
     return null;
   }
 
+  // eslint-disable-next-line no-empty
   while ((node = node.parentNode) && !isAccessible(node)) {}
   return node ? getAccessible(node) : null;
 }
 
 /**
  * Return root accessible for the given identifier.
  */
 function getRootAccessible(aAccOrElmOrID) {
--- a/accessible/tests/mochitest/relations.js
+++ b/accessible/tests/mochitest/relations.js
@@ -93,16 +93,17 @@ function testRelation(aIdentifier, aRelT
     }
 
     ok(isFound, prettyName(relatedIds[idx]) + " is not a target of" + relDescr);
   }
 
   // Check if all obtained targets are given related accessibles.
   for (let relatedAcc of actualTargets.enumerate(Ci.nsIAccessible)) {
     let idx;
+    // eslint-disable-next-line no-empty
     for (idx = 0; idx < targets.length && relatedAcc != targets[idx]; idx++) {}
 
     if (idx == targets.length) {
       ok(
         false,
         "There is unexpected target" + prettyName(relatedAcc) + "of" + relDescr
       );
     }
--- a/accessible/tests/mochitest/table.js
+++ b/accessible/tests/mochitest/table.js
@@ -187,41 +187,45 @@ function testTableStruct(
   // rows and columns extents
   for (let rowIdx = 0; rowIdx < rowCount; rowIdx++) {
     for (let colIdx = 0; colIdx < colsCount; colIdx++) {
       let celltype = aCellsArray[rowIdx][colIdx];
       if (celltype & kOrigin) {
         // table getRowExtentAt
         var rowExtent = table.getRowExtentAt(rowIdx, colIdx);
         let idx;
+        /* eslint-disable no-empty */
         for (
           idx = rowIdx + 1;
           idx < rowCount && aCellsArray[idx][colIdx] & kRowSpanned;
           idx++
         ) {}
+        /* eslint-enable no-empty */
 
         var expectedRowExtent = idx - rowIdx;
         is(
           rowExtent,
           expectedRowExtent,
           "getRowExtentAt: Wrong number of spanned rows at (" +
             rowIdx +
             ", " +
             colIdx +
             ") for " +
             prettyName(aIdentifier)
         );
 
         // table getColumnExtentAt
         var colExtent = table.getColumnExtentAt(rowIdx, colIdx);
+        /* eslint-disable no-empty */
         for (
           idx = colIdx + 1;
           idx < colsCount && aCellsArray[rowIdx][idx] & kColSpanned;
           idx++
         ) {}
+        /* eslint-enable no-empty */
 
         var expectedColExtent = idx - colIdx;
         is(
           colExtent,
           expectedColExtent,
           "getColumnExtentAt: Wrong number of spanned columns at (" +
             rowIdx +
             ", " +