Closed Bug 1861690 Opened 8 months ago Closed 8 months ago

Browser sometimes closes when test is reloaded with `--pause-after-test`

Categories

(Testing :: web-platform-tests, defect)

defect

Tracking

(firefox121 fixed)

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: jgraham, Assigned: jgraham)

Details

Attachments

(1 file)

This appears to be a race condition with trying to run the "wait" webdriver script.

With --pause-after-test WebDriver runs a script and waits for an
exception that indicates the test window closed.

However this is problematic on reload because the navigation also
interrupts the script. We handle a JavascriptException by trying to
rerun the script, but if the reload is slow (e.g. in a debug build) we
can be trying to run the script in a window where the marionette
JSWindowActors are not yet loaded. In that case marionette arbitarily
returns null as the script result.

To handle this case, if we get a result for the script, check if it's
null and if it is just rerun rather than exiting.

Assignee: nobody → james
Status: NEW → ASSIGNED
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/autoland/rev/49ec04348186
Fix race condition with reloads in --pause-after-test, r=Sasha
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/42838 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
Upstream PR was closed without merging
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: