Closed Bug 1514115 Opened 9 months ago Closed 8 months ago
[wpt-sync] Sync PR 14514 - [wptrunner] Correct support for eager page loading
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 <firstname.lastname@example.org> 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 email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/99367c132437 [wpt PR 14514] - [wptrunner] Correct support for eager page loading, a=testonly
You need to log in before you can comment on or make changes to this bug.