Skip to content

Commit

Permalink
test: add a few uncovered url tests from wpt
Browse files Browse the repository at this point in the history
Refs: web-platform-tests/wpt#25987

PR-URL: #35636
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
watilde committed Oct 16, 2020
1 parent 59d578e commit c143266
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/wpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Last update:

- console: https://github.com/web-platform-tests/wpt/tree/3b1f72e99a/console
- encoding: https://github.com/web-platform-tests/wpt/tree/d7f9e16c9a/encoding
- url: https://github.com/web-platform-tests/wpt/tree/050308a616/url
- url: https://github.com/web-platform-tests/wpt/tree/4e15edcc3c/url
- resources: https://github.com/web-platform-tests/wpt/tree/1d14e821b9/resources
- interfaces: https://github.com/web-platform-tests/wpt/tree/15e47f779c/interfaces
- html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing
Expand Down
59 changes: 58 additions & 1 deletion test/fixtures/wpt/url/resources/urltestdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -4618,7 +4618,7 @@
"search": "",
"hash": ""
},
"# unknown scheme with non-URL characters in the path",
"# unknown scheme with non-URL characters",
{
"input": "wow:\uFFFF",
"base": "about:blank",
Expand All @@ -4634,6 +4634,21 @@
"search": "",
"hash": ""
},
{
"input": "http://example.com/\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF?\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF",
"base": "about:blank",
"href": "http://example.com/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF",
"origin": "http://example.com",
"protocol": "http:",
"username": "",
"password": "",
"host": "example.com",
"hostname": "example.com",
"port": "",
"pathname": "/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF",
"search": "?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF",
"hash": ""
},
"Forbidden host code points",
{
"input": "http://a<b",
Expand Down Expand Up @@ -5245,6 +5260,34 @@
"search": "",
"hash": ""
},
{
"input": "/",
"base": "file://h/C:/a/b",
"href": "file://h/C:/",
"protocol": "file:",
"username": "",
"password": "",
"host": "h",
"hostname": "h",
"port": "",
"pathname": "/C:/",
"search": "",
"hash": ""
},
{
"input": "/",
"base": "file://h/a/b",
"href": "file://h/",
"protocol": "file:",
"username": "",
"password": "",
"host": "h",
"hostname": "h",
"port": "",
"pathname": "/",
"search": "",
"hash": ""
},
{
"input": "//d:",
"base": "file:///C:/a/b",
Expand Down Expand Up @@ -5640,6 +5683,20 @@
"search": "",
"hash": ""
},
{
"input": "C|",
"base": "file://host/D:/dir1/dir2/file",
"href": "file://host/C:",
"protocol": "file:",
"username": "",
"password": "",
"host": "host",
"hostname": "host",
"port": "",
"pathname": "/C:",
"search": "",
"hash": ""
},
{
"input": "C|#",
"base": "file://host/dir/file",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"path": "encoding"
},
"url": {
"commit": "050308a616a8388f1ad5d6e87eac0270fd35023f",
"commit": "4e15edcc3ca51c72c3846133c7b175ecd94b3a9b",
"path": "url"
},
"resources": {
Expand Down

0 comments on commit c143266

Please sign in to comment.