Closed Bug 2006814 Opened 5 months ago Closed 1 month ago

[wpt-sync] Sync PR 56841 - feat(serve): Add server-side handlers for Test262 tests

Categories

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

task

Tracking

(firefox151 fixed)

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

wpt-pr-bot <wpt-pr-bot@users.noreply.github.com> wrote:

feat(serve): Add server-side handlers for Test262 tests

This commit introduces the necessary server-side handlers within wptserve to dynamically generate HTML wrappers for Test262 JavaScript tests. This is needed to enable Test262 execution within WPT.

Key changes and their purpose:

  • Introduction of several new HtmlWrapperHandler and WrapperHandler subclasses (e.g., Test262WindowHandler, Test262WindowTestHandler, Test262StrictHandler). These handlers are responsible for:
    • Identifying Test262 test requests based on URL patterns.
    • Dynamically constructing an HTML page that loads the Test262 .js test file within an isolated iframe.
    • Injecting the required Test262 harness files (assert.js, sta.js) and the WPT-specific testharness-client.js and harness-adapter.js into the generated HTML.
    • Processing Test262-specific metadata (like includes and negative expectations) extracted by the manifest tooling from PR 1 (#56840 .
  • Updates to RoutesBuilder in serve.py to map incoming requests for Test262 test URLs to the appropriate new handler.
  • Unit tests in test_serve.py to validate the correct behavior of these new handlers, including URL rewriting, metadata processing, and the structure of the generated HTML wrappers.

This work directly supports the integration of Test262 into WPT as detailed in the RFC: https://github.com/web-platform-tests/rfcs/pull/229

This commit is the second in a series of smaller PRs split from the larger, original implementation in https://github.com/web-platform-tests/wpt/pull/55997.

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
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://github.com/mozilla-firefox/firefox/commit/3003b3bf5a71 https://hg.mozilla.org/integration/autoland/rev/b823a220244c [wpt PR 56841] - feat(serve): Add server-side handlers for Test262 tests [pt 2/5], a=testonly
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
Test result changes from PR not available.
You need to log in before you can comment on or make changes to this bug.