From 66e3b36cdf8a85a573e3e32c106d5508f7e937a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rimas=20Misevi=C4=8Dius?= Date: Wed, 13 May 2020 09:45:05 +0000 Subject: [PATCH] Bug 1635804 [wpt PR 23432] - URL: test IDNA ignored code points in host, a=testonly Automatic update from web-platform-tests URL: test IDNA ignored code points in host See https://github.com/whatwg/url/pull/497 for context. -- wpt-commits: e9a106175a02a192a7239f42a94235fbe0f0c7a3 wpt-pr: 23432 --- .../tests/url/resources/toascii.json | 22 +++++++++ .../tests/url/resources/urltestdata.json | 45 +++++++++++++++++++ 2 files changed, 67 insertions(+) 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 } ]