Skip to content

Commit cb492ea

Browse files
committed
Enable URLPattern tests in ShadowRealm
Requires using fetch_json to download the test data.
1 parent 42b3be6 commit cb492ea

7 files changed

+7
-9
lines changed

urlpattern/resources/urlpattern-compare-tests.tentative.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ function runTests(data) {
2020
}
2121

2222
promise_test(async function() {
23-
const response = await fetch('resources/urlpattern-compare-test-data.json');
24-
const data = await response.json();
23+
const data = await fetch_json('resources/urlpattern-compare-test-data.json');
2524
runTests(data);
2625
}, 'Loading data...');

urlpattern/resources/urlpatterntests.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ function runTests(data) {
182182
}
183183

184184
promise_test(async function() {
185-
const response = await fetch('resources/urlpatterntestdata.json');
186-
const data = await response.json();
185+
const data = await fetch_json('resources/urlpatterntestdata.json');
187186
runTests(data);
188187
}, 'Loading data...');
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// META: global=window,worker
1+
// META: global=window,worker,shadowrealm-in-window,shadowrealm-in-shadowrealm,shadowrealm-in-dedicatedworker,shadowrealm-in-sharedworker
22
// META: script=resources/urlpattern-compare-tests.tentative.js
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// META: global=window,worker
1+
// META: global=window,worker,shadowrealm
22
// META: script=resources/urlpattern-compare-tests.tentative.js
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// META: global=window,worker
1+
// META: global=window,worker,shadowrealm
22
// META: script=resources/urlpattern-hasregexpgroups-tests.js

urlpattern/urlpattern.any.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// META: global=window,worker
1+
// META: global=window,worker,shadowrealm-in-window,shadowrealm-in-shadowrealm,shadowrealm-in-dedicatedworker,shadowrealm-in-sharedworker
22
// META: script=resources/urlpatterntests.js

urlpattern/urlpattern.https.any.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// META: global=window,worker
1+
// META: global=window,worker,shadowrealm
22
// META: script=resources/urlpatterntests.js

0 commit comments

Comments
 (0)