Area: url / html/dom
Summary
The HTMLHyperlinkElementUtils username/password accessors on <a>/<area> are stubbed to a static empty string rather than derived from the element's parsed href, so the userinfo never round-trips.
FAIL url/a-element.html
— Parsing: <http://user:pass@foo:21/bar;par?b#c> against <http://example.org/foo/bar>:
assert_equals: username expected "user" but got ""
In crates/js/src/bootstrap/browser_env.js, the URL-decomposition accessors (protocol/host/pathname/…) are wired to the parsed href via __defUrlPart, but username/password fall through to def(el, "username", "") / def(el, "password", "") — plain empty-string properties with no getter/setter.
Expected
Per HTML §dom-hyperlink-username / §dom-hyperlink-password: the getters return the resolved URL's username/password, and the setters percent-encode the value into the URL's userinfo and reserialize (no-op when the URL has no host / cannot have userinfo). The parser already extracts and serializes userinfo correctly — only these two accessors need wiring up, analogous to the existing __defUrlPart entries.
Good first issue
cargo run --release -p wpt-runner -- ./wpt url/a-element.html 1000
Area:
url/html/domSummary
The
HTMLHyperlinkElementUtilsusername/passwordaccessors on<a>/<area>are stubbed to a static empty string rather than derived from the element's parsed href, so the userinfo never round-trips.In
crates/js/src/bootstrap/browser_env.js, the URL-decomposition accessors (protocol/host/pathname/…) are wired to the parsed href via__defUrlPart, butusername/passwordfall through todef(el, "username", "")/def(el, "password", "")— plain empty-string properties with no getter/setter.Expected
Per HTML §dom-hyperlink-username / §dom-hyperlink-password: the getters return the resolved URL's username/password, and the setters percent-encode the value into the URL's userinfo and reserialize (no-op when the URL has no host / cannot have userinfo). The parser already extracts and serializes userinfo correctly — only these two accessors need wiring up, analogous to the existing
__defUrlPartentries.Good first issue