Closed Bug 1514115 Opened 9 months ago Closed 8 months ago

[wpt-sync] Sync PR 14514 - [wptrunner] Correct support for eager page loading

Categories

(Testing :: web-platform-tests, enhancement, P4)

enhancement

Tracking

(firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 14514 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/14514
Details from upstream follow.

Mike Pennisi <mike@mikepennisi.com> wrote:
>  [wptrunner] Correct support for eager page loading
>  
>  Many reftests schedule behavior to occur when the document reaches the
>  "complete" readyState by setting the `onload` property of the document
>  element.
>  
>  Previously, the automation scripts were written to conditionally defer
>  execution for that event by setting the `onload` property of the global
>  object.
>  
>  The two strategies are mutually exclusive. The sequence of script
>  execution is not controlled, so either consumer of the "load" event
>  could be blocked by the other.
>  
>  Update the automation scripts to register for the event using
>  `addEventListener` in order to avoid unintended interaction with test
>  code.
>  
>  ---
>  
>  This hasn't caused an issue to date because WebDriver's [default page loading strategy](https://w3c.github.io/webdriver/#dfn-table-of-page-load-strategies) pauses until after the "load" event fires. Technically, we could remove the branch altogether. I'm suggesting we fix it instead because it seems preferable to make the infrastructure resilient to bugs in the WebDriver implementation (those will be easier to understand and less disruptive if reported by explicit tests in the WebDriver test suite).
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/99367c132437
[wpt PR 14514] - [wptrunner] Correct support for eager page loading, a=testonly
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.