summaryrefslogtreecommitdiff
path: root/js/bin/HttpServer.js
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-09-29 23:00:43 +0200
committerJose <jose@zeroc.com>2017-09-29 23:00:43 +0200
commit5c6ce4af1d5bc8a2735f2b640df4b83f78602850 (patch)
treeb3fd248c041453eaf780fd1dc958b2d64c1e2f60 /js/bin/HttpServer.js
parentRemoved Ice/acm test for IE to workaround security failure (diff)
downloadice-5c6ce4af1d5bc8a2735f2b640df4b83f78602850.tar.bz2
ice-5c6ce4af1d5bc8a2735f2b640df4b83f78602850.tar.xz
ice-5c6ce4af1d5bc8a2735f2b640df4b83f78602850.zip
Update JavaScript testsuite to use async/await
Diffstat (limited to 'js/bin/HttpServer.js')
-rw-r--r--js/bin/HttpServer.js26
1 files changed, 15 insertions, 11 deletions
diff --git a/js/bin/HttpServer.js b/js/bin/HttpServer.js
index e432f7a09e7..577a8952290 100644
--- a/js/bin/HttpServer.js
+++ b/js/bin/HttpServer.js
@@ -28,16 +28,14 @@ function Init()
var TestData = {
cssDeps: [
- "https://cdnjs.cloudflare.com/ajax/libs/foundation/5.3.3/css/foundation.min.css",
- "https://cdnjs.cloudflare.com/ajax/libs/animo.js/1.0.3/animate-animo.min.css"
+ "https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/css/foundation.min.css"
],
jsDeps: [
"https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js",
- "https://cdnjs.cloudflare.com/ajax/libs/foundation/5.3.3/js/foundation.min.js",
+ "https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/js/foundation.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/spin.js/2.3.2/spin.min.js",
- "https://cdnjs.cloudflare.com/ajax/libs/URI.js/1.18.10/URI.min.js",
- "https://cdnjs.cloudflare.com/ajax/libs/animo.js/1.0.3/animo.min.js",
+ "https://cdnjs.cloudflare.com/ajax/libs/URI.js/1.18.12/URI.min.js",
"/assets/jquery.spin.js"
]
};
@@ -152,8 +150,8 @@ function Init()
[
"/node_modules/babel-polyfill/dist/polyfill.js",
"/lib/es5/Ice.js",
- "/test/Common/TestRunner.js",
- "/test/Common/TestSuite.js",
+ "/test/es5/Common/TestRunner.js",
+ "/test/es5/Common/TestSuite.js",
"/test/es5/Common/Controller.js"
].concat(testSuite.files);
@@ -175,10 +173,7 @@ function Init()
}
else
{
- TestData.scripts =
- [
- "/test/Common/TestSuite.js"
- ];
+ TestData.scripts = es5 ? ["/test/es5/Common/TestSuite.js"] : ["/test/Common/TestSuite.js"];
}
TestData.languages = languages.slice();
if(testSuite.files.indexOf("Server.js") >= 0)
@@ -196,6 +191,7 @@ function Init()
var es5 = matchController[1].indexOf("es5/") !== -1;
var m = es5 ? matchController[1].replace("es5/", "") : matchController[1];
var testpath = path.resolve(path.join(this._basePath, "test", matchController[1]))
+ var worker = req.url.query.worker == "True";
var scripts = es5 ? [
"/node_modules/babel-polyfill/dist/polyfill.js",
"/lib/es5/Ice.js",
@@ -206,6 +202,7 @@ function Init()
"/test/Common/Controller.js",
"/test/Common/ControllerI.js",
];
+
var testSuite = TestSuites[m];
if(testSuite)
{
@@ -228,6 +225,13 @@ function Init()
{
TestData.scripts = scripts.concat(fs.readdirSync(testpath).filter(function(f) { return path.extname(f) === ".js"; }))
}
+
+ if(worker)
+ {
+ // Do not include babel polyfill when using workers, it is bundle with the controllerwoker
+ TestData.workerScripts = TestData.scripts.filter(script => script.indexOf("/babel-polyfill/") === -1);
+ }
+
res.writeHead(200, {"Content-Type": "text/html"});
res.end(controller.render(TestData))
console.log("HTTP/200 (Ok) " + req.method + " " + req.url.pathname);