diff options
author | Jose <jose@zeroc.com> | 2015-09-22 13:10:27 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-09-22 13:10:27 +0200 |
commit | 279c7b5cd2b543bdd0011a15f449fef3a5ed1869 (patch) | |
tree | aea253a7a79a27e8dd6d6e4ffed473fbca7358d2 /js | |
parent | JS issue with Promise.delay (diff) | |
download | ice-279c7b5cd2b543bdd0011a15f449fef3a5ed1869.tar.bz2 ice-279c7b5cd2b543bdd0011a15f449fef3a5ed1869.tar.xz ice-279c7b5cd2b543bdd0011a15f449fef3a5ed1869.zip |
Safari Web Worker test suite issues
Diffstat (limited to 'js')
-rw-r--r-- | js/test/Common/TestRunner.js | 10 | ||||
-rw-r--r-- | js/test/Ice/ami/Client.js | 14 | ||||
-rw-r--r-- | js/test/Ice/timeout/Client.js | 10 |
3 files changed, 30 insertions, 4 deletions
diff --git a/js/test/Common/TestRunner.js b/js/test/Common/TestRunner.js index 37d3684dc4a..75a960644ed 100644 --- a/js/test/Common/TestRunner.js +++ b/js/test/Common/TestRunner.js @@ -14,6 +14,16 @@ Test : false, */ +function isSafari() +{ + return /^((?!chrome).)*safari/i.test(navigator.userAgent); +} + +function isWorker() +{ + return typeof(WorkerGlobalScope) !== 'undefined' && this instanceof WorkerGlobalScope; +} + function runTest(name, language, defaultHost, protocol, configurations, out) { var server, communicator; diff --git a/js/test/Ice/ami/Client.js b/js/test/Ice/ami/Client.js index 3f8e50b3399..402418707e3 100644 --- a/js/test/Ice/ami/Client.js +++ b/js/test/Ice/ami/Client.js @@ -499,13 +499,22 @@ return promise; } - var run = function(out, id) + exports.__test__ = function(out, id) { var communicator = Ice.initialize(id); return Promise.try( function() { - return allTests(communicator, out); + if(isSafari() && isWorker()) + { + out.writeLine("Test not supported with Safari web workers."); + return Test.TestIntfPrx.uncheckedCast( + communicator.stringToProxy("test:default -p 12010")).shutdown(); + } + else + { + return allTests(communicator, out); + } } ).finally( function() @@ -514,7 +523,6 @@ } ); }; - exports.__test__ = run; exports.__runServer__ = true; } (typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? module : undefined, diff --git a/js/test/Ice/timeout/Client.js b/js/test/Ice/timeout/Client.js index 5b5aad7b407..88fa0bb36db 100644 --- a/js/test/Ice/timeout/Client.js +++ b/js/test/Ice/timeout/Client.js @@ -458,7 +458,15 @@ return Promise.try( function() { - return allTests(out, c); + if(isSafari() && isWorker()) + { + out.writeLine("Test not supported with Safari web workers."); + return Test.TimeoutPrx.uncheckedCast(c.stringToProxy("timeout:default -p 12010")).shutdown(); + } + else + { + return allTests(out, c); + } } ).finally( function() |