Skip to content

Commit

Permalink
Bug 1635804 [wpt PR 23432] - URL: test IDNA ignored code points in ho…
Browse files Browse the repository at this point in the history
…st, a=testonly

Automatic update from web-platform-tests
URL: test IDNA ignored code points in host

See whatwg/url#497 for context.
--

wpt-commits: e9a106175a02a192a7239f42a94235fbe0f0c7a3
wpt-pr: 23432
  • Loading branch information
rmisev authored and moz-wptsync-bot committed May 14, 2020
1 parent 057efff commit 3999897
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
22 changes: 22 additions & 0 deletions testing/web-platform/tests/url/resources/toascii.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,27 @@
{
"input": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.β",
"output": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.xn--nxa"
},
{
"comment": "IDNA ignored code points",
"input": "a\u00ADb",
"output": "ab"
},
{
"input": "a%C2%ADb",
"output": "ab"
},
{
"comment": "Empty host after domain to ASCII",
"input": "\u00AD",
"output": null
},
{
"input": "%C2%AD",
"output": null
},
{
"input": "xn--",
"output": null
}
]
45 changes: 45 additions & 0 deletions testing/web-platform/tests/url/resources/urltestdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6755,5 +6755,50 @@
"pathname": "foo/bar",
"search": "",
"hash": ""
},
"IDNA ignored code points in file URLs hosts",
{
"input": "file://a\u00ADb/p",
"base": "about:blank",
"href": "file://ab/p",
"protocol": "file:",
"username": "",
"password": "",
"host": "ab",
"hostname": "ab",
"port": "",
"pathname": "/p",
"search": "",
"hash": ""
},
{
"input": "file://a%C2%ADb/p",
"base": "about:blank",
"href": "file://ab/p",
"protocol": "file:",
"username": "",
"password": "",
"host": "ab",
"hostname": "ab",
"port": "",
"pathname": "/p",
"search": "",
"hash": ""
},
"Empty host after the domain to ASCII",
{
"input": "file://\u00ad/p",
"base": "about:blank",
"failure": true
},
{
"input": "file://%C2%AD/p",
"base": "about:blank",
"failure": true
},
{
"input": "file://xn--/p",
"base": "about:blank",
"failure": true
}
]

0 comments on commit 3999897

Please sign in to comment.