servo/tests/wpt/web-platform-tests/url
2016-11-15 09:35:34 +01:00
..
a-element-xhtml.xhtml Update web-platform-tests to revision 66c4613f823c4384c78ada77346eda17bb128947 2016-03-15 16:34:24 +01:00
a-element.html Update web-platform-tests to revision 66c4613f823c4384c78ada77346eda17bb128947 2016-03-15 16:34:24 +01:00
a-element.js Only test expected origin when it is present 2016-04-23 20:28:01 +02:00
historical.html Remove URL.domainToASCII and URL.domainToUnicode 2016-10-25 19:05:57 -04:00
historical.worker.js Remove URL.domainToASCII and URL.domainToUnicode 2016-10-25 19:05:57 -04:00
interfaces.html Remove URL.domainToASCII and URL.domainToUnicode 2016-10-25 19:05:57 -04:00
OWNERS Update web-platform-tests to revision d011702f368b88b3bae86e7a8fd2ddd22e18b33c 2016-04-12 10:47:32 +02:00
README.md Update web-platform-tests to revision 7ed49cff4d031720f829c01df837ed7a09ad5c60 2016-02-24 11:04:43 +01:00
setters_tests.json Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00
url-constructor.html Update web-platform-tests to revision bda2059150dca8ab47f088b4cc619fcdc1f262fa 2016-05-30 14:04:50 +02:00
url-setters.html Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00
urlsearchparams-append.html Update web-platform-tests to revision 5a754b40cd49c0404863c431b58cc311dc5d167c 2015-11-17 10:54:05 +01:00
urlsearchparams-constructor.html Update web-platform-tests to revision ee40b886c701ffa25a673240cabdedd59ee3ace4 2015-11-24 13:35:04 +01:00
urlsearchparams-delete.html Update web-platform-tests to revision 5a754b40cd49c0404863c431b58cc311dc5d167c 2015-11-17 10:54:05 +01:00
urlsearchparams-foreach.html Make URLSearchParams iterable. 2016-10-07 17:35:54 +02:00
urlsearchparams-get.html Update web-platform-tests to revision 5a754b40cd49c0404863c431b58cc311dc5d167c 2015-11-17 10:54:05 +01:00
urlsearchparams-getall.html Update web-platform-tests to revision 5a754b40cd49c0404863c431b58cc311dc5d167c 2015-11-17 10:54:05 +01:00
urlsearchparams-has.html Update web-platform-tests to revision 5a754b40cd49c0404863c431b58cc311dc5d167c 2015-11-17 10:54:05 +01:00
urlsearchparams-set.html Update web-platform-tests to revision 5a754b40cd49c0404863c431b58cc311dc5d167c 2015-11-17 10:54:05 +01:00
urlsearchparams-stringifier.html Update web-platform-tests to revision 5a754b40cd49c0404863c431b58cc311dc5d167c 2015-11-17 10:54:05 +01:00
urltestdata.json Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00

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