gecko-dev/testing/web-platform/tests/url
Ms2ger 29b17fd100 Bug 1484952 [wpt PR 12584] - Add some missing 'var's to urlsearchparams-constructor.any.js., a=testonly
Automatic update from web-platform-testsAdd some missing 'var's to urlsearchparams-constructor.any.js.

--
Remove duplicated 'var's in urlsearchparams-constructor.any.js.

--

wpt-commits: c6edf6dc6e80a48cf16014908fe0e30d6a821c34, b1db4409a550bb4a085ef9043f3e66cb44416f06
wpt-pr: 12584
2018-08-29 10:08:23 +00:00
..
resources Bug 1467953 [wpt PR 11438] - URL: correct non-special URL's origin, a=testonly 2018-07-04 18:14:13 +01:00
META.yml Bug 1476293 [wpt PR 12024] - Add spec links to META.yml, a=testonly 2018-07-29 18:49:42 +01:00
README.md Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
a-element-origin-xhtml.xhtml Bug 1463796 [wpt PR 11125] - Organize url/, a=testonly 2018-06-10 09:29:38 +01:00
a-element-origin.html Bug 1463796 [wpt PR 11125] - Organize url/, a=testonly 2018-06-10 09:29:38 +01:00
a-element-xhtml.xhtml Bug 1463796 [wpt PR 11125] - Organize url/, a=testonly 2018-06-10 09:29:38 +01:00
a-element.html Bug 1463796 [wpt PR 11125] - Organize url/, a=testonly 2018-06-10 09:29:38 +01:00
data-uri-fragment.html
failure.html Bug 1463796 [wpt PR 11125] - Organize url/, a=testonly 2018-06-10 09:29:38 +01:00
historical.any.js
idlharness.any.js Bug 1482377 [wpt PR 12405] - Convert compat+console+fullscreen+storage+url+xhr to idl_test, a=testonly 2018-08-15 16:50:25 +00:00
toascii.window.js Bug 1463796 [wpt PR 11125] - Organize url/, a=testonly 2018-06-10 09:29:38 +01:00
url-constructor.html Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
url-origin.html Bug 1463796 [wpt PR 11125] - Organize url/, a=testonly 2018-06-10 09:29:38 +01:00
url-searchparams.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
url-setters.html Bug 1463796 [wpt PR 11125] - Organize url/, a=testonly 2018-06-10 09:29:38 +01:00
url-tojson.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
urlencoded-parser.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
urlsearchparams-append.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
urlsearchparams-constructor.any.js Bug 1484952 [wpt PR 12584] - Add some missing 'var's to urlsearchparams-constructor.any.js., a=testonly 2018-08-29 10:08:23 +00:00
urlsearchparams-delete.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
urlsearchparams-foreach.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
urlsearchparams-get.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
urlsearchparams-getall.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
urlsearchparams-has.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
urlsearchparams-set.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
urlsearchparams-sort.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00
urlsearchparams-stringifier.any.js Bug 1468626 [wpt PR 11492] - Reformat URL tests, a=testonly 2018-08-08 12:09:38 +00:00

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