Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix WPT URL tests that fetch JSON data #37624

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/common/wpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class WPTRunner {
const worker = new Worker(workerPath, {
execArgv: this.flags,
workerData: {
filename: testFileName,
testRelativePath: relativePath,
wptRunner: __filename,
wptPath: this.path,
initScript: this.initScript,
Expand Down
2 changes: 1 addition & 1 deletion test/common/wpt/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ global.require = require;
// in Node.js, but some tests and harness depend on this to pull
// resources.
global.fetch = function fetch(file) {
return resource.read(workerData.filename, file, true);
return resource.read(workerData.testRelativePath, file, true);
};

if (workerData.initScript) {
Expand Down
4 changes: 2 additions & 2 deletions test/wpt/status/url.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"fail": "FormData is not defined"
},
"url-constructor.any.js": {
"fail": "TODO: support relative fetch()"
"requires": ["small-icu"]
},
"url-origin.any.js": {
"fail": "TODO: support relative fetch()"
"requires": ["small-icu"]
}
}