Bug 1797858 - Don't leave test without content task promise resolved. r=Jamie

Differential Revision: https://phabricator.services.mozilla.com/D160575
This commit is contained in:
Eitan Isaacson 2022-10-28 01:13:23 +00:00
Родитель 30033d5abb
Коммит e69880623f
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -16,7 +16,7 @@ addAccessibleTask(
// We don't await for content task to return because
// we want to exercise the untilCacheIs function and
// demonstrate that it can await for a passing `is` test.
invokeContentTask(browser, [], () => {
let contentPromise = invokeContentTask(browser, [], () => {
content.document.getElementById("div").id = "foo";
});
@ -25,6 +25,9 @@ addAccessibleTask(
"foo",
"ID is correct and updated in cache"
);
// Don't leave test without the content task promise resolved.
await contentPromise;
},
{ iframe: true, remoteIframe: true }
);