mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 753273 - Wait for window and browser at the start of newSession, r=mdas, a=test-only, DONTBUILD because NPOTB
This commit is contained in:
parent
eaf20f3009
commit
bda6cf19b6
@ -336,8 +336,21 @@ MarionetteDriverActor.prototype = {
|
||||
*
|
||||
*/
|
||||
newSession: function MDA_newSession() {
|
||||
|
||||
function waitForWindow() {
|
||||
let checkTimer = Cc["@mozilla.org/timer;1"].
|
||||
createInstance(Ci.nsITimer);
|
||||
let win = this.getCurrentWindow();
|
||||
if (!win || (appName != "B2G" && !win.gBrowser)) {
|
||||
checkTimer.initWithCallback(waitForWindow.bind(this), 100, Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
}
|
||||
else {
|
||||
this.startBrowser(win, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (!prefs.getBoolPref("marionette.contentListener")) {
|
||||
this.startBrowser(this.getCurrentWindow(), true);
|
||||
waitForWindow.call(this);
|
||||
}
|
||||
else if ((appName == "B2G") && (this.curBrowser == null)) {
|
||||
//if there is a content listener, then we just wake it up
|
||||
|
Loading…
Reference in New Issue
Block a user