Switch branches/tags
untagged-4c51f27af5fd6cd0d525 merge_pr_12506 merge_pr_12505 merge_pr_12504 merge_pr_12495 merge_pr_12492 merge_pr_12487 merge_pr_12486 merge_pr_12485 merge_pr_12479 merge_pr_12478 merge_pr_12475 merge_pr_12472 merge_pr_12471 merge_pr_12470 merge_pr_12469 merge_pr_12468 merge_pr_12466 merge_pr_12465 merge_pr_12464 merge_pr_12463 merge_pr_12462 merge_pr_12460 merge_pr_12458 merge_pr_12457 merge_pr_12454 merge_pr_12453 merge_pr_12451 merge_pr_12450 merge_pr_12449 merge_pr_12448 merge_pr_12446 merge_pr_12444 merge_pr_12442 merge_pr_12441 merge_pr_12440 merge_pr_12438 merge_pr_12437 merge_pr_12436 merge_pr_12435 merge_pr_12434 merge_pr_12433 merge_pr_12432 merge_pr_12431 merge_pr_12429 merge_pr_12426 merge_pr_12422 merge_pr_12418 merge_pr_12417 merge_pr_12415 merge_pr_12414 merge_pr_12412 merge_pr_12411 merge_pr_12409 merge_pr_12406 merge_pr_12405 merge_pr_12403 merge_pr_12399 merge_pr_12398 merge_pr_12396 merge_pr_12395 merge_pr_12394 merge_pr_12393 merge_pr_12392 merge_pr_12390 merge_pr_12387 merge_pr_12386 merge_pr_12385 merge_pr_12382 merge_pr_12381 merge_pr_12377 merge_pr_12376 merge_pr_12375 merge_pr_12373 merge_pr_12369 merge_pr_12367 merge_pr_12363 merge_pr_12360 merge_pr_12359 merge_pr_12358 merge_pr_12357 merge_pr_12356 merge_pr_12353 merge_pr_12351 merge_pr_12349 merge_pr_12348 merge_pr_12347 merge_pr_12346 merge_pr_12345 merge_pr_12343 merge_pr_12342 merge_pr_12341 merge_pr_12340 merge_pr_12339 merge_pr_12338 merge_pr_12335 merge_pr_12334 merge_pr_12333 merge_pr_12330 merge_pr_12329
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
resources
META.yml
README.md
a-element-origin-xhtml.xhtml
a-element-origin.html
a-element-xhtml.xhtml
a-element.html
data-uri-fragment.html
failure.html
historical.any.js
idlharness.any.js
toascii.window.js
url-constructor.html
url-origin.html
url-searchparams.any.js
url-setters.html
url-tojson.any.js
urlencoded-parser.any.js
urlsearchparams-append.any.js
urlsearchparams-constructor.any.js
urlsearchparams-delete.any.js
urlsearchparams-foreach.any.js
urlsearchparams-get.any.js
urlsearchparams-getall.any.js
urlsearchparams-has.any.js
urlsearchparams-set.any.js
urlsearchparams-sort.any.js
urlsearchparams-stringifier.any.js

README.md

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 URL’s API should return the corresponding value.

      The origin key may be missing. In that case, the API’s 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.