tree: 96bda8b9f011fad7ce1a6c7a8204c9bedfcd24ed [path history] [tgz]
  1. resources/
  2. a-element-expected.txt
  3. a-element-origin-expected.txt
  4. a-element-origin-xhtml-expected.txt
  5. a-element-origin-xhtml.xhtml
  6. a-element-origin.html
  7. a-element-xhtml-expected.txt
  8. a-element-xhtml.xhtml
  9. a-element.html
  10. data-uri-fragment-expected.txt
  11. data-uri-fragment.html
  12. failure-expected.txt
  13. failure.html
  14. historical-expected.txt
  15. historical.any-expected.txt
  16. historical.any.html
  17. historical.any.js
  18. historical.any.worker-expected.txt
  19. historical.any.worker.html
  20. idlharness.any-expected.txt
  21. idlharness.any.html
  22. idlharness.any.js
  23. idlharness.any.worker-expected.txt
  24. idlharness.any.worker.html
  25. META.yml
  26. README.md
  27. toascii.window-expected.txt
  28. toascii.window.html
  29. toascii.window.js
  30. url-constructor-expected.txt
  31. url-constructor.html
  32. url-origin-expected.txt
  33. url-origin.html
  34. url-searchparams.any-expected.txt
  35. url-searchparams.any.html
  36. url-searchparams.any.js
  37. url-searchparams.any.worker-expected.txt
  38. url-searchparams.any.worker.html
  39. url-setters-expected.txt
  40. url-setters-stripping.any-expected.txt
  41. url-setters-stripping.any.html
  42. url-setters-stripping.any.js
  43. url-setters-stripping.any.worker-expected.txt
  44. url-setters-stripping.any.worker.html
  45. url-setters.html
  46. url-tojson-expected.txt
  47. url-tojson.any-expected.txt
  48. url-tojson.any.html
  49. url-tojson.any.js
  50. url-tojson.any.worker-expected.txt
  51. url-tojson.any.worker.html
  52. urlencoded-parser.any-expected.txt
  53. urlencoded-parser.any.html
  54. urlencoded-parser.any.js
  55. urlencoded-parser.any.worker-expected.txt
  56. urlencoded-parser.any.worker.html
  57. urlsearchparams-append-expected.txt
  58. urlsearchparams-append.any-expected.txt
  59. urlsearchparams-append.any.html
  60. urlsearchparams-append.any.js
  61. urlsearchparams-append.any.worker-expected.txt
  62. urlsearchparams-append.any.worker.html
  63. urlsearchparams-constructor-expected.txt
  64. urlsearchparams-constructor.any-expected.txt
  65. urlsearchparams-constructor.any.html
  66. urlsearchparams-constructor.any.js
  67. urlsearchparams-constructor.any.worker-expected.txt
  68. urlsearchparams-constructor.any.worker.html
  69. urlsearchparams-delete-expected.txt
  70. urlsearchparams-delete.any-expected.txt
  71. urlsearchparams-delete.any.html
  72. urlsearchparams-delete.any.js
  73. urlsearchparams-delete.any.worker-expected.txt
  74. urlsearchparams-delete.any.worker.html
  75. urlsearchparams-foreach-expected.txt
  76. urlsearchparams-foreach.any-expected.txt
  77. urlsearchparams-foreach.any.html
  78. urlsearchparams-foreach.any.js
  79. urlsearchparams-foreach.any.worker-expected.txt
  80. urlsearchparams-foreach.any.worker.html
  81. urlsearchparams-get-expected.txt
  82. urlsearchparams-get.any-expected.txt
  83. urlsearchparams-get.any.html
  84. urlsearchparams-get.any.js
  85. urlsearchparams-get.any.worker-expected.txt
  86. urlsearchparams-get.any.worker.html
  87. urlsearchparams-getall-expected.txt
  88. urlsearchparams-getall.any-expected.txt
  89. urlsearchparams-getall.any.html
  90. urlsearchparams-getall.any.js
  91. urlsearchparams-getall.any.worker-expected.txt
  92. urlsearchparams-getall.any.worker.html
  93. urlsearchparams-has-expected.txt
  94. urlsearchparams-has.any-expected.txt
  95. urlsearchparams-has.any.html
  96. urlsearchparams-has.any.js
  97. urlsearchparams-has.any.worker-expected.txt
  98. urlsearchparams-has.any.worker.html
  99. urlsearchparams-set-expected.txt
  100. urlsearchparams-set.any-expected.txt
  101. urlsearchparams-set.any.html
  102. urlsearchparams-set.any.js
  103. urlsearchparams-set.any.worker-expected.txt
  104. urlsearchparams-set.any.worker.html
  105. urlsearchparams-sort-expected.txt
  106. urlsearchparams-sort.any-expected.txt
  107. urlsearchparams-sort.any.html
  108. urlsearchparams-sort.any.js
  109. urlsearchparams-sort.any.worker-expected.txt
  110. urlsearchparams-sort.any.worker.html
  111. urlsearchparams-stringifier-expected.txt
  112. urlsearchparams-stringifier.any-expected.txt
  113. urlsearchparams-stringifier.any.html
  114. urlsearchparams-stringifier.any.js
  115. urlsearchparams-stringifier.any.worker-expected.txt
  116. urlsearchparams-stringifier.any.worker.html
  117. w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/url/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.