зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1299587 - Handle if marionette tests can't focus mainFrame in tearDown. r=automatedtester
It's possible the mainFrame has already been closed in which case it can become a dead wrapper. Just gracefully handle failure in this situation.
This commit is contained in:
Родитель
4061321fa2
Коммит
6a06f03938
|
@ -2268,7 +2268,12 @@ GeckoDriver.prototype.sessionTearDown = function(cmd, resp) {
|
|||
// reset frame to the top-most frame
|
||||
this.curFrame = null;
|
||||
if (this.mainFrame) {
|
||||
this.mainFrame.focus();
|
||||
try {
|
||||
this.mainFrame.focus();
|
||||
}
|
||||
catch (e) {
|
||||
this.mainFrame = null;
|
||||
}
|
||||
}
|
||||
|
||||
this.sessionId = null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче