Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json-module/parse-error.html tests implementation-defined filename property on error event #933

Open
dandclark opened this issue Feb 27, 2025 · 3 comments
Labels
focus area: Modules test-change-proposal Proposal to add or remove tests for an interop area

Comments

@dandclark
Copy link
Contributor

dandclark commented Feb 27, 2025

Test List

https://wpt.fyi/results/html/semantics/scripting-1/the-script-element/json-module/parse-error.html?label=master&label=experimental&aligned&q=label%3Ainterop-2025-modules

Rationale

This test checks some details of an ErrorEvent thrown when an imported JSON module has a syntax error.

assert_true(e instanceof ErrorEvent, "ErrorEvent");
assert_equals(e.filename, new URL("parse-error.json", location).href);
assert_true(e.error instanceof SyntaxError, "SyntaxError");

But, the value of the filename property is implementation-defined. See https://html.spec.whatwg.org/#report-an-exception and https://html.spec.whatwg.org/#extract-error.

All browsers currently fail this test. The check for filename should be removed, or maybe the test should be removed from the focus area.

@dandclark dandclark added the test-change-proposal Proposal to add or remove tests for an interop area label Feb 27, 2025
@nt1m
Copy link
Member

nt1m commented Mar 5, 2025

Seems fine to me.

@zcorpan
Copy link
Member

zcorpan commented Mar 6, 2025

cc @allstarschh @jgraham

@allstarschh
Copy link

allstarschh commented Mar 6, 2025

cc @allstarschh

LGTM, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus area: Modules test-change-proposal Proposal to add or remove tests for an interop area
Projects
None yet
Development

No branches or pull requests

4 participants