Repository navigation
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
commit: |
This was referenced Nov 17, 2026
cowboyd
marked this pull request as ready for review
November 17, 2026 05:22
This was referenced Nov 17, 2026
cowboyd
force-pushed
the
dom-default-view
branch
2 times, most recently
from
November 17, 2026 21:59
3c336fc to
f0a04b3
Compare
cowboyd
added a commit
that referenced
this pull request
Nov 17, 2026
## What does this PR do? See #87 for the endgame. We want to run WPT test cases directly without any changes to the upstream and without hosting hundreds approximations of those tests in our repository. Those files create additional documents and doctypes during shared setup, so the implementation needs those factories before the harness can execute them directly. Add [`DocumentType`](https://dom.spec.whatwg.org/#interface-documenttype), [`DOMImplementation.createDocumentType()`](https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype), and [`createHTMLDocument()`](https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument). HTML creation supplies a doctype, `<html>`, `<head>`, an optional `<title>`, and `<body>`. Bare documents start empty; `documentElement`, `doctype`, `head`, and `body` reflect the current tree. UI construction uses the HTML factory. ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor (no behavior change) - [ ] Documentation - [ ] Performance improvement - [ ] Tests - [ ] Chore (dependencies, CI, tooling) ## Checklist - [ ] I have added a changeset ## AI-generated code disclosure - [x] This PR includes AI-generated code
cowboyd
force-pushed
the
dom-default-view
branch
from
November 17, 2026 22:01
f0a04b3 to
dac2035
Compare
3 of 9 tasks
natemoo-re
reviewed
Nov 18, 2026
natemoo-re
left a comment
Member
There was a problem hiding this comment.
Would love to give the test adapter another review tomorrow!
| "format": "bsh format", | ||
| "lint": "bsh lint", | ||
| "test": "pnpm --filter @bomb.sh/web-platform-tests build && bsh test" | ||
| "test": "pnpm --filter @bomb.sh/web-platform-tests build && bsh test && wpt" |
Member
There was a problem hiding this comment.
We could use pnpm tasks to automatically run build before test
2 of 9 tasks
cowboyd
force-pushed
the
dom-default-view
branch
from
November 18, 2026 02:41
d829470 to
6b8f53b
Compare
cowboyd
added a commit
that referenced
this pull request
Nov 18, 2026
## What does this PR do? See #87 for the endgame. We want to run WPT test cases directly without any changes to the upstream and without hosting hundreds approximations of those tests in our repository. `Document-createAttribute.html` and `Node-textContent.html` create XML documents during shared setup, before their selected cases run. Implement [`DOMImplementation.createDocument()`](https://dom.spec.whatwg.org/#dom-domimplementation-createdocument), returning an [`XMLDocument`](https://dom.spec.whatwg.org/#xmldocument) with an optional namespaced root and doctype. Convert and validate the factory arguments so upstream setup can use the implementation directly. ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor (no behavior change) - [ ] Documentation - [ ] Performance improvement - [ ] Tests - [ ] Chore (dependencies, CI, tooling) ## Checklist - [ ] I have added a changeset ## AI-generated code disclosure - [x] This PR includes AI-generated code
cowboyd
force-pushed
the
dom-default-view
branch
from
November 18, 2026 02:43
6b8f53b to
db70c94
Compare
cowboyd
added a commit
that referenced
this pull request
Nov 18, 2026
## What does this PR do? See #87 for the endgame. We want to run WPT test cases directly without any changes to the upstream and without hosting hundreds approximations of those tests in our repository. The element-creation files use `document.querySelector()` to locate iframe fixtures during shared setup, even when only their HTML-document cases are selected. Add [`Document.querySelector()`](https://dom.spec.whatwg.org/#dom-parentnode-queryselector) through the css-select adapter, returning the first match or `null` and converting selector compilation errors to `SyntaxError`. The adapter is reused unchanged from the earlier selector work. See the DOM specification's [scope-matching algorithm](https://dom.spec.whatwg.org/#scope-match-a-selectors-string). ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor (no behavior change) - [ ] Documentation - [ ] Performance improvement - [ ] Tests - [ ] Chore (dependencies, CI, tooling) ## Checklist - [ ] I have added a changeset ## AI-generated code disclosure - [x] This PR includes AI-generated code
cowboyd
force-pushed
the
dom-default-view
branch
from
November 18, 2026 02:44
db70c94 to
f7077a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Run original Web Platform Test HTML files through Vitest file transforms, replacing the adapted TypeScript suite.
Consumers integrate through a single
wpt.config.tssupplying a document factory, globals, and case selection.Each upstream file runs in a fresh Node worker and appears as a separate test file. The worker loads the consumer configuration, then runs its DOM implementation and the upstream scripts in the same JavaScript realm, so native and implementation-thrown errors share constructors and prototypes. The harness populates HTML through parse5, executes scripts and helpers in source order, and uses upstream
testharness.jsfor assertions and scheduling. The harness supplieswindow.document, attachesdocument.defaultView, and delivers windowloadafter the scripts finish.The fixture also supplies live Window named properties through a proxy in the worker global's prototype chain. Single-element IDs and eligible HTML names resolve against the current document tree; existing globals take precedence. Multiple matches requiring live collections and child browsing-context names remain unsupported.
The runner terminates the worker after each file. Timeouts include worker startup and configuration loading; a parent watchdog allows 250 ms for ordinary timeout results before terminating an unresponsive worker. Consumer configurations do not need to override standard error constructors.
Every subtest in a selected file executes to preserve shared state; selection filters only the reported results. Browser navigation and parser-driven script timing remain unsupported. Window event delegation currently requires extensible event objects.
Type of change
Checklist
AI-generated code disclosure