mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 03:56:16 +00:00
LibURL: Don't return early parsing a URL with an empty input
We can't simply use the base URL as it may need to be modified in some form. For example - for the included test, the fragment was previously being included in the resulting URL. This fixes 1 test on https://wpt.live/url/url-constructor.any.html
This commit is contained in:
parent
d161602b6d
commit
1dc4959e91
Notes:
github-actions[bot]
2024-08-06 22:09:23 +00:00
Author: https://github.com/shannonbooth
Commit: 1dc4959e91
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/987
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 21 additions and 2 deletions
|
@ -128,6 +128,16 @@ port => ''
|
|||
pathname => '/c:/foo/bar'
|
||||
search => ''
|
||||
hash => ''
|
||||
new URL('', 'file:///test?test#test')
|
||||
protocol => 'file:'
|
||||
username => ''
|
||||
password => ''
|
||||
host => ''
|
||||
hostname => ''
|
||||
port => ''
|
||||
pathname => '/test'
|
||||
search => '?test'
|
||||
hash => ''
|
||||
=========================================
|
||||
URL.parse('ftp://serenityos.org:21', undefined)
|
||||
protocol => 'ftp:'
|
||||
|
@ -259,3 +269,13 @@ port => ''
|
|||
pathname => '/c:/foo/bar'
|
||||
search => ''
|
||||
hash => ''
|
||||
URL.parse('', 'file:///test?test#test')
|
||||
protocol => 'file:'
|
||||
username => ''
|
||||
password => ''
|
||||
host => ''
|
||||
hostname => ''
|
||||
port => ''
|
||||
pathname => '/test'
|
||||
search => '?test'
|
||||
hash => ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue