| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ Last update: | |||
| 27 | 27 | - resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing | |
| 28 | 28 | - resources: https://github.com/web-platform-tests/wpt/tree/1e140d63ec/resources | |
| 29 | 29 | - streams: https://github.com/web-platform-tests/wpt/tree/2bd26e124c/streams | |
| 30 | - - url: https://github.com/web-platform-tests/wpt/tree/6a39784534/url | ||
| 30 | + - url: https://github.com/web-platform-tests/wpt/tree/67880a4eb8/url | ||
| 31 | 31 | - user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing | |
| 32 | 32 | - wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi | |
| 33 | 33 | - wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,5 +3,4 @@ suggested_reviewers: | |||
| 3 | 3 | - mikewest | |
| 4 | 4 | - domenic | |
| 5 | 5 | - annevk | |
| 6 | - - GPHemsley | ||
| 7 | 6 | - TimothyGu | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,13 @@ | |||
| 1 | - ## urltestdata.json | ||
| 1 | + ## urltestdata.json / urltestdata-javascript-only.json | ||
| 2 | 2 | ||
| 3 | - `resources/urltestdata.json` contains URL parsing tests suitable for any URL parser implementation. | ||
| 3 | + [`resources/urltestdata.json`](resources/urltestdata.json) contains URL parsing tests suitable for any URL parser implementation. | ||
| 4 | + [`resources/urltestdata-javascript-only.json`](resources/urltestdata-javascript-only.json) contains URL parsing tests specifically meant | ||
| 5 | + for JavaScript's `URL()` class as well as other languages accepting non-scalar-value strings. | ||
| 4 | 6 | ||
| 5 | - It's used as a source of tests by `a-element.html`, `failure.html`, `url-constructor.any.js`, and | ||
| 6 | - other test files in this directory. | ||
| 7 | + These files are used as a source of tests by `a-element.html`, `failure.html`, `url-constructor.any.js`, | ||
| 8 | + and other test files in this directory. | ||
| 7 | 9 | ||
| 8 | - The format of `resources/urltestdata.json` is a JSON array of comments as strings and test cases as | ||
| 10 | + Both files share the same format. They consist of a JSON array of comments as strings and test cases as | ||
| 9 | 11 | objects. The keys for each test case are: | |
| 10 | 12 | ||
| 11 | 13 | * `input`: a string to be parsed as URL. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,4 +12,8 @@ | |||
| 12 | 12 | <script src="resources/a-element-origin.js"></script> | |
| 13 | 13 | </body> | |
| 14 | 14 | </html> | |
| 15 | - <!-- Other dependencies: resources/urltestdata.json --> | ||
| 15 | + <!-- | ||
| 16 | + Other dependencies: | ||
| 17 | + * resources/urltestdata.json, | ||
| 18 | + * resources/urltestdata-javascript-only.json, | ||
| 19 | + --> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,4 +5,8 @@ | |||
| 5 | 5 | <base id=base> | |
| 6 | 6 | <div id=log></div> | |
| 7 | 7 | <script src=resources/a-element-origin.js></script> | |
| 8 | - <!-- Other dependencies: resources/urltestdata.json --> | ||
| 8 | + <!-- | ||
| 9 | + Other dependencies: | ||
| 10 | + * resources/urltestdata.json, | ||
| 11 | + * resources/urltestdata-javascript-only.json, | ||
| 12 | + --> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,4 +17,8 @@ | |||
| 17 | 17 | <script src="resources/a-element.js"></script> | |
| 18 | 18 | </body> | |
| 19 | 19 | </html> | |
| 20 | - <!-- Other dependencies: resources/urltestdata.json --> | ||
| 20 | + <!-- | ||
| 21 | + Other dependencies: | ||
| 22 | + * resources/urltestdata.json, | ||
| 23 | + * resources/urltestdata-javascript-only.json, | ||
| 24 | + --> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,11 @@ | |||
| 10 | 10 | <base id=base> | |
| 11 | 11 | <div id=log></div> | |
| 12 | 12 | <script src=resources/a-element.js></script> | |
| 13 | - <!-- Other dependencies: resources/urltestdata.json --> | ||
| 13 | + <!-- | ||
| 14 | + Other dependencies: | ||
| 15 | + * resources/urltestdata.json, | ||
| 16 | + * resources/urltestdata-javascript-only.json, | ||
| 17 | + --> | ||
| 14 | 18 | ||
| 15 | 19 | ||
| 16 | 20 | <a id="multline-entity" download="multline-entity.txt" href="data:text/plain;charset=utf-8,first%20line second%20line"> Link with embedded \n is parsed correctly </a> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,10 @@ | |||
| 6 | 6 | <script src=/resources/testharnessreport.js></script> | |
| 7 | 7 | <div id=log></div> | |
| 8 | 8 | <script> | |
| 9 | - promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runTests), "Loading data…") | ||
| 9 | + promise_test(() => Promise.all([ | ||
| 10 | + fetch("resources/urltestdata.json").then(res => res.json()), | ||
| 11 | + fetch("resources/urltestdata-javascript-only.json").then(res => res.json()), | ||
| 12 | + ]).then((tests) => tests.flat()).then(runTests), "Loading data…"); | ||
| 10 | 13 | ||
| 11 | 14 | function runTests(testData) { | |
| 12 | 15 | for (const test of testData) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | 1 | // META: script=/resources/WebIDLParser.js | |
| 2 | 2 | // META: script=/resources/idlharness.js | |
| 3 | + // META: global=window,dedicatedworker,shadowrealm-in-window | ||
| 3 | 4 | ||
| 4 | 5 | idl_test( | |
| 5 | 6 | ['url'], | |
| Back | FazBrowse Home | New Git URL |
0 commit comments