diff options
author | Jose <jose@zeroc.com> | 2016-08-19 21:25:18 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-08-19 21:25:18 +0200 |
commit | c8d32e04873be7938915c606027c84c8ab832f6b (patch) | |
tree | f862751cfaddcf5bb7b82a7c04a299d471f948d4 /js/bin/HttpServer.js | |
parent | Fix ICE-7278 (diff) | |
download | ice-c8d32e04873be7938915c606027c84c8ab832f6b.tar.bz2 ice-c8d32e04873be7938915c606027c84c8ab832f6b.tar.xz ice-c8d32e04873be7938915c606027c84c8ab832f6b.zip |
ES6 mapping updates
Diffstat (limited to 'js/bin/HttpServer.js')
-rw-r--r-- | js/bin/HttpServer.js | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/js/bin/HttpServer.js b/js/bin/HttpServer.js index ae5ea56f674..12845731add 100644 --- a/js/bin/HttpServer.js +++ b/js/bin/HttpServer.js @@ -60,8 +60,11 @@ function Init() var match = req.url.pathname.match("^\/test/(.*)/index\.html"); if(match) { + var es5 = match[1].indexOf("/es5/") !== -1; + var m = es5 ? match[1].replace("/es5/", "/") : match[1]; + // That is a test case - var testCase = TestCases[match[1]]; + var testCase = TestCases[m]; if(testCase === undefined) { res.writeHead(404); @@ -70,7 +73,7 @@ function Init() } else { - TestData.current = match[1]; + TestData.current = m; if(req.url.query.next == "true") { var testCase = TestData.tests[0]; @@ -100,6 +103,11 @@ function Init() protocol = "http"; } + if(es5) + { + testCase = testCase.replace("Ice/", "Ice/es5/"); + } + var location = url.format( { protocol: protocol, @@ -117,13 +125,30 @@ function Init() { if(req.url.query.worker != "true") { - TestData.scripts = + TestData.scripts = []; + + if(es5) + { + TestData.scripts = [ - "/lib/Ice.js", + "/node_modules/babel-polyfill/dist/polyfill.js", + "/node_modules/regenerator-runtime/runtime.js", + "/lib/es5/Ice.js", "/test/Common/TestRunner.js", "/test/Common/TestSuite.js", - "/test/Common/Controller.js" + "/test/Common/es5/Controller.js" ].concat(testCase.files); + } + else + { + TestData.scripts = + [ + "/lib/Ice.js", + "/test/Common/TestRunner.js", + "/test/Common/TestSuite.js", + "/test/Common/Controller.js" + ].concat(testCase.files); + } } else { |