diff --git a/testing/web-platform/tests/url/resources/toascii.json b/testing/web-platform/tests/url/resources/toascii.json index 814f06e794866..1fb57673816e4 100644 --- a/testing/web-platform/tests/url/resources/toascii.json +++ b/testing/web-platform/tests/url/resources/toascii.json @@ -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 } ] diff --git a/testing/web-platform/tests/url/resources/urltestdata.json b/testing/web-platform/tests/url/resources/urltestdata.json index 4ffbd3cde754f..b5b200e640c90 100644 --- a/testing/web-platform/tests/url/resources/urltestdata.json +++ b/testing/web-platform/tests/url/resources/urltestdata.json @@ -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 } ]