gecko-dev/testing/web-platform/tests/url
James Graham 1859b9b1e6 Bug 1302423 - Update web-platform-tests to revision 6b48d45a1c7f3243945bf1678008f607e70acf2e, a=testonly
MozReview-Commit-ID: 7u0jU4PkBVg


--HG--
rename : testing/web-platform/tests/domparsing/insert_adjacent_html.xhtml => testing/web-platform/tests/domparsing/insert_adjacent_html-xhtml.xhtml
2016-09-13 14:49:17 +01:00
..
OWNERS Bug 1270508 - Update web-platform-tests to revision 26663baa852c0b42b91e7e72d3aa940e43371571, a=testonly 2016-05-07 09:05:37 +01:00
README.md
a-element-xhtml.xhtml
a-element.html
a-element.js Bug 1273176 - Update web-platform-tests to revision 55905788bebbdfacb49c94e579e93c19531e0199, a=testonly 2016-05-16 17:05:32 +01:00
historical.html Bug 1263631 - Update web-platform-tests to revision 8d896c2015ab1e50ad00a0013700f87813d9364c, a=testonly 2016-04-11 23:23:45 +01:00
historical.worker.js Bug 1263631 - Update web-platform-tests to revision 8d896c2015ab1e50ad00a0013700f87813d9364c, a=testonly 2016-04-11 23:23:45 +01:00
interfaces.html
setters_tests.json Bug 1274534 - Update web-platform-tests to revision e806420984568cd76da78de27c832b0a927d9fc6, a=testonly 2016-05-24 08:41:15 +01:00
url-constructor.html Bug 1279809 - Update web-platform-tests to revision 664c6072db0f96031ff775f4a6c0a744e77c3265, a=testonly 2016-06-23 10:36:47 +01:00
url-domainToUnicode.html Bug 1290859 - Update web-platform-tests to revision 6744ac43d76207bdd1ececa4b91c9bfeef3ad522, a=testonly 2016-08-01 13:56:46 +01:00
url-setters.html Bug 1274534 - Update web-platform-tests to revision e806420984568cd76da78de27c832b0a927d9fc6, a=testonly 2016-05-24 08:41:15 +01:00
urlsearchparams-append.html
urlsearchparams-constructor.html
urlsearchparams-delete.html
urlsearchparams-get.html
urlsearchparams-getall.html
urlsearchparams-has.html
urlsearchparams-set.html
urlsearchparams-stringifier.html
urltestdata.json Bug 1302423 - Update web-platform-tests to revision 6b48d45a1c7f3243945bf1678008f607e70acf2e, a=testonly 2016-09-13 14:49:17 +01:00

README.md

These tests are for browsers, but the data for a-element.html, url-constructor.html, and a-element-xhtml.xhtml is in 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 should 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.

annevk/url hosts some other files that might be of interest if you want to create additional tests.

Similar to a-element.html it would be trivial to add more tests for other objects that expose links (e.g. URL and <area>). There's also room for enhancement and bits that require independent tests:

  • The encoding part of the URL parser
  • The state override part of the URL parser (setting individual properties of a URL)
  • Origin serialization
  • application/x-www-form-urlencoded