зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1602069 - Enable ESLint no-undef rule for accessible/test/mochitest js files. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D56230 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b1af3a7da0
Коммит
fffa61b7b3
|
@ -6,6 +6,15 @@ module.exports = {
|
|||
// disabled here due to failures when initially implemented. They should be
|
||||
// removed (and hence enabled) at some stage.
|
||||
"no-nested-ternary": "off",
|
||||
"no-undef": "off",
|
||||
}
|
||||
},
|
||||
|
||||
"overrides": [{
|
||||
"files": [
|
||||
"*.xhtml",
|
||||
"*.html",
|
||||
],
|
||||
"rules": {
|
||||
"no-undef": "off",
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/* import-globals-from common.js */
|
||||
/* import-globals-from events.js */
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// Event constants
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* import-globals-from common.js */
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// Object attributes.
|
||||
|
||||
|
@ -268,6 +270,8 @@ function testTextAttrsWrongOffset(aID, aOffset) {
|
|||
try {
|
||||
var s = {},
|
||||
e = {};
|
||||
// Bug 1602031
|
||||
// eslint-disable-next-line no-undef
|
||||
var acc = getAccessible(ID, [nsIAccessibleText]);
|
||||
acc.getTextAttributes(false, 157, s, e);
|
||||
} catch (ex) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* import-globals-from common.js */
|
||||
|
||||
var { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
// This file has circular dependencies that may require other files. Rather
|
||||
// than use import-globals-from, we list the globals individually here to save
|
||||
// confusing ESLint.
|
||||
// actions.js
|
||||
/* globals testActionNames */
|
||||
// attributes.js
|
||||
/* globals testAttrs, testAbsentAttrs, testTextAttrs */
|
||||
// relations.js
|
||||
/* globals testRelation */
|
||||
// role.js
|
||||
/* globals isRole */
|
||||
// state.js
|
||||
/* globals testStates */
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// Interfaces
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/* import-globals-from ../common.js */
|
||||
/* import-globals-from ../events.js */
|
||||
|
||||
/**
|
||||
* Perform all editable text tests.
|
||||
*/
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/* import-globals-from common.js */
|
||||
/* import-globals-from states.js */
|
||||
/* import-globals-from text.js */
|
||||
|
||||
// XXX Bug 1425371 - enable no-redeclare and fix the issues with the tests.
|
||||
/* eslint-disable no-redeclare */
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* import-globals-from common.js */
|
||||
|
||||
/**
|
||||
* Create grid object based on HTML table.
|
||||
*/
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/* import-globals-from ../common.js */
|
||||
/* import-globals-from ../events.js */
|
||||
/* import-globals-from ../states.js */
|
||||
|
||||
/**
|
||||
* Focus hyperlink invoker.
|
||||
*
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* import-globals-from common.js */
|
||||
|
||||
/**
|
||||
* Tests if the given child and grand child accessibles at the given point are
|
||||
* expected.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* import-globals-from common.js */
|
||||
|
||||
/**
|
||||
* Test accessible name for the given accessible identifier.
|
||||
*/
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/* import-globals-from ../attributes.js */
|
||||
/* import-globals-from ../common.js */
|
||||
/* import-globals-from ../events.js */
|
||||
/* import-globals-from ../name.js */
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// Name tests described by "markuprules.xml" file.
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
/* import-globals-from common.js */
|
||||
/* import-globals-from events.js */
|
||||
/* import-globals-from role.js */
|
||||
/* import-globals-from states.js */
|
||||
/* import-globals-from text.js */
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* import-globals-from common.js */
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// Constants
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* import-globals-from common.js */
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// Role constants
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/* import-globals-from common.js */
|
||||
/* import-globals-from states.js */
|
||||
|
||||
/**
|
||||
* Test selection getter methods of nsIAccessibleSelectable.
|
||||
*
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
// role.js
|
||||
//
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
/* import-globals-from common.js */
|
||||
/* import-globals-from role.js */
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// State constants
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
* role.js
|
||||
* states.js
|
||||
*/
|
||||
/* import-globals-from common.js */
|
||||
/* import-globals-from role.js */
|
||||
/* import-globals-from states.js */
|
||||
|
||||
/**
|
||||
* Constants used to describe cells array.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* import-globals-from common.js */
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// Public
|
||||
|
||||
|
@ -320,7 +322,7 @@ function testWordAt(aElement, aWordIndex, aText, aToDoFlag) {
|
|||
var wordIdx = aWordIndex;
|
||||
var startOffsetObj = { value: 0 },
|
||||
endOffsetObj = { value: 0 };
|
||||
for (offset = 0; offset < textLength; offset = endOffsetObj.value) {
|
||||
for (let offset = 0; offset < textLength; offset = endOffsetObj.value) {
|
||||
acc.getTextAtOffset(
|
||||
offset,
|
||||
BOUNDARY_WORD_START,
|
||||
|
@ -375,7 +377,7 @@ function testWordAt(aElement, aWordIndex, aText, aToDoFlag) {
|
|||
return;
|
||||
}
|
||||
|
||||
text = acc.getText(startWordOffset, endWordOffset);
|
||||
let text = acc.getText(startWordOffset, endWordOffset);
|
||||
isFunc(
|
||||
text,
|
||||
aText,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/* import-globals-from common.js */
|
||||
/* import-globals-from events.js */
|
||||
|
||||
/**
|
||||
* Helper method to start a single XUL tree test.
|
||||
*/
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* import-globals-from common.js */
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////////////
|
||||
// Public methods
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче