From 61830893a6b545c52343aa10faa015f48140b6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 6 Mar 2021 11:05:22 +0100 Subject: [PATCH] test: fix WPT URL tests that fetch JSON data --- test/common/wpt.js | 2 +- test/common/wpt/worker.js | 2 +- test/wpt/status/url.json | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/test/common/wpt.js b/test/common/wpt.js index 89ec1f5148c20e..1ebf4e5d442215 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -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, diff --git a/test/common/wpt/worker.js b/test/common/wpt/worker.js index f0faeeba9e8062..afaee075f7a32e 100644 --- a/test/common/wpt/worker.js +++ b/test/common/wpt/worker.js @@ -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) { diff --git a/test/wpt/status/url.json b/test/wpt/status/url.json index 36b3fd682b37f9..17ffbdb952e17d 100644 --- a/test/wpt/status/url.json +++ b/test/wpt/status/url.json @@ -20,9 +20,6 @@ "fail": "FormData is not defined" }, "url-constructor.any.js": { - "fail": "TODO: support relative fetch()" - }, - "url-origin.any.js": { - "fail": "TODO: support relative fetch()" + "requires": ["small-icu"] } }