summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaijiro Wachi <daijiro.wachi@gmail.com>2017-05-03 09:24:42 +0200
committerTimothy Gu <timothygu99@gmail.com>2017-05-04 18:20:45 -0700
commit943dd5f9ed1857d9f04cdca77ed5139d69918173 (patch)
treeba5960be629eee4ec934c4ca57178596228733fc /test
parent0258aed9d293aa0c72e95878b6c00af9633ad080 (diff)
downloadandroid-node-v8-943dd5f9ed1857d9f04cdca77ed5139d69918173.tar.gz
android-node-v8-943dd5f9ed1857d9f04cdca77ed5139d69918173.tar.bz2
android-node-v8-943dd5f9ed1857d9f04cdca77ed5139d69918173.zip
url: handle windows drive letter in the file state
`C|` should not satisfy the condition to not copy the base's path. It also synchronises WPT url test data to verify the update in upstream. PR-URL: https://github.com/nodejs/node/pull/12808 Refs: https://github.com/whatwg/url/pull/305 Refs: https://github.com/w3c/web-platform-tests/pull/5754 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/url-tests.js101
1 files changed, 100 insertions, 1 deletions
diff --git a/test/fixtures/url-tests.js b/test/fixtures/url-tests.js
index 355388eaaf..befe325f93 100644
--- a/test/fixtures/url-tests.js
+++ b/test/fixtures/url-tests.js
@@ -1,7 +1,7 @@
'use strict';
/* WPT Refs:
- https://github.com/w3c/web-platform-tests/blob/3afae94/url/urltestdata.json
+ https://github.com/w3c/web-platform-tests/blob/28541bb/url/urltestdata.json
License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html
*/
module.exports =
@@ -5430,6 +5430,105 @@ module.exports =
"search": "?chai",
"hash": ""
},
+ "# Windows drive letter handling with the 'file:' base URL",
+ {
+ "input": "C|",
+ "base": "file://host/dir/file",
+ "href": "file:///C:",
+ "protocol": "file:",
+ "username": "",
+ "password": "",
+ "host": "",
+ "hostname": "",
+ "port": "",
+ "pathname": "/C:",
+ "search": "",
+ "hash": ""
+ },
+ {
+ "input": "C|#",
+ "base": "file://host/dir/file",
+ "href": "file:///C:#",
+ "protocol": "file:",
+ "username": "",
+ "password": "",
+ "host": "",
+ "hostname": "",
+ "port": "",
+ "pathname": "/C:",
+ "search": "",
+ "hash": ""
+ },
+ {
+ "input": "C|?",
+ "base": "file://host/dir/file",
+ "href": "file:///C:?",
+ "protocol": "file:",
+ "username": "",
+ "password": "",
+ "host": "",
+ "hostname": "",
+ "port": "",
+ "pathname": "/C:",
+ "search": "",
+ "hash": ""
+ },
+ {
+ "input": "C|/",
+ "base": "file://host/dir/file",
+ "href": "file:///C:/",
+ "protocol": "file:",
+ "username": "",
+ "password": "",
+ "host": "",
+ "hostname": "",
+ "port": "",
+ "pathname": "/C:/",
+ "search": "",
+ "hash": ""
+ },
+ {
+ "input": "C|\\",
+ "base": "file://host/dir/file",
+ "href": "file:///C:/",
+ "protocol": "file:",
+ "username": "",
+ "password": "",
+ "host": "",
+ "hostname": "",
+ "port": "",
+ "pathname": "/C:/",
+ "search": "",
+ "hash": ""
+ },
+ {
+ "input": "C",
+ "base": "file://host/dir/file",
+ "href": "file://host/dir/C",
+ "protocol": "file:",
+ "username": "",
+ "password": "",
+ "host": "host",
+ "hostname": "host",
+ "port": "",
+ "pathname": "/dir/C",
+ "search": "",
+ "hash": ""
+ },
+ {
+ "input": "C|a",
+ "base": "file://host/dir/file",
+ "href": "file://host/dir/C|a",
+ "protocol": "file:",
+ "username": "",
+ "password": "",
+ "host": "host",
+ "hostname": "host",
+ "port": "",
+ "pathname": "/dir/C|a",
+ "search": "",
+ "hash": ""
+ },
"# Windows drive letter quirk with not empty host",
{
"input": "file://example.net/C:/",