Skip to content

Commit 182be26

Browse files
nodejs-github-botmarco-ippolito
authored andcommitted
test: update WPT for url to 67880a4eb83ca9aa732eec4b35a1971ff5bf37ff
PR-URL: #55999 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Jason Zhang <xzha4350@gmail.com>
1 parent 8af1b53 commit 182be26

17 files changed

+359
-34
lines changed

test/fixtures/wpt/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Last update:
2727
- resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing
2828
- resources: https://github.com/web-platform-tests/wpt/tree/1e140d63ec/resources
2929
- 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
3131
- user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing
3232
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi
3333
- wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi

test/fixtures/wpt/url/META.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ suggested_reviewers:
33
- mikewest
44
- domenic
55
- annevk
6-
- GPHemsley
76
- TimothyGu

test/fixtures/wpt/url/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
## urltestdata.json
1+
## urltestdata.json / urltestdata-javascript-only.json
22

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.
46

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.
79

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
911
objects. The keys for each test case are:
1012

1113
* `input`: a string to be parsed as URL.

test/fixtures/wpt/url/a-element-origin-xhtml.xhtml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@
1212
<script src="resources/a-element-origin.js"></script>
1313
</body>
1414
</html>
15-
<!-- Other dependencies: resources/urltestdata.json -->
15+
<!--
16+
Other dependencies:
17+
* resources/urltestdata.json,
18+
* resources/urltestdata-javascript-only.json,
19+
-->

test/fixtures/wpt/url/a-element-origin.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
<base id=base>
66
<div id=log></div>
77
<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+
-->

test/fixtures/wpt/url/a-element-xhtml.xhtml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@
1717
<script src="resources/a-element.js"></script>
1818
</body>
1919
</html>
20-
<!-- Other dependencies: resources/urltestdata.json -->
20+
<!--
21+
Other dependencies:
22+
* resources/urltestdata.json,
23+
* resources/urltestdata-javascript-only.json,
24+
-->

test/fixtures/wpt/url/a-element.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
<base id=base>
1111
<div id=log></div>
1212
<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+
-->
1418

1519

1620
<a id="multline-entity" download="multline-entity.txt" href="data:text/plain;charset=utf-8,first%20line&#10;second%20line"> Link with embedded \n is parsed correctly </a>

test/fixtures/wpt/url/failure.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
<script src=/resources/testharnessreport.js></script>
77
<div id=log></div>
88
<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…");
1013

1114
function runTests(testData) {
1215
for (const test of testData) {

test/fixtures/wpt/url/idlharness-shadowrealm.window.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

test/fixtures/wpt/url/idlharness.any.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// META: script=/resources/WebIDLParser.js
22
// META: script=/resources/idlharness.js
3+
// META: global=window,dedicatedworker,shadowrealm-in-window
34

45
idl_test(
56
['url'],

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy