Skip to content

Commit

Permalink
Enable URLPattern tests in ShadowRealm
Browse files Browse the repository at this point in the history
Requires using fetch_json to download the test data, and absolute paths in
meta script tags.
  • Loading branch information
ptomato committed Nov 22, 2024
1 parent 53c06dc commit 5e3217a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
3 changes: 1 addition & 2 deletions urlpattern/resources/urlpattern-compare-tests.tentative.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ function runTests(data) {
}

promise_test(async function() {
const response = await fetch('resources/urlpattern-compare-test-data.json');
const data = await response.json();
const data = await fetch_json('/urlpattern/resources/urlpattern-compare-test-data.json');
runTests(data);
}, 'Loading data...');
3 changes: 1 addition & 2 deletions urlpattern/resources/urlpatterntests.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ function runTests(data) {
}

promise_test(async function() {
const response = await fetch('resources/urlpatterntestdata.json');
const data = await response.json();
const data = await fetch_json('/urlpattern/resources/urlpatterntestdata.json');
runTests(data);
}, 'Loading data...');
4 changes: 2 additions & 2 deletions urlpattern/urlpattern-compare.tentative.any.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// META: global=window,worker
// META: script=resources/urlpattern-compare-tests.tentative.js
// META: global=window,worker,shadowrealm
// META: script=/urlpattern/resources/urlpattern-compare-tests.tentative.js
4 changes: 2 additions & 2 deletions urlpattern/urlpattern-compare.tentative.https.any.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// META: global=window,worker
// META: script=resources/urlpattern-compare-tests.tentative.js
// META: global=window,worker,shadowrealm
// META: script=/urlpattern/resources/urlpattern-compare-tests.tentative.js
4 changes: 2 additions & 2 deletions urlpattern/urlpattern-hasregexpgroups.any.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// META: global=window,worker
// META: script=resources/urlpattern-hasregexpgroups-tests.js
// META: global=window,worker,shadowrealm
// META: script=/urlpattern/resources/urlpattern-hasregexpgroups-tests.js
4 changes: 2 additions & 2 deletions urlpattern/urlpattern.any.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// META: global=window,worker
// META: script=resources/urlpatterntests.js
// META: global=window,worker,shadowrealm-in-window,shadowrealm-in-shadowrealm,shadowrealm-in-dedicatedworker,shadowrealm-in-sharedworker
// META: script=/urlpattern/resources/urlpatterntests.js
4 changes: 2 additions & 2 deletions urlpattern/urlpattern.https.any.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// META: global=window,worker
// META: script=resources/urlpatterntests.js
// META: global=window,worker,shadowrealm
// META: script=/urlpattern/resources/urlpatterntests.js

0 comments on commit 5e3217a

Please sign in to comment.