Closed Bug 1832394 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 39932 - [wptrunner] Allow test window reuse for Chrome

Categories

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

task

Tracking

(firefox116 fixed)

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Jonathan Lee <jonathanjlee@google.com> wrote:

[wptrunner] Allow test window reuse for Chrome

Currently, the base WebDriver testharness executor creates a new window (i.e., tab) for every test. For Chrome controlled via chromedriver, the overhead of creating the window and synchronously polling the remote end until the window's handle loads about:blank is substantial (~0.35s per test).

This change adds a Chrome-specific wptrunner flag --reuse-window to persist and reuse a test window so long as the runner window does not need to be reloaded. To emulate the creation of a new window, the executor navigates to about:blank and clears the navigation history via a Chrome DevTools Protocol call, which has a lower per-test overhead of ~0.07s.

Empirically, in aggregate, this reduces total shard runtime from 135+ min -> 120-125 min with no systemic increases in flakiness [1, 2].

--reuse-window is also useful for debugging the renderer process in multiple tests. When a test window is closed, the underlying renderer process is replaced, which breaks the connection to the debugger.

The existing behavior is preserved without --reuse-window.

[1]: With patch: https://ci.chromium.org/ui/p/chromium/builders/try/linux-wpt-fyi-rel/1877/overview
[2]: Without patch: https://ci.chromium.org/ui/p/chromium/builders/ci/linux-wpt-fyi-rel/41852/overview

PR 39932 applied with additional changes from upstream: 080b865ef9e42c5ce85ab355586c2d087a1bf015, 3cc3f5123a8a092697490c66e6c69cf614523d87, 9c556e5efd9619244e233ede310fc05bdee04380
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c801752f18d7 [wpt PR 39932] - [wptrunner] Allow test window reuse for Chrome, a=testonly
Test result changes from PR not available.
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in before you can comment on or make changes to this bug.