Bug 1683340 - Enable ESLint rule no-async-promise-executor for the remaining dom/ files. r=nika

Depends on D100135

Differential Revision: https://phabricator.services.mozilla.com/D100136
This commit is contained in:
Mark Banner 2020-12-18 18:31:21 +00:00
Родитель 7fcb23f319
Коммит 098cf85cdd
3 изменённых файлов: 3 добавлений и 13 удалений

Просмотреть файл

@ -317,16 +317,6 @@ module.exports = {
"no-with": "off",
},
},
{
files: [
"dom/l10n/tests/mochitest/document_l10n/non-system-principal/test.html",
"dom/tests/browser/browser_persist_cookies.js",
"dom/tests/browser/browser_persist_mixed_content_image.js",
],
rules: {
"no-async-promise-executor": "off",
},
},
{
files: [
"testing/mochitest/browser-harness.xhtml",

Просмотреть файл

@ -5,7 +5,7 @@
<title>Test DocumentL10n in HTML environment</title>
<link rel="localization" href="test.ftl"/>
<script type="text/javascript">
document.testsReadyPromise = new Promise(async (resolve) => {
document.testsReadyPromise = new Promise((resolve) => {
// The test is in this file to ensure that we're testing
// the behavior in a non-system principal.
document.addEventListener("DOMContentLoaded", async () => {

Просмотреть файл

@ -105,8 +105,8 @@ add_task(async function() {
info("done showCallback");
};
saveBrowser(browser);
await new Promise(async (resolve, reject) => {
let dls = await Downloads.getList(Downloads.PUBLIC);
let dls = await Downloads.getList(Downloads.PUBLIC);
await new Promise((resolve, reject) => {
dls.addView({
onDownloadChanged(download) {
if (download.succeeded) {