mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
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:
parent
65fe410cae
commit
3720c020c0
8
editor/composer/test/.eslintrc.js
Normal file
8
editor/composer/test/.eslintrc.js
Normal file
@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/chrome-test",
|
||||
"plugin:mozilla/mochitest-test",
|
||||
]
|
||||
};
|
8
editor/libeditor/tests/.eslintrc.js
Normal file
8
editor/libeditor/tests/.eslintrc.js
Normal file
@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/browser-test",
|
||||
"plugin:mozilla/mochitest-test",
|
||||
]
|
||||
};
|
@ -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) {
|
||||
|
7
editor/spellchecker/tests/.eslintrc.js
Normal file
7
editor/spellchecker/tests/.eslintrc.js
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"plugin:mozilla/mochitest-test"
|
||||
]
|
||||
};
|
Loading…
Reference in New Issue
Block a user