diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-09-14 10:56:49 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-09-14 10:56:49 +0200 |
commit | 228808bd70a032ee9f20ad5bdd00f2b79578a84b (patch) | |
tree | 58f456e2c2b5625a26cac2d698cc664166ff1a32 /js | |
parent | Additional fixes to allow building mappings against C++ binary distribution (diff) | |
download | ice-228808bd70a032ee9f20ad5bdd00f2b79578a84b.tar.bz2 ice-228808bd70a032ee9f20ad5bdd00f2b79578a84b.tar.xz ice-228808bd70a032ee9f20ad5bdd00f2b79578a84b.zip |
Allow running JS tests with browser started manually (eventually
from remote host).
Use --browser=Manual with ./allTests.py and connect to the given
URL with the browser. If browser is running on a different host,
you'll need to start ./allTests.py --host=<host> with host set
to the IP address of the machine running ./allTests.py
Fixes ICE-8366
Diffstat (limited to 'js')
-rw-r--r-- | js/bin/HttpServer.js | 8 | ||||
-rw-r--r-- | js/test/Common/ControllerI.js | 10 | ||||
-rw-r--r-- | js/test/Ice/objects/Client.js | 1 | ||||
-rw-r--r-- | js/test/Ice/objects/Server.js | 1 |
4 files changed, 18 insertions, 2 deletions
diff --git a/js/bin/HttpServer.js b/js/bin/HttpServer.js index b08bb4bca33..e432f7a09e7 100644 --- a/js/bin/HttpServer.js +++ b/js/bin/HttpServer.js @@ -232,6 +232,14 @@ function Init() res.end(controller.render(TestData)) console.log("HTTP/200 (Ok) " + req.method + " " + req.url.pathname); } + else if(req.url.pathname === '/start') + { + res.writeHead(302, + { + "Location": "/test/Ice/acm/controller.html&port=15002" + }); + res.end(); + } else { var iceLib = libraries.indexOf(req.url.pathname) !== -1; diff --git a/js/test/Common/ControllerI.js b/js/test/Common/ControllerI.js index 9c32b492b89..49aa36ddcbb 100644 --- a/js/test/Common/ControllerI.js +++ b/js/test/Common/ControllerI.js @@ -97,7 +97,7 @@ class ProcessI extends Test.Common.Process } } -class ProcessControllerI extends Test.Common.ProcessController +class ProcessControllerI extends Test.Common.BrowserProcessController { constructor(clientOutput, serverOutput, useWorker, scripts) { @@ -193,6 +193,12 @@ class ProcessControllerI extends Test.Common.ProcessController { return "127.0.0.1"; } + + redirect(url, current) + { + current.con.close(Ice.ConnectionClose.Gracefully); + window.location.href = url; + } } function runController(clientOutput, serverOutput, scripts) @@ -272,7 +278,7 @@ function runController(clientOutput, serverOutput, scripts) }; let comm = Ice.initialize(initData); - let str = "Util/ProcessControllerRegistry:" + protocol + " -h 127.0.0.1 -p " + port; + let str = "Util/ProcessControllerRegistry:" + protocol + " -h " + document.location.hostname + " -p " + port; let registry = Test.Common.ProcessControllerRegistryPrx.uncheckedCast(comm.stringToProxy(str)); comm.createObjectAdapter("").then( adapter => diff --git a/js/test/Ice/objects/Client.js b/js/test/Ice/objects/Client.js index 1ecf83e6e02..6c463e380cd 100644 --- a/js/test/Ice/objects/Client.js +++ b/js/test/Ice/objects/Client.js @@ -526,6 +526,7 @@ var run = function(out, id) { + id.properties.setProperty("Ice.Warn.Connections", "0"); var c = Ice.initialize(id); return Ice.Promise.try(() => allTests(out, c)).finally(() => c.destroy()); }; diff --git a/js/test/Ice/objects/Server.js b/js/test/Ice/objects/Server.js index 526bdd4a66e..8928e715f67 100644 --- a/js/test/Ice/objects/Server.js +++ b/js/test/Ice/objects/Server.js @@ -24,6 +24,7 @@ var run = function(out, id, ready) { id.properties.setProperty("Ice.Warn.Dispatch", "0"); + id.properties.setProperty("Ice.Warn.Connections", "0"); var communicator = Ice.initialize(id); var adapter; var echo = Test.EchoPrx.uncheckedCast(communicator.stringToProxy("__echo:default -p 12010")); |