servo/tests/wpt/web-platform-tests/url
2019-10-30 13:49:46 +00:00
..
resources Update web-platform-tests to revision 82cecba576456d05c09894749379df1013ab488f 2019-10-30 13:49:46 +00:00
a-element-origin-xhtml.xhtml Update web-platform-tests to revision cf261625e2d230ab219eec966f4abe26e3401b64 2018-05-29 23:08:06 -04:00
a-element-origin.html Update web-platform-tests to revision cf261625e2d230ab219eec966f4abe26e3401b64 2018-05-29 23:08:06 -04:00
a-element-xhtml.xhtml Update web-platform-tests to revision cf261625e2d230ab219eec966f4abe26e3401b64 2018-05-29 23:08:06 -04:00
a-element.html Update web-platform-tests to revision cf261625e2d230ab219eec966f4abe26e3401b64 2018-05-29 23:08:06 -04:00
data-uri-fragment.html Update web-platform-tests to revision 44702f2bc8ea98bc32b5b244f2fe63c6ce66d49d 2017-11-15 12:47:30 -05:00
failure.html Update web-platform-tests to revision e0875f70f4f33a92d8a935e8d0e09a67a45761e8 2019-10-19 13:35:47 +00:00
historical.any.js Update web-platform-tests to revision 138d2e938d493a5c8435025162759c2e34b3b1d1 2019-05-24 13:59:54 +00:00
idlharness.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
META.yml Update web-platform-tests to revision 2d68590d46a990bf28a08d6384a59962d2e56bf6 2019-03-14 23:41:26 -04:00
README.md Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
toascii.window.js Update web-platform-tests to revision cf261625e2d230ab219eec966f4abe26e3401b64 2018-05-29 23:08:06 -04:00
url-constructor.html Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
url-origin.html Update web-platform-tests to revision cf261625e2d230ab219eec966f4abe26e3401b64 2018-05-29 23:08:06 -04:00
url-searchparams.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
url-setters.html Update web-platform-tests to revision cf261625e2d230ab219eec966f4abe26e3401b64 2018-05-29 23:08:06 -04:00
url-tojson.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
urlencoded-parser.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
urlsearchparams-append.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
urlsearchparams-constructor.any.js Remove leading question mark when constructing URLSearchParams 2018-12-25 12:23:05 +08:00
urlsearchparams-delete.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
urlsearchparams-foreach.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
urlsearchparams-get.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
urlsearchparams-getall.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
urlsearchparams-has.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
urlsearchparams-set.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
urlsearchparams-sort.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00
urlsearchparams-stringifier.any.js Update web-platform-tests to revision 848ceffad26e92d47ffe790ed8b650906b2c2343 2018-08-10 14:45:43 -04:00

urltestdata.json

These tests are for browsers, but the data for a-element.html, url-constructor.html, a-element-xhtml.xhtml, and failure.html is in resources/urltestdata.json and can be re-used by non-browser implementations. This file contains a JSON array of comments as strings and test cases as objects. The keys for each test case are:

  • base: an absolute URL as a string whose parsing without a base of its own must succeed. This key is always present, and may have a value like "about:blank" when input is an absolute URL.
  • input: an URL as a string to be parsed with base as its base URL.
  • Either:
    • failure with the value true, indicating that parsing input should return failure,

    • 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.

In addition to testing that parsing input against base gives the result, a test harness for the URL constructor (or similar APIs) should additionally test the following pattern: if failure is true, parsing about:blank against input must give failure. This tests that the logic for converting base URLs into strings properly fails the whole parsing algorithm if the base URL cannot be parsed.

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.

Specification

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