RESOLVED FIXED 153121
window.location.replace with invalid URL should throw
https://bugs.webkit.org/show_bug.cgi?id=153121
Summary window.location.replace with invalid URL should throw
Adrian
Reported 2016-01-15 04:15:35 PST
Steps to reproduce Go to any site Open the console Type window.location.replace('//') What should happen? As per spec https://www.w3.org/TR/html5/browsers.html#dom-location-replace it should throw an exception What actually happen? It shows a error html page saying "Safari can't open the page "https:whatever/" because the page's address is invalid" and doesn't throw at all.
Attachments
Patch (6.56 KB, patch)
2020-06-28 08:29 PDT, Rob Buis
no flags
Patch (6.57 KB, patch)
2020-06-28 08:40 PDT, Rob Buis
no flags
Patch (6.61 KB, patch)
2020-06-28 11:03 PDT, Rob Buis
no flags
Patch (6.56 KB, patch)
2020-06-28 23:59 PDT, Rob Buis
no flags
Rob Buis
Comment 1 2020-06-28 08:29:01 PDT
EWS Watchlist
Comment 2 2020-06-28 08:29:40 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Rob Buis
Comment 3 2020-06-28 08:40:15 PDT
Rob Buis
Comment 4 2020-06-28 11:03:31 PDT
Rob Buis
Comment 5 2020-06-28 11:04:03 PDT
Darin Adler
Comment 6 2020-06-28 13:11:19 PDT
Comment on attachment 403002 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=403002&action=review > Source/WebCore/page/Location.cpp:232 > + if (completedURL.isNull() || !completedURL.isValid()) I wonder if null URLs can ever be valid. If not, then the isNull check is not needed.
Rob Buis
Comment 7 2020-06-28 23:59:04 PDT
EWS
Comment 8 2020-06-29 01:04:15 PDT
Committed r263647: <https://trac.webkit.org/changeset/263647> All reviewed patches have been landed. Closing bug and clearing flags on attachment 403032 [details].
Radar WebKit Bug Importer
Comment 9 2020-06-29 01:05:19 PDT
Note You need to log in before you can comment on or make changes to this bug.