зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1517796 - [wpt] Correctly dismiss user prompts in MarionetteTestharnessProtocolPart._close_windows(). r=jgraham
Using the "Switch To Window" command to check if a user prompt is open doesn't work because that command doesn't raise a "unexpected alert open" error. To fix that the "Close Window" command can be used for. Differential Revision: https://phabricator.services.mozilla.com/D15816 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
bc591d2d2c
Коммит
4d57d56819
|
@ -157,10 +157,9 @@ class MarionetteTestharnessProtocolPart(TestharnessProtocolPart):
|
|||
|
||||
for handle in handles:
|
||||
try:
|
||||
self.dismiss_alert(lambda: self.marionette.switch_to_window(handle))
|
||||
self.marionette.switch_to_window(handle)
|
||||
self.logger.info("Closing window %s" % handle)
|
||||
self.marionette.close()
|
||||
self.marionette.switch_to_window(handle)
|
||||
self.dismiss_alert(lambda: self.marionette.close())
|
||||
except errors.NoSuchWindowException:
|
||||
# We might have raced with the previous test to close this
|
||||
# window, skip it.
|
||||
|
|
Загрузка…
Ссылка в новой задаче