diff options
author | Benoit Foucher <benoit@zeroc.com> | 2015-04-28 19:27:04 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2015-04-28 19:27:04 +0200 |
commit | e6e102cc642e78cf9da55645c82f5bfe6eacb76d (patch) | |
tree | ab5861ee9ad2a909fa0dc8f25b1b12e0dd1d6527 /js/test | |
parent | Fixed ICE-6443 and other SSL fixes (diff) | |
download | ice-e6e102cc642e78cf9da55645c82f5bfe6eacb76d.tar.bz2 ice-e6e102cc642e78cf9da55645c82f5bfe6eacb76d.tar.xz ice-e6e102cc642e78cf9da55645c82f5bfe6eacb76d.zip |
Fixed previous commit which was incomplete
Diffstat (limited to 'js/test')
-rw-r--r-- | js/test/Ice/proxy/Client.js | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/js/test/Ice/proxy/Client.js b/js/test/Ice/proxy/Client.js index 38bdd4d2310..d31c1f9b1b1 100644 --- a/js/test/Ice/proxy/Client.js +++ b/js/test/Ice/proxy/Client.js @@ -10,6 +10,7 @@ (function(module, require, exports) { var Ice = require("ice").Ice; + var IceSSL = require("ice").IceSSL; var Test = require("Test").Test; var Promise = Ice.Promise; @@ -916,7 +917,7 @@ } var p1, pstr; - + // Legal TCP endpoint expressed as opaque endpoint p1 = communicator.stringToProxy("test -e 1.1:opaque -e 1.0 -t 1 -v CTEyNy4wLjAuMeouAAAQJwAAAA=="); pstr = communicator.proxyToString(p1); @@ -1019,6 +1020,40 @@ ).then( function() { + var p = communicator.stringToProxy("test:default -p 12010"); + if(defaultProtocol === "tcp") + { + test(p.ice_getEndpoints()[0].getInfo() instanceof Ice.TCPEndpointInfo); + } + else if(defaultProtocol === "ws") + { + test(p.ice_getEndpoints()[0].getInfo() instanceof Ice.WSEndpointInfo); + } + else if(defaultProtocol === "wss") + { + test(p.ice_getEndpoints()[0].getInfo() instanceof IceSSL.WSSEndpointInfo); + } + return p.ice_getConnection() + } + ).then( + function(con) + { + if(defaultProtocol === "tcp") + { + test(con.getInfo() instanceof Ice.TCPConnectionInfo); + } + else if(defaultProtocol === "ws") + { + test(con.getInfo() instanceof Ice.WSConnectionInfo); + } + else if(defaultProtocol === "wss") + { + test(con.getInfo() instanceof IceSSL.WSSConnectionInfo); + } + } + ).then( + function() + { out.writeLine("ok"); var derived = Test.MyDerivedClassPrx.uncheckedCast(communicator.stringToProxy("test:default -p 12010")); return derived.shutdown(); |