tree: 124c016030b9e6270629e4e095be6f2057466cb5 [path history] [tgz]
  1. a-element-origin-xhtml.xhtml
  2. a-element-origin.html
  3. a-element-origin.js
  4. a-element-xhtml.xhtml
  5. a-element.html
  6. a-element.js
  7. failure.html
  8. historical.any.js
  9. interfaces.any.js
  10. OWNERS
  11. README.md
  12. setters_tests.json
  13. toascii.json
  14. toascii.window.js
  15. url-constructor.html
  16. url-origin.html
  17. url-setters.html
  18. url-tojson.html
  19. urlencoded-parser.html
  20. urlsearchparams-append.html
  21. urlsearchparams-constructor.html
  22. urlsearchparams-delete.html
  23. urlsearchparams-foreach.html
  24. urlsearchparams-get.html
  25. urlsearchparams-getall.html
  26. urlsearchparams-has.html
  27. urlsearchparams-set.html
  28. urlsearchparams-sort.html
  29. urlsearchparams-stringifier.html
  30. urltestdata.json
url/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 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.