diff options
author | Jose <jose@zeroc.com> | 2016-10-04 10:20:24 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-10-04 10:20:24 +0200 |
commit | 8c3173fc13a8642e3a165f23f9bf1d087aec4a55 (patch) | |
tree | 2b75200cedf2241e5894f996bfc95e70c1fd685d /js/test/Common/Worker.js | |
parent | Another fix for ICE-7399 (diff) | |
download | ice-8c3173fc13a8642e3a165f23f9bf1d087aec4a55.tar.bz2 ice-8c3173fc13a8642e3a165f23f9bf1d087aec4a55.tar.xz ice-8c3173fc13a8642e3a165f23f9bf1d087aec4a55.zip |
Fixed (ICE-7404) - js Ice/binding hung on Windows with Chrome
Diffstat (limited to 'js/test/Common/Worker.js')
-rw-r--r-- | js/test/Common/Worker.js | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/js/test/Common/Worker.js b/js/test/Common/Worker.js index e7789c45ded..21e8cb9cc0d 100644 --- a/js/test/Common/Worker.js +++ b/js/test/Common/Worker.js @@ -11,7 +11,7 @@ self : false, runTest : false */ - + var Output = { write: function(msg) @@ -26,20 +26,34 @@ var Output = self.onmessage = function(e) { - if(e.data.type == "RunTest") + try { - var test = e.data.test; - self.importScripts("/lib/Ice.js"); - self.importScripts("/test/Common/Controller.js"); - self.importScripts("/test/Common/TestRunner.js"); - for(var i = 0; i < test.files.length; ++i) + if(e.data.type == "RunTest") { - self.importScripts("/test/" + test.name + "/" + test.files[i]); - } - runTest(test.name, test.language, test.defaultHost, test.protocol, test.configurations, Output).then( - function(r) + var test = e.data.test; + self.importScripts("/lib/Ice.js"); + self.importScripts("/test/Common/Controller.js"); + self.importScripts("/test/Common/TestRunner.js"); + for(var i = 0; i < test.files.length; ++i) { - self.postMessage({type:"TestFinished", success:r}); - }); + self.importScripts("/test/" + test.name + "/" + test.files[i]); + } + + runTest(test.name, test.language, test.defaultHost, test.protocol, test.configurations, Output).then( + function(r) + { + self.postMessage({type:"TestFinished", success:r}); + }).exception( + function(ex) + { + Output.writeLine(ex.toString()); + self.postMessage({type:"TestFinished", success:false}); + }); + } + } + catch(ex) + { + Output.writeLine(ex.toString()); + self.postMessage({type:"TestFinished", success:false}); } }; |