diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-04 21:36:41 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-04 21:36:41 +0200 |
commit | 6d1a75e0d652e3f79645effdade8e0f23e7d3a6f (patch) | |
tree | d97bd3b77a6ee48cbaab34ab929aff7df4befd64 /dom/workers | |
parent | d8d5c06b9edc833bcbb213e18476acc648602280 (diff) | |
download | uxp-6d1a75e0d652e3f79645effdade8e0f23e7d3a6f.tar.gz |
Bug 1288768 - Better error reporting for network errors in workers
Diffstat (limited to 'dom/workers')
-rw-r--r-- | dom/workers/test/test_404.html | 1 | ||||
-rw-r--r-- | dom/workers/test/test_bug1036484.html | 1 | ||||
-rw-r--r-- | dom/workers/test/test_loadError.html | 8 |
3 files changed, 2 insertions, 8 deletions
diff --git a/dom/workers/test/test_404.html b/dom/workers/test/test_404.html index e2e83a35e3..15e5ded684 100644 --- a/dom/workers/test/test_404.html +++ b/dom/workers/test/test_404.html @@ -25,7 +25,6 @@ Tests of DOM Worker Threads worker.onerror = function(event) { is(event.target, worker); - is(event.message, 'NetworkError: Failed to load worker script at "nonexistent_worker.js"'); event.preventDefault(); SimpleTest.finish(); }; diff --git a/dom/workers/test/test_bug1036484.html b/dom/workers/test/test_bug1036484.html index 17b9d490fe..49c31bbc9e 100644 --- a/dom/workers/test/test_bug1036484.html +++ b/dom/workers/test/test_bug1036484.html @@ -25,7 +25,6 @@ function test(script) { worker.onerror = function(event) { is(event.target, worker); - ok(event.message.startsWith("NetworkError: Failed to load worker script")) event.preventDefault(); runTests(); }; diff --git a/dom/workers/test/test_loadError.html b/dom/workers/test/test_loadError.html index dc109b796b..b9a215d11e 100644 --- a/dom/workers/test/test_loadError.html +++ b/dom/workers/test/test_loadError.html @@ -13,15 +13,13 @@ <script class="testbody" type="text/javascript"> "use strict"; -var loadErrorMessage = 'SecurityError: Failed to load worker script at "about:blank"'; - function nextTest() { (function(){ function workerfunc() { var subworker = new Worker("about:blank"); subworker.onerror = function(e) { e.preventDefault(); - postMessage(e.message); + postMessage("ERROR"); } } var b = new Blob([workerfunc+'workerfunc();']); @@ -37,7 +35,7 @@ function nextTest() { return; } w.onmessage = function(e) { - is(e.data, loadErrorMessage, + is(e.data, "ERROR", "Should catch the error when loading inner script"); if (++i < 2) callworker(i); else SimpleTest.finish(); @@ -54,8 +52,6 @@ try { var worker = new Worker("about:blank"); worker.onerror = function(e) { e.preventDefault(); - is(e.message, loadErrorMessage, - "Should get the right error from the toplevel script"); nextTest(); } |