Closed
Bug 1312675
Opened 8 years ago
Closed 8 years ago
Try to close all open windows after each test
Categories
(Testing :: web-platform-tests, defect)
Testing
web-platform-tests
Tracking
(firefox52 fixed)
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: jgraham, Unassigned)
Details
Attachments
(1 file)
To reduce the possibility of leaking environments.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8804178 [details] Bug 1312675 - Try harder to close existing windows after each testharness test, https://reviewboard.mozilla.org/r/88290/#review87310 Can we see a try run before landing this? ::: testing/web-platform/harness/wptrunner/executors/executormarionette.py:128 (Diff revision 3) > + def set_timeout(self, timeout): > + self.marionette.set_script_timeout(timeout * 1000) > + self.timeout = timeout Document that the `timeout` argument takes seconds. ::: testing/web-platform/harness/wptrunner/executors/executormarionette.py:157 (Diff revision 3) > + try: > + handles.remove(self.runner_handle) > + runner_handle = self.runner_handle > + except ValueError: > + # The runner window probably changed id but we can restore it > + runner_handle = handles[0] It’s not guaranteed by the WebDriver spec that the handles are sorted, but I guess that is the case with Marionette currently… in any case it shouldn’t matter what window you continue with as long as the others are cleaned up. ::: testing/web-platform/harness/wptrunner/executors/executormarionette.py:157 (Diff revision 3) > + runner_handle = handles[0] > + handles = handles[1:] `runner_handle = handles.pop(0)` to do this in one atomic action. ::: testing/web-platform/harness/wptrunner/executors/executormarionette.py:162 (Diff revision 3) > + runner_handle = handles[0] > + handles = handles[1:] > + > + for handle in handles: > + self.marionette.switch_to_window(handle) > + self.marionette.close() FYI I’m currently working on a patch that returns the number of window handles on calling `close()`.
Attachment #8804178 -
Flags: review?(ato) → review+
Reporter | ||
Comment 5•8 years ago
|
||
It was rolled in to https://treeherder.mozilla.org/#/jobs?repo=try&revision=7d501e86a80f21102cc1b8354ddfc74506ed1704&selectedJob=29848776 along with a wpt upgrade, but have a try run with just this patch, post review comment update: https://treeherder.mozilla.org/#/jobs?repo=try&revision=98a9641f680e357c812ffe1719c0d4592269dce9
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/b71ce57f747f Try harder to close existing windows after each testharness test, r=ato
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b71ce57f747f
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•