Throw SyntaxError from Location::SetHref (#39051)

It was originally throwing a TypeError, which was making WPT fail.

Testing: Many happy WPT subtests
Fixes: #39050

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Co-authored-by: Sam <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Ashwin Naren 2025-09-02 10:19:10 -07:00 committed by GitHub
parent 47551fc6fa
commit b0b70ec6b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 10 additions and 610 deletions

View file

@ -1,3 +0,0 @@
[008.html]
[Link with onclick form submit to javascript url and href navigation ]
expected: FAIL

View file

@ -1,3 +0,0 @@
[009.html]
[Link with onclick form submit to javascript url with document.write and href navigation ]
expected: FAIL

View file

@ -0,0 +1,6 @@
[empty-iframe-load-event.html]
[Check execution order from nested timeout]
expected: FAIL
[Check execution order on load handler]
expected: FAIL

View file

@ -1,6 +1,3 @@
[navigate-to-unparseable-url.html]
[location.href setter throws a SyntaxError DOMException for unparseable URLs]
expected: FAIL
[<a> tag navigate fails for unparseable URLs]
expected: FAIL

View file

@ -1,3 +0,0 @@
[navigation-unload-cross-origin.sub.window.html]
[Cross-origin navigation started from unload handler must be ignored]
expected: FAIL

View file

@ -1,3 +0,0 @@
[navigation-unload-same-origin.window.html]
[Same-origin navigation started from unload handler must be ignored]
expected: FAIL

View file

@ -1,3 +0,0 @@
[a-click.html]
[aElement.click() before the load event must NOT replace]
expected: FAIL