servo/tests/wpt/web-platform-tests/url
2023-05-07 01:31:13 +00:00
..
resources Update web-platform-tests to revision b'1d9b01e2fad6af3a057d571b1e088e15fa9bc8e6' 2023-04-07 01:30:49 +00:00
tools Update web-platform-tests to revision b'704eebbe6af5b43643971e96e33a0c979fba2904' 2023-01-25 01:36:16 +00:00
a-element-origin-xhtml.xhtml
a-element-origin.html
a-element-xhtml.xhtml Update web-platform-tests to revision b'66a2552e58afc4f50e87b2306839664c1447e265' 2022-12-21 01:44:03 +00:00
a-element.html Update web-platform-tests to revision b'66a2552e58afc4f50e87b2306839664c1447e265' 2022-12-21 01:44:03 +00:00
data-uri-fragment.html
failure.html Update web-platform-tests to revision b'1d9b01e2fad6af3a057d571b1e088e15fa9bc8e6' 2023-04-07 01:30:49 +00:00
historical.any.js Update web-platform-tests to revision b'2703c75d5e889bb7c6a918de44841bf9de8d63a7' 2023-03-25 01:54:46 +00:00
idlharness-shadowrealm.window.js Update web-platform-tests to revision b'b728032f59a396243864b0f8584e7211e3632005' 2022-11-10 01:27:28 +00:00
idlharness.any.js
IdnaTestV2.window.js Update web-platform-tests to revision b'704eebbe6af5b43643971e96e33a0c979fba2904' 2023-01-25 01:36:16 +00:00
javascript-urls.window.js Update web-platform-tests to revision b'afdce893ed51bc1a7a7ac03b16b5a575caad071a' 2023-03-17 01:55:41 +00:00
META.yml
percent-encoding.window.js Update web-platform-tests to revision 322c4da99b1d62796d5f4105eb02a745bb35d3f9 2020-11-04 10:40:57 +00:00
README.md Update web-platform-tests to revision b'1d9b01e2fad6af3a057d571b1e088e15fa9bc8e6' 2023-04-07 01:30:49 +00:00
toascii.window.js Update web-platform-tests to revision 7ec633bbfbc01de4972e65f81f593983d9cdc17d 2020-01-23 10:58:08 +00:00
url-constructor.any.js Update web-platform-tests to revision b'1d9b01e2fad6af3a057d571b1e088e15fa9bc8e6' 2023-04-07 01:30:49 +00:00
url-origin.any.js Update web-platform-tests to revision b'1d9b01e2fad6af3a057d571b1e088e15fa9bc8e6' 2023-04-07 01:30:49 +00:00
url-searchparams.any.js Update web-platform-tests to revision 281f62f2d8ffe72128d848851ac1e8d823f608f6 2020-09-23 10:40:47 +00:00
url-setters-a-area.window.js Update web-platform-tests to revision b'66a2552e58afc4f50e87b2306839664c1447e265' 2022-12-21 01:44:03 +00:00
url-setters-stripping.any.js Update web-platform-tests to revision b'b728032f59a396243864b0f8584e7211e3632005' 2022-11-10 01:27:28 +00:00
url-setters.any.js Update web-platform-tests to revision b'66a2552e58afc4f50e87b2306839664c1447e265' 2022-12-21 01:44:03 +00:00
url-statics-canparse.any.js Update web-platform-tests to revision b'065cf84e9f00d1c11faf2a41e500a73ad6b95a48' 2023-03-21 01:40:05 +00:00
url-tojson.any.js
urlencoded-parser.any.js Update web-platform-tests to revision b'afdce893ed51bc1a7a7ac03b16b5a575caad071a' 2023-03-17 01:55:41 +00:00
urlsearchparams-append.any.js
urlsearchparams-constructor.any.js Update web-platform-tests to revision 289272c280086dda4bce0d31f2ce0fc1e7a08fa8 2021-02-03 11:17:49 +00:00
urlsearchparams-delete.any.js Update web-platform-tests to revision b'8d8b273d2265095c7f5330ff231940e68fb49754' 2023-05-07 01:31:13 +00:00
urlsearchparams-foreach.any.js Update web-platform-tests to revision 858d8eea637878df26f837fa9b0f2dfa248380ab 2021-02-01 10:52:44 +00:00
urlsearchparams-get.any.js
urlsearchparams-getall.any.js
urlsearchparams-has.any.js Update web-platform-tests to revision b'8d8b273d2265095c7f5330ff231940e68fb49754' 2023-05-07 01:31:13 +00:00
urlsearchparams-set.any.js
urlsearchparams-size.any.js Update web-platform-tests to revision b'c9f81de4242294a0d694ecd5a63155acfe6bf49a' 2023-02-25 01:52:07 +00:00
urlsearchparams-sort.any.js
urlsearchparams-stringifier.any.js Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440' 2022-01-17 16:30:29 +09:00

urltestdata.json

resources/urltestdata.json contains URL parsing tests suitable for any URL parser implementation.

It's used as a source of tests by a-element.html, failure.html, url-constructor.any.js, and other test files in this directory.

The format of resources/urltestdata.json is a JSON array of comments as strings and test cases as objects. The keys for each test case are:

  • input: a string to be parsed as URL.

  • base: null or a serialized URL (i.e., does not fail parsing).

  • Then either

    • failure whose value is true, indicating that parsing input relative to base returns failure
    • relativeTo whose value is "non-opaque-path-base" (input does parse against a non-null base URL without an opaque path) or "any-base" (input parses against any non-null base URL), or is omitted in its entirety (input never parses successfully)

    or href, origin, protocol, username, password, host, hostname, port, pathname, search, and hash with string values; indicating that parsing input should return an URL record and that the getters of each corresponding attribute in that URLs API should return the corresponding value.

    The origin key may be missing. In that case, the APIs origin attribute is not tested.

setters_tests.json

resources/setters_tests.json is self-documented.

toascii.json

resources/toascii.json is a JSON resource containing an array where each item is an object consisting of an optional comment field and mandatory input and output fields. input is the domain to be parsed according to the rules of UTS #46 (as stipulated by the URL Standard). output gives the expected output of the parser after serialization. An output of null means parsing is expected to fail.

URL parser's encoding argument

Tests in /encoding and /html/infrastructure/urls/resolving-urls/query-encoding/ cover the encoding argument to the URL parser.

There's also limited coverage in resources/percent-encoding.json for percent-encode after encoding with percentEncodeSet set to special-query percent-encode set and spaceAsPlus set to false. (Improvements to expand coverage here are welcome.)

Specification

The tests in this directory assert conformance with the URL Standard.