From 519c961fe2899c983bf8fce4e45a3ff94ab8b2c6 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 | 4 ++-- 3 files changed, 4 insertions(+), 4 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..f70bdd5c5cf459 100644 --- a/test/wpt/status/url.json +++ b/test/wpt/status/url.json @@ -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"] } }