Skip to content

improve wpt harness assertions#6157

Merged
anonrig merged 1 commit intomainfrom
yagiz/improve-wpt-harness-3
Feb 24, 2026
Merged

improve wpt harness assertions#6157
anonrig merged 1 commit intomainfrom
yagiz/improve-wpt-harness-3

Conversation

@anonrig
Copy link
Copy Markdown
Member

@anonrig anonrig commented Feb 24, 2026

No description provided.

@anonrig anonrig requested review from a team as code owners February 24, 2026 18:59
@anonrig anonrig enabled auto-merge (squash) February 24, 2026 18:59
@anonrig anonrig disabled auto-merge February 24, 2026 18:59
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Feb 24, 2026

I've thoroughly reviewed the entire PR. Let me summarize what I found:

  1. assertions.ts changes: Adds codename_name_map, name_code_map, code_name_map lookup tables, an assert_dom helper, and assert_throws_dom_impl -- a reimplementation of the upstream WPT assert_throws_dom logic that handles legacy DOMException code names and provides better error messages. The existing assert_throws_dom is updated to delegate to the new implementation.

  2. websockets-test.ts changes: Removes several expectedFailures entries for tests that were failing because the old implementation didn't handle legacy code names like SYNTAX_ERR. Also converts Close-1005.any.js from disabledTests: true to expectedFailures with a cleanup to prevent hanging.

The code is clean, correctly matches the upstream WPT testharness.js patterns, the == at line 467 is intentional (upstream uses loose equality for DOMException property comparison), and the lookup tables match the WebIDL error names table. The websocket test changes are well-motivated with clear comments.

LGTM

github run

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 24, 2026

Merging this PR will not alter performance

✅ 70 untouched benchmarks
⏩ 129 skipped benchmarks1


Comparing yagiz/improve-wpt-harness-3 (98c1425) with main (de3f468)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@anonrig anonrig force-pushed the yagiz/improve-wpt-harness-3 branch from a8a4a3f to b78951e Compare February 24, 2026 19:55
@anonrig anonrig enabled auto-merge (squash) February 24, 2026 19:57
@anonrig anonrig force-pushed the yagiz/improve-wpt-harness-3 branch from b78951e to 98c1425 Compare February 24, 2026 19:59
@anonrig anonrig merged commit 8bb42fe into main Feb 24, 2026
22 checks passed
@anonrig anonrig deleted the yagiz/improve-wpt-harness-3 branch February 24, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants