Closed Bug 1761169 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 33338 - Implement experimental support for injecting a polyfill into wpt tests.

Categories

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

task

Tracking

(firefox102 fixed)

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Robert Flack <flackr@chromium.org> wrote:

Implement experimental support for injecting a polyfill into wpt tests.

Adds the --polyfill argument to wpt serve which will inject the given
polyfill into all html files (i.e. tests).

Example:
./wpt serve --polyfill=https://flackr.github.io/scroll-timeline/dist/scroll-timeline.js

This will inject the scroll timeline polyfill into all loaded html tests which allows testing the scroll timeline polyfill against the tests in wpt for scroll timeline. I'm almost certain there are better ways to implement this but I figured this PR could help get the discussion started around how to support testing polyfills against wpt.

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e65a3fdcdf58
[wpt PR 33338] - Implement support for injecting a polyfill into wpt tests., a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.