Bug 1288768 - Better error reporting for network errors in workers

This commit is contained in:
janekptacijarabaci 2018-04-04 21:36:41 +02:00 committed by Roy Tam
commit 6509b677d3
8 changed files with 7 additions and 22 deletions

View file

@ -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();
}