зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1332122 - Remove unnecessary wrapper browser.startSession(). r=automatedtester
This wrapper just calls back into the MarionetteDriver, and doesn't have any value. Removing it simplifies the call stack. MozReview-Commit-ID: GH1xUHX12Xi --HG-- extra : rebase_source : a3b9e57e63809c9936fdb2686ad6016339ea7bf7
This commit is contained in:
Родитель
3d5f9194a2
Коммит
d373a550b4
|
@ -234,11 +234,6 @@ browser.Context = class {
|
|||
});
|
||||
}
|
||||
|
||||
/** Called when we start a session with this browser. */
|
||||
startSession(newSession, win, callback) {
|
||||
callback(win, newSession);
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the current tab.
|
||||
*
|
||||
|
|
|
@ -473,8 +473,7 @@ GeckoDriver.prototype.startBrowser = function(win, isNewSession = false) {
|
|||
this.curFrame = null;
|
||||
this.addBrowser(win);
|
||||
this.curBrowser.isNewSession = isNewSession;
|
||||
this.curBrowser.startSession(
|
||||
isNewSession, win, this.whenBrowserStarted.bind(this));
|
||||
this.whenBrowserStarted(win, isNewSession);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -708,8 +707,9 @@ GeckoDriver.prototype.newSession = function* (cmd, resp) {
|
|||
waitForWindow.call(this);
|
||||
} else if (this.appName != "Firefox" && this.curBrowser === null) {
|
||||
// if there is a content listener, then we just wake it up
|
||||
this.addBrowser(this.getCurrentWindow());
|
||||
this.curBrowser.startSession(this.whenBrowserStarted.bind(this));
|
||||
let win = this.getCurrentWindow();
|
||||
this.addBrowser(win);
|
||||
this.whenBrowserStarted(win, false);
|
||||
this.mm.broadcastAsyncMessage("Marionette:restart", {});
|
||||
} else {
|
||||
throw new WebDriverError("Session already running");
|
||||
|
|
Загрузка…
Ссылка в новой задаче