[wpt-sync] Sync PR 35720 - Navigation rewrite: Add invalid URL test
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Depends on 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 35720 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/35720
Details from upstream follow.
Dominic Farolino <dom@chromium.org> wrote:
Navigation rewrite: Add invalid URL test
According to today's HTML Standard for the
location.href
setter 1,
and the standard after our navigation and session history rewrite for
hyperlinks 2, navigations to invalid URLs should throw TypeErrors and
do nothing, respectively.Testing this is tracked as row 3 [3] in our testing spreadsheet, and
this CL adds tests for these cases.At the time of writing this CL, browsers are behaving as follows:
Location setter:
- Chrome: Throws a SyntaxError
- Safari: Throws a TypeError (CORRECT)
- Firefox: Throws a "NS_ERROR_MALFORMED_URI" which is not even an
instanceof Error
Hyperlink navigations:
- Chrome: Invokes #navigate --> ends up on about:blank#blocked
- Safari: Similar, but changes the URL back to the unparseable URL
- Firefox: Does nothing (CORRECT)
Chrome's behavior is trivial to fix for both of these, which would give us every browser except one aligned with the spec.
Bug: 1358338, 1358340
Change-Id: Ia39329e5570e1502e30e2f4af610c3702f8bade5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3866312
Commit-Queue: Dominic Farolino \<dom@chromium.org>
Reviewed-by: Domenic Denicola \<domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1041518}
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Safari on GitHub CI
Total 1 tests and 2 subtests
Status Summary
Firefox
OK
: 1
PASS
: 1
FAIL
: 1
Safari
OK
: 1
PASS
: 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html [wpt.fyi]
- location.href setter throws a TypeError for unparseable URLs:
FAIL
(Safari:PASS
)
- location.href setter throws a TypeError for unparseable URLs:
Comment 4•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/501858cddf18
https://hg.mozilla.org/mozilla-central/rev/f85804b19dc3
Description
•