Skip to content

Commit

Permalink
test: fix WPT URL tests that fetch JSON data
Browse files Browse the repository at this point in the history
PR-URL: #37624
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
targos committed Mar 9, 2021
1 parent 7f54dd4 commit 52ca115
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/common/wpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,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"]
}
}

0 comments on commit 52ca115

Please sign in to comment.