зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1463739 - [marionette] Move check for loaded state of reftest window to base reftest code. r=jgraham
While using openDialog() with the extra parameters for passing in the callback to resolve is fine, it adds extra complexity. The base reftest code in Marionette itself should better handle that. MozReview-Commit-ID: AtOV3LevK1c --HG-- extra : rebase_source : 2a32617abf2e33d520b37d186285db6d04657965
This commit is contained in:
Родитель
b859ba2c68
Коммит
1651ca60c9
|
@ -95,13 +95,13 @@ reftest.Runner = class {
|
|||
}
|
||||
|
||||
async openWindow() {
|
||||
let reftestWin;
|
||||
let reftestWin = this.parentWindow.open(
|
||||
"chrome://marionette/content/reftest.xul",
|
||||
"reftest",
|
||||
"chrome,dialog,height=600,width=600");
|
||||
|
||||
await new Promise(resolve => {
|
||||
reftestWin = this.parentWindow.openDialog(
|
||||
"chrome://marionette/content/reftest.xul",
|
||||
"reftest",
|
||||
"chrome,dialog,height=600,width=600,all",
|
||||
resolve);
|
||||
reftestWin.addEventListener("load", resolve, {once: true});
|
||||
});
|
||||
|
||||
let browser = reftestWin.document.createElementNS(XUL_NS, "xul:browser");
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
<window id="reftest" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="window.arguments[0]()"></window>
|
||||
<window id="reftest" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
</window>
|
Загрузка…
Ссылка в новой задаче