mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1543549 - Only switch_to_window() if we have a handle to it. r=jgraham
On android wpt reftests, the window handles list is empty, so we can't use it to switch to a window. Not doing this in that case doesn't seem to break anything, and not doing it in that case prevents the IndexError from being logged to the error log. Differential Revision: https://phabricator.services.mozilla.com/D27177 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
7af4153e81
commit
a57c781b04
@ -897,7 +897,8 @@ class InternalRefTestImplementation(RefTestImplementation):
|
||||
# with after closing a window we need to give a new window
|
||||
# focus
|
||||
handles = self.executor.protocol.marionette.window_handles
|
||||
self.executor.protocol.marionette.switch_to_window(handles[0])
|
||||
if handles:
|
||||
self.executor.protocol.marionette.switch_to_window(handles[0])
|
||||
except Exception as e:
|
||||
# Ignore errors during teardown
|
||||
self.logger.warning(traceback.format_exc(e))
|
||||
|
Loading…
Reference in New Issue
Block a user