ladybird/Tests/LibWeb/Text/expected/URL/url.txt
Shannon Booth aa32bfa448 LibWeb: Implement USVString scalar value handling
USVString is defined in the IDL spec as:

> The USVString type corresponds to scalar value strings. Depending on
> the context, these can be treated as sequences of either 16-bit
> unsigned integer code units or scalar values.

This means we need to account for surrogate code points by using the
replacement character.

This fixes the last test in https://wpt.live/url/url-constructor.any.html
2024-08-08 10:50:06 +01:00

353 lines
7.7 KiB
Text
Raw Blame History

new URL('ftp://serenityos.org:21', undefined)
protocol => 'ftp:'
username => ''
password => ''
host => 'serenityos.org'
hostname => 'serenityos.org'
port => ''
pathname => '/'
search => ''
searchParams => ''
hash => ''
new URL('http://[0:1:0:1:0:1:0:1]', undefined)
protocol => 'http:'
username => ''
password => ''
host => '[0:1:0:1:0:1:0:1]'
hostname => '[0:1:0:1:0:1:0:1]'
port => ''
pathname => '/'
search => ''
searchParams => ''
hash => ''
new URL('http://[1:0:1:0:1:0:1:0]', undefined)
protocol => 'http:'
username => ''
password => ''
host => '[1:0:1:0:1:0:1:0]'
hostname => '[1:0:1:0:1:0:1:0]'
port => ''
pathname => '/'
search => ''
searchParams => ''
hash => ''
new URL('http://[1:1:0:0:1:0:0:0]/', undefined)
protocol => 'http:'
username => ''
password => ''
host => '[1:1:0:0:1::]'
hostname => '[1:1:0:0:1::]'
port => ''
pathname => '/'
search => ''
searchParams => ''
hash => ''
new URL('unknown://serenityos.org:0', undefined)
protocol => 'unknown:'
username => ''
password => ''
host => 'serenityos.org:0'
hostname => 'serenityos.org'
port => '0'
pathname => ''
search => ''
searchParams => ''
hash => ''
new URL('http://serenityos.org/cat?dog#meow"woof', undefined)
protocol => 'http:'
username => ''
password => ''
host => 'serenityos.org'
hostname => 'serenityos.org'
port => ''
pathname => '/cat'
search => '?dog'
searchParams => 'dog='
hash => '#meow%22woof'
new URL('/hello', 'file://friends/')
protocol => 'file:'
username => ''
password => ''
host => 'friends'
hostname => 'friends'
port => ''
pathname => '/hello'
search => ''
searchParams => ''
hash => ''
new URL('//d:/..', 'file:///C:/a/b')
protocol => 'file:'
username => ''
password => ''
host => ''
hostname => ''
port => ''
pathname => '/d:/'
search => ''
searchParams => ''
hash => ''
new URL('file://a%C2%ADb/p', undefined)
protocol => 'file:'
username => ''
password => ''
host => 'ab'
hostname => 'ab'
port => ''
pathname => '/p'
search => ''
searchParams => ''
hash => ''
new URL('http://user%20name:pa%40ss%3Aword@www.ladybird.org', undefined)
protocol => 'http:'
username => 'user%20name'
password => 'pa%40ss%3Aword'
host => 'www.ladybird.org'
hostname => 'www.ladybird.org'
port => ''
pathname => '/'
search => ''
searchParams => ''
hash => ''
new URL('h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg', undefined)
protocol => 'http:'
username => ''
password => ''
host => 'host:9000'
hostname => 'host'
port => '9000'
pathname => '/path'
search => '?query'
searchParams => 'query='
hash => '#frag'
new URL(' \t', 'http://ladybird.org/foo/bar')
protocol => 'http:'
username => ''
password => ''
host => 'ladybird.org'
hostname => 'ladybird.org'
port => ''
pathname => '/foo/bar'
search => ''
searchParams => ''
hash => ''
new URL('/c:/foo/bar', 'file:///c:/baz/qux')
protocol => 'file:'
username => ''
password => ''
host => ''
hostname => ''
port => ''
pathname => '/c:/foo/bar'
search => ''
searchParams => ''
hash => ''
new URL('', 'file:///test?test#test')
protocol => 'file:'
username => ''
password => ''
host => ''
hostname => ''
port => ''
pathname => '/test'
search => '?test'
searchParams => 'test='
hash => ''
new URL('??a=b&c=d', 'http://example.org/foo/bar')
protocol => 'http:'
username => ''
password => ''
host => 'example.org'
hostname => 'example.org'
port => ''
pathname => '/foo/bar'
search => '??a=b&c=d'
searchParams => '%3Fa=b&c=d'
hash => ''
new URL('http://example.com/<2F><><EFBFBD>𐟾<EFBFBD><F0909FBE><EFBFBD>﷐﷏﷯ﷰ￾￿?<3F><><EFBFBD>𐟾<EFBFBD><F0909FBE><EFBFBD>﷐﷏﷯ﷰ￾￿', undefined)
protocol => 'http:'
username => ''
password => ''
host => 'example.com'
hostname => 'example.com'
port => ''
pathname => '/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF'
search => '?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF'
searchParams => '%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF='
hash => ''
=========================================
URL.parse('ftp://serenityos.org:21', undefined)
protocol => 'ftp:'
username => ''
password => ''
host => 'serenityos.org'
hostname => 'serenityos.org'
port => ''
pathname => '/'
search => ''
searchParams => ''
hash => ''
URL.parse('http://[0:1:0:1:0:1:0:1]', undefined)
protocol => 'http:'
username => ''
password => ''
host => '[0:1:0:1:0:1:0:1]'
hostname => '[0:1:0:1:0:1:0:1]'
port => ''
pathname => '/'
search => ''
searchParams => ''
hash => ''
URL.parse('http://[1:0:1:0:1:0:1:0]', undefined)
protocol => 'http:'
username => ''
password => ''
host => '[1:0:1:0:1:0:1:0]'
hostname => '[1:0:1:0:1:0:1:0]'
port => ''
pathname => '/'
search => ''
searchParams => ''
hash => ''
URL.parse('http://[1:1:0:0:1:0:0:0]/', undefined)
protocol => 'http:'
username => ''
password => ''
host => '[1:1:0:0:1::]'
hostname => '[1:1:0:0:1::]'
port => ''
pathname => '/'
search => ''
searchParams => ''
hash => ''
URL.parse('unknown://serenityos.org:0', undefined)
protocol => 'unknown:'
username => ''
password => ''
host => 'serenityos.org:0'
hostname => 'serenityos.org'
port => '0'
pathname => ''
search => ''
searchParams => ''
hash => ''
URL.parse('http://serenityos.org/cat?dog#meow"woof', undefined)
protocol => 'http:'
username => ''
password => ''
host => 'serenityos.org'
hostname => 'serenityos.org'
port => ''
pathname => '/cat'
search => '?dog'
searchParams => 'dog='
hash => '#meow%22woof'
URL.parse('/hello', 'file://friends/')
protocol => 'file:'
username => ''
password => ''
host => 'friends'
hostname => 'friends'
port => ''
pathname => '/hello'
search => ''
searchParams => ''
hash => ''
URL.parse('//d:/..', 'file:///C:/a/b')
protocol => 'file:'
username => ''
password => ''
host => ''
hostname => ''
port => ''
pathname => '/d:/'
search => ''
searchParams => ''
hash => ''
URL.parse('file://a%C2%ADb/p', undefined)
protocol => 'file:'
username => ''
password => ''
host => 'ab'
hostname => 'ab'
port => ''
pathname => '/p'
search => ''
searchParams => ''
hash => ''
URL.parse('http://user%20name:pa%40ss%3Aword@www.ladybird.org', undefined)
protocol => 'http:'
username => 'user%20name'
password => 'pa%40ss%3Aword'
host => 'www.ladybird.org'
hostname => 'www.ladybird.org'
port => ''
pathname => '/'
search => ''
searchParams => ''
hash => ''
URL.parse('h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg', undefined)
protocol => 'http:'
username => ''
password => ''
host => 'host:9000'
hostname => 'host'
port => '9000'
pathname => '/path'
search => '?query'
searchParams => 'query='
hash => '#frag'
URL.parse(' \t', 'http://ladybird.org/foo/bar')
protocol => 'http:'
username => ''
password => ''
host => 'ladybird.org'
hostname => 'ladybird.org'
port => ''
pathname => '/foo/bar'
search => ''
searchParams => ''
hash => ''
URL.parse('/c:/foo/bar', 'file:///c:/baz/qux')
protocol => 'file:'
username => ''
password => ''
host => ''
hostname => ''
port => ''
pathname => '/c:/foo/bar'
search => ''
searchParams => ''
hash => ''
URL.parse('', 'file:///test?test#test')
protocol => 'file:'
username => ''
password => ''
host => ''
hostname => ''
port => ''
pathname => '/test'
search => '?test'
searchParams => 'test='
hash => ''
URL.parse('??a=b&c=d', 'http://example.org/foo/bar')
protocol => 'http:'
username => ''
password => ''
host => 'example.org'
hostname => 'example.org'
port => ''
pathname => '/foo/bar'
search => '??a=b&c=d'
searchParams => '%3Fa=b&c=d'
hash => ''
URL.parse('http://example.com/<2F><><EFBFBD>𐟾<EFBFBD><F0909FBE><EFBFBD>﷐﷏﷯ﷰ￾￿?<3F><><EFBFBD>𐟾<EFBFBD><F0909FBE><EFBFBD>﷐﷏﷯ﷰ￾￿', undefined)
protocol => 'http:'
username => ''
password => ''
host => 'example.com'
hostname => 'example.com'
port => ''
pathname => '/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF'
search => '?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF'
searchParams => '%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF='
hash => ''