зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1812493 - Make the test wait for "load" of iframe if it's not yet ended r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D170029
This commit is contained in:
Родитель
b3bf09cc0d
Коммит
48306992dd
|
@ -12,8 +12,15 @@
|
|||
"use strict";
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(() => {
|
||||
SimpleTest.waitForFocus(async () => {
|
||||
const iframe = document.querySelector("iframe");
|
||||
await new Promise(resolve => {
|
||||
if (iframe.contentDocument?.readyState == "complete") {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
iframe.addEventListener("load", resolve, {once: true});
|
||||
});
|
||||
|
||||
function testInDiv() {
|
||||
const inPlaintextMode = getEditor(window).flags & SpecialPowers.Ci.nsIEditor.eEditorPlaintextMask;
|
||||
|
|
Загрузка…
Ссылка в новой задаче