mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Bug 1288768 - Better error reporting for network errors in workers
This commit is contained in:
parent
12f3d0302c
commit
6509b677d3
8 changed files with 7 additions and 22 deletions
|
|
@ -53,9 +53,6 @@ function testWorker([mime, shouldLoad]) {
|
|||
};
|
||||
worker.onerror = (error) => {
|
||||
ok(!shouldLoad, `worker with wrong mime '${mime}' should be blocked`);
|
||||
let msg = error.message;
|
||||
ok(msg.match(/^NetworkError/) || msg.match(/Failed to load worker script/),
|
||||
"should gets correct error message");
|
||||
error.preventDefault();
|
||||
resolve();
|
||||
}
|
||||
|
|
@ -74,9 +71,6 @@ function testWorkerImportScripts([mime, shouldLoad]) {
|
|||
};
|
||||
worker.onerror = (error) => {
|
||||
ok(!shouldLoad, `worker/importScripts with wrong mime '${mime}' should be blocked`);
|
||||
let msg = error.message;
|
||||
ok(msg.match(/^NetworkError/) || msg.match(/Failed to load worker script/),
|
||||
"should gets correct error message");
|
||||
error.preventDefault();
|
||||
resolve();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue