Skip to content

Commit b4e0e1e

Browse files
committed
Enable ShadowRealm testing for more URL APIs
1 parent 358c751 commit b4e0e1e

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

url/IdnaTestV2.window.js url/IdnaTestV2.any.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
promise_test(() => fetch("resources/IdnaTestV2.json").then(res => res.json()).then(runTests), "Loading data…");
1+
// META: global=window,dedicatedworker,shadowrealm
2+
promise_test(() => fetch_json("resources/IdnaTestV2.json").then(runTests), "Loading data…");
23

34
// Performance impact of this seems negligible (performance.now() diff in WebKit went from 48 to 52)
45
// and there was a preference to let more non-ASCII hit the parser.

url/url-constructor.any.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// META: global=window,dedicatedworker,shadowrealm
12
// META: script=/common/subset-tests-by-key.js
23
// META: timeout=long
34
// META: variant=?include=file
@@ -51,6 +52,6 @@ function runURLTests(urlTests) {
5152
}
5253

5354
promise_test(() => Promise.all([
54-
fetch("resources/urltestdata.json").then(res => res.json()),
55-
fetch("resources/urltestdata-javascript-only.json").then(res => res.json()),
55+
fetch_json("resources/urltestdata.json"),
56+
fetch_json("resources/urltestdata-javascript-only.json"),
5657
]).then((tests) => tests.flat()).then(runURLTests), "Loading data…");

url/url-origin.any.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
// META: global=window,dedicatedworker,shadowrealm
12
promise_test(() => Promise.all([
2-
fetch("resources/urltestdata.json").then(res => res.json()),
3-
fetch("resources/urltestdata-javascript-only.json").then(res => res.json()),
3+
fetch_json("resources/urltestdata.json"),
4+
fetch_json("resources/urltestdata-javascript-only.json"),
45
]).then((tests) => tests.flat()).then(runURLTests), "Loading data…");
56

67
function runURLTests(urlTests) {

url/url-setters.any.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// META: global=window,dedicatedworker,shadowrealm
12
// META: script=/common/subset-tests-by-key.js
23
// META: variant=?include=file
34
// META: variant=?include=javascript
@@ -6,7 +7,7 @@
67

78
// Keep this file in sync with url-setters-a-area.window.js.
89

9-
promise_test(() => fetch("resources/setters_tests.json").then(res => res.json()).then(runURLSettersTests), "Loading data…");
10+
promise_test(() => fetch_json("resources/setters_tests.json").then(runURLSettersTests), "Loading data…");
1011

1112
function runURLSettersTests(all_test_cases) {
1213
for (var attribute_to_be_set in all_test_cases) {

0 commit comments

Comments
 (0)