Skip to content

Commit 3afae94

Browse files
rmisevdomenic
authored andcommitted
Test how URL parser handles domains with empty labels
The test covers https://url.spec.whatwg.org/#concept-ipv4-parser 6.1 item: > 1. If part is the empty string, return input. Related issue: jsdom/whatwg-url#82
1 parent 79ec541 commit 3afae94

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

url/urltestdata.json

+46
Original file line numberDiff line numberDiff line change
@@ -3782,6 +3782,52 @@
37823782
"search": "",
37833783
"hash": ""
37843784
},
3785+
"Domains with empty labels",
3786+
{
3787+
"input": "http://./",
3788+
"base": "about:blank",
3789+
"href": "http://./",
3790+
"origin": "http://.",
3791+
"protocol": "http:",
3792+
"username": "",
3793+
"password": "",
3794+
"host": ".",
3795+
"hostname": ".",
3796+
"port": "",
3797+
"pathname": "/",
3798+
"search": "",
3799+
"hash": ""
3800+
},
3801+
{
3802+
"input": "http://../",
3803+
"base": "about:blank",
3804+
"href": "http://../",
3805+
"origin": "http://..",
3806+
"protocol": "http:",
3807+
"username": "",
3808+
"password": "",
3809+
"host": "..",
3810+
"hostname": "..",
3811+
"port": "",
3812+
"pathname": "/",
3813+
"search": "",
3814+
"hash": ""
3815+
},
3816+
{
3817+
"input": "http://0..0x300/",
3818+
"base": "about:blank",
3819+
"href": "http://0..0x300/",
3820+
"origin": "http://0..0x300",
3821+
"protocol": "http:",
3822+
"username": "",
3823+
"password": "",
3824+
"host": "0..0x300",
3825+
"hostname": "0..0x300",
3826+
"port": "",
3827+
"pathname": "/",
3828+
"search": "",
3829+
"hash": ""
3830+
},
37853831
"Broken IPv6",
37863832
{
37873833
"input": "http://[www.google.com]/",

0 commit comments

Comments
 (0)