Bug 1489980 - Editor ESLint for editor/ - Initial setup adding configs for tests. r=masayuki

Also block-disables no-multi-spaces for test_resizers_resizing_elements.html

Differential Revision: https://phabricator.services.mozilla.com/D5584

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Banner 2018-09-13 07:57:57 +00:00
parent 65fe410cae
commit 3720c020c0
4 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,8 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/chrome-test",
"plugin:mozilla/mochitest-test",
]
};

View File

@ -0,0 +1,8 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/browser-test",
"plugin:mozilla/mochitest-test",
]
};

View File

@ -118,6 +118,8 @@ SimpleTest.waitForFocus(async function() {
const needlessGrowth = aPreserveRatio ? 1 : 0;
const reversedGrowth = aPreserveRatio ? -1 : 1;
/* eslint-disable no-multi-spaces */
// top resizer
await testResizer(W/2, 0, -10, -10, 0, 10);
await testResizer(W/2, 0, -10, 0, 0, 0);
@ -205,6 +207,8 @@ SimpleTest.waitForFocus(async function() {
await testResizer( 0, 0, 10, -10, -10 * reversedGrowth, 10);
await testResizer( 0, 0, 10, 0, -10 * ignoredGrowth, 0);
await testResizer( 0, 0, 10, 10, -10, -10);
/* eslint-enable no-multi-spaces */
}
const kTests = [
@ -227,7 +231,7 @@ SimpleTest.waitForFocus(async function() {
// Resizers for absolute positioned element and table element are available
// only when enableAbsolutePositionEditing or enableInlineTableEditing is
// enabled for each. So, let's enable them during testing resizers for
// enabled for each. So, let's enable them during testing resizers for
// absolute positioned elements or table elements.
await SpecialPowers.pushPrefEnv({"set": [["editor.resizing.preserve_ratio", false]]});
for (const kTest of kTests) {

View File

@ -0,0 +1,7 @@
"use strict";
module.exports = {
"extends": [
"plugin:mozilla/mochitest-test"
]
};