From 63b559051d2228a4bb5b014d91d289abe36886f0 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 1 Feb 2017 21:53:04 +0800 Subject: [PATCH 1/2] Upstream Node.js URL test data --- url/urltestdata.json | 168 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) diff --git a/url/urltestdata.json b/url/urltestdata.json index 587a5541fc5599..698dedefd53943 100644 --- a/url/urltestdata.json +++ b/url/urltestdata.json @@ -5053,5 +5053,173 @@ "pathname": "//x/", "search": "", "hash": "" + }, + { + "input": "tftp://foobar.com/someconfig;mode=netascii", + "base": "about:blank", + "href": "tftp://foobar.com/someconfig;mode=netascii", + "protocol": "tftp:", + "username": "", + "password": "", + "host": "foobar.com", + "hostname": "foobar.com", + "port": "", + "pathname": "/someconfig;mode=netascii", + "search": "", + "hash": "" + }, + { + "input": "telnet://user:pass@foobar.com:23/", + "base": "about:blank", + "href": "telnet://user:pass@foobar.com:23/", + "protocol": "telnet:", + "username": "user", + "password": "pass", + "host": "foobar.com:23", + "hostname": "foobar.com", + "port": "23", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ut2004://10.10.10.10:7777/Index.ut2", + "base": "about:blank", + "href": "ut2004://10.10.10.10:7777/Index.ut2", + "protocol": "ut2004:", + "username": "", + "password": "", + "host": "10.10.10.10:7777", + "hostname": "10.10.10.10", + "port": "7777", + "pathname": "/Index.ut2", + "search": "", + "hash": "" + }, + { + "input": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz", + "base": "about:blank", + "href": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz", + "protocol": "redis:", + "username": "foo", + "password": "bar", + "host": "somehost:6379", + "hostname": "somehost", + "port": "6379", + "pathname": "/0", + "search": "?baz=bam&qux=baz", + "hash": "" + }, + { + "input": "rsync://foo@host:911/sup", + "base": "about:blank", + "href": "rsync://foo@host:911/sup", + "protocol": "rsync:", + "username": "foo", + "password": "", + "host": "host:911", + "hostname": "host", + "port": "911", + "pathname": "/sup", + "search": "", + "hash": "" + }, + { + "input": "git://github.com/foo/bar.git", + "base": "about:blank", + "href": "git://github.com/foo/bar.git", + "protocol": "git:", + "username": "", + "password": "", + "host": "github.com", + "hostname": "github.com", + "port": "", + "pathname": "/foo/bar.git", + "search": "", + "hash": "" + }, + { + "input": "irc://myserver.com:6999/channel?passwd", + "base": "about:blank", + "href": "irc://myserver.com:6999/channel?passwd", + "protocol": "irc:", + "username": "", + "password": "", + "host": "myserver.com:6999", + "hostname": "myserver.com", + "port": "6999", + "pathname": "/channel", + "search": "?passwd", + "hash": "" + }, + { + "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT", + "base": "about:blank", + "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT", + "protocol": "dns:", + "username": "", + "password": "", + "host": "fw.example.org:9999", + "hostname": "fw.example.org", + "port": "9999", + "pathname": "/foo.bar.org", + "search": "?type=TXT", + "hash": "" + }, + { + "input": "ldap://localhost:389/ou=People,o=JNDITutorial", + "base": "about:blank", + "href": "ldap://localhost:389/ou=People,o=JNDITutorial", + "protocol": "ldap:", + "username": "", + "password": "", + "host": "localhost:389", + "hostname": "localhost", + "port": "389", + "pathname": "/ou=People,o=JNDITutorial", + "search": "", + "hash": "" + }, + { + "input": "git+https://github.com/foo/bar", + "base": "about:blank", + "href": "git+https://github.com/foo/bar", + "protocol": "git+https:", + "username": "", + "password": "", + "host": "github.com", + "hostname": "github.com", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "urn:ietf:rfc:2648", + "base": "about:blank", + "href": "urn:ietf:rfc:2648", + "protocol": "urn:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "ietf:rfc:2648", + "search": "", + "hash": "" + }, + { + "input": "tag:joe@example.org,2001:foo/bar", + "base": "about:blank", + "href": "tag:joe@example.org,2001:foo/bar", + "protocol": "tag:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "joe@example.org,2001:foo/bar", + "search": "", + "hash": "" } ] From 81329e44d0f054127642341a0a654aedaf05ff3b Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 1 Feb 2017 22:13:05 +0800 Subject: [PATCH 2/2] Add expected origin to Node.js URL test data --- url/urltestdata.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/url/urltestdata.json b/url/urltestdata.json index 698dedefd53943..dc771d80090488 100644 --- a/url/urltestdata.json +++ b/url/urltestdata.json @@ -5058,6 +5058,7 @@ "input": "tftp://foobar.com/someconfig;mode=netascii", "base": "about:blank", "href": "tftp://foobar.com/someconfig;mode=netascii", + "origin": "null", "protocol": "tftp:", "username": "", "password": "", @@ -5072,6 +5073,7 @@ "input": "telnet://user:pass@foobar.com:23/", "base": "about:blank", "href": "telnet://user:pass@foobar.com:23/", + "origin": "null", "protocol": "telnet:", "username": "user", "password": "pass", @@ -5086,6 +5088,7 @@ "input": "ut2004://10.10.10.10:7777/Index.ut2", "base": "about:blank", "href": "ut2004://10.10.10.10:7777/Index.ut2", + "origin": "null", "protocol": "ut2004:", "username": "", "password": "", @@ -5100,6 +5103,7 @@ "input": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz", "base": "about:blank", "href": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz", + "origin": "null", "protocol": "redis:", "username": "foo", "password": "bar", @@ -5114,6 +5118,7 @@ "input": "rsync://foo@host:911/sup", "base": "about:blank", "href": "rsync://foo@host:911/sup", + "origin": "null", "protocol": "rsync:", "username": "foo", "password": "", @@ -5128,6 +5133,7 @@ "input": "git://github.com/foo/bar.git", "base": "about:blank", "href": "git://github.com/foo/bar.git", + "origin": "null", "protocol": "git:", "username": "", "password": "", @@ -5142,6 +5148,7 @@ "input": "irc://myserver.com:6999/channel?passwd", "base": "about:blank", "href": "irc://myserver.com:6999/channel?passwd", + "origin": "null", "protocol": "irc:", "username": "", "password": "", @@ -5156,6 +5163,7 @@ "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT", "base": "about:blank", "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT", + "origin": "null", "protocol": "dns:", "username": "", "password": "", @@ -5170,6 +5178,7 @@ "input": "ldap://localhost:389/ou=People,o=JNDITutorial", "base": "about:blank", "href": "ldap://localhost:389/ou=People,o=JNDITutorial", + "origin": "null", "protocol": "ldap:", "username": "", "password": "", @@ -5184,6 +5193,7 @@ "input": "git+https://github.com/foo/bar", "base": "about:blank", "href": "git+https://github.com/foo/bar", + "origin": "null", "protocol": "git+https:", "username": "", "password": "", @@ -5198,6 +5208,7 @@ "input": "urn:ietf:rfc:2648", "base": "about:blank", "href": "urn:ietf:rfc:2648", + "origin": "null", "protocol": "urn:", "username": "", "password": "", @@ -5212,6 +5223,7 @@ "input": "tag:joe@example.org,2001:foo/bar", "base": "about:blank", "href": "tag:joe@example.org,2001:foo/bar", + "origin": "null", "protocol": "tag:", "username": "", "password": "",