From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- dom/url/tests/file_worker_url.jsm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 dom/url/tests/file_worker_url.jsm (limited to 'dom/url/tests/file_worker_url.jsm') diff --git a/dom/url/tests/file_worker_url.jsm b/dom/url/tests/file_worker_url.jsm new file mode 100644 index 0000000000..30a072ef9d --- /dev/null +++ b/dom/url/tests/file_worker_url.jsm @@ -0,0 +1,23 @@ +var EXPORTED_SYMBOLS = ["checkFromJSM"]; + +function checkFromJSM(ok, is, finish) { + let worker = new ChromeWorker("jsm_url_worker.js"); + worker.onmessage = function (event) { + if (event.data.type == "finish") { + finish(); + } else if (event.data.type == "url") { + URL.revokeObjectURL(event.data.url); + } else if (event.data.type == "status") { + ok(event.data.status, event.data.msg); + } + }; + + worker.onerror = function (event) { + is(event.target, worker); + ok(false, "Worker had an error: " + event.data); + worker.terminate(); + finish(); + }; + + worker.postMessage(0); +} -- cgit v1.2.3