Browse Source

test: check the origin of the blob URLs

In the getter of the origin in URL, the URL that has blob protocol
will be parsed in a function called "originFor".
Add test cases into the url-tests-additional fixture to test that.

Refs: https://github.com/w3c/web-platform-tests/pull/4941

PR-URL: https://github.com/nodejs/node/pull/11426
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6
Daijiro Wachi 8 years ago
parent
commit
39f7e72440
  1. 28
      test/fixtures/url-tests.js

28
test/fixtures/url-tests.js

@ -5622,5 +5622,33 @@ module.exports =
"input": "non-special://[:80/", "input": "non-special://[:80/",
"base": "about:blank", "base": "about:blank",
"failure": true "failure": true
},
{
"input": "blob:https://example.com:443/",
"base": "about:blank",
"href": "blob:https://example.com:443/",
"protocol": "blob:",
"username": "",
"password": "",
"host": "",
"hostname": "",
"port": "",
"pathname": "https://example.com:443/",
"search": "",
"hash": ""
},
{
"input": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",
"base": "about:blank",
"href": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",
"protocol": "blob:",
"username": "",
"password": "",
"host": "",
"hostname": "",
"port": "",
"pathname": "d3958f5c-0777-0845-9dcf-2cb28783acaf",
"search": "",
"hash": ""
} }
] ]

Loading…
Cancel
Save