Bug 1373444 - Look for NoSuchWindowException when waiting for manual browser close in wpt, r=maja_zf

This method works by running a long-running script and catching the exception when
it is interrupted. But the exception changed so we must make a corresponding change here.

MozReview-Commit-ID: EdZZAOVZ0Sw
This commit is contained in:
James Graham 2017-08-31 16:12:26 +01:00
Родитель 3426b3a38a
Коммит 418e807fea
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -180,6 +180,9 @@ class MarionetteProtocol(Protocol):
while True:
try:
self.marionette.execute_async_script("")
except errors.NoSuchWindowException:
# The window closed
break
except errors.ScriptTimeoutException:
self.logger.debug("Script timed out")
pass
@ -187,7 +190,7 @@ class MarionetteProtocol(Protocol):
self.logger.debug("Socket closed")
break
except Exception as e:
self.logger.error(traceback.format_exc(e))
self.logger.warning(traceback.format_exc(e))
break
def on_environment_change(self, old_environment, new_environment):