diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/BuildInstructions.md | 8 | ||||
-rw-r--r-- | js/assets/icejs.css | 4 | ||||
-rw-r--r-- | js/bin/HttpServer.js | 16 | ||||
-rw-r--r-- | js/gulpfile.js | 11 | ||||
-rw-r--r-- | js/index.html | 44 | ||||
-rw-r--r-- | js/package.json | 1 | ||||
-rw-r--r-- | js/test/Common/index.html | 31 |
7 files changed, 40 insertions, 75 deletions
diff --git a/js/BuildInstructions.md b/js/BuildInstructions.md index 609e32a5e5c..554af355a30 100644 --- a/js/BuildInstructions.md +++ b/js/BuildInstructions.md @@ -21,7 +21,7 @@ the directory of your Ice for C++ installation. For example, on Unix: On Windows: > set ICE_HOME=C:\Ice - + Change to the Ice for JavaScript source subdirectory: > cd js @@ -45,14 +45,14 @@ To start the browser tests run: > npm run gulp:test:run-with-browser This script requires Ice for Python to be installed. Follow the instructions -from your Ice distribution to set up the environment for Ice for Python. +from your Ice distribution to set up the environment for Ice for Python. The first time you run the script, you will be prompted for your password. This is necessary to configure the trust setting for the HTTP server certificate, which will enable you to connect to the HTTP server with SSL via your web browser. -You can then navigate to http://127.0.0.1:8080/index.html to start the tests. +You can then navigate to http://127.0.0.1:8080 to start the tests. ### Browser Information @@ -94,7 +94,7 @@ the "Security" settings tab, deselect the "Enable Protected Mode" checkbox. ## Installing a Source Build -After a successful build, you can generate an npm package by running the +After a successful build, you can generate a npm package by running the following command: > npm pack diff --git a/js/assets/icejs.css b/js/assets/icejs.css index 12e63405c52..72fbd4c1fdc 100644 --- a/js/assets/icejs.css +++ b/js/assets/icejs.css @@ -24,9 +24,9 @@ body { height:100%;} #body {padding:10px; padding-top: 100px /* Height of the header */; padding-bottom:80px; /* Height of the footer */} #console { height: 150px; } -#chat-form #output { height: 300px; } +#chat-form #output { height: 300px; } #source-modal .tabs-content{ max-height:500px; overflow:hidden; } #source-modal .content{ max-height:500px; overflow:auto; width:100%; } -.pricing-table .description { min-height: 100px;}
\ No newline at end of file +.pricing-table .description { min-height: 100px;} diff --git a/js/bin/HttpServer.js b/js/bin/HttpServer.js index fb205988db5..5a7239e2cb8 100644 --- a/js/bin/HttpServer.js +++ b/js/bin/HttpServer.js @@ -58,8 +58,8 @@ function Init() { var iceLib = libraries.indexOf(req.url.pathname) !== -1; var iceLibMap = libraryMaps.indexOf(req.url.pathname) !== -1; - - var basePath = (process.env.USE_BIN_DIST == "yes" && (iceLib || iceLibMap)) ? + + var basePath = (process.env.USE_BIN_DIST == "yes" && (iceLib || iceLibMap)) ? path.resolve(path.join(require.resolve("ice"), "..", "..")) : this._basePath; var filePath = path.resolve(path.join(basePath, req.url.pathname)); @@ -134,7 +134,17 @@ function Init() } else { - if(!stats.isFile()) + if(req.url.pathname === '/') + { + res.writeHead(302, + { + "Location": "test/Ice/acm/index.html" + }); + res.end(); + console.log("HTTP/302 (Found) " + req.method + " " + req.url.pathname + " -> " + + "test/Ice/acm/index.html"); + } + else if(!stats.isFile()) { res.writeHead(403); res.end("403 Forbiden"); diff --git a/js/gulpfile.js b/js/gulpfile.js index 6c9adc1266b..da25f1c079c 100644 --- a/js/gulpfile.js +++ b/js/gulpfile.js @@ -385,16 +385,17 @@ gulp.task("test:run-with-browser", ["watch"].concat(useBinDist ? ["test"] : ["bu require("./bin/HttpServer")(); var p = require("child_process").spawn("python", ["../scripts/TestController.py"], {stdio: "inherit"}); - process.on("SIGINT", function() { p.kill()}); - process.on("exit", function() { p.kill() }); - return gulp.src("./index.html").pipe(open("", {url: "http://127.0.0.1:8080/test/Ice/acm/index.html"})); + process.on("SIGINT", function() { p.kill(); }); + process.on("exit", function() { p.kill(); }); + return gulp.src("./test/Ice/acm/index.html") + .pipe(open("", {url: "http://127.0.0.1:8080/test/Ice/acm/index.html"})); }); gulp.task("test:run-with-node", (useBinDist ? ["test"] : ["build"]), function(){ var p = require("child_process").spawn("python", ["allTests.py", "--all"], {stdio: "inherit"}); - process.on("SIGINT", function() { p.kill()}); - process.on("exit", function() { p.kill() }); + process.on("SIGINT", function() { p.kill(); }); + process.on("exit", function() { p.kill(); }); }); gulp.task("lint:html", ["build"], diff --git a/js/index.html b/js/index.html deleted file mode 100644 index 186fbb061a4..00000000000 --- a/js/index.html +++ /dev/null @@ -1,44 +0,0 @@ -<!doctype html> -<html class="no-js" lang="en"> - <head> - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>Ice for JavaScript</title> - <link rel="stylesheet" type="text/css" href="assets/common.css" /> - <link rel="icon" type="image/x-icon" href="assets/favicon.ico"> - </head> - <body> - <div id="header"> - <nav class="top-bar" data-topbar> - <ul class="title-area"> - <li class="name"> - <h1><a href="#">Ice for JavaScript</a></h1> - </li> - </ul> - </nav> - <ul class="breadcrumbs"> - <li class="current"><a href="#">Ice</a></li> - </ul> - </div> - <section role="main" id="body"> - <div class="row"> - <div class="large-12 medium-12 columns"> - <h3>Ice for JavaScript brings the power of Ice directly to the browser.</h3> - <h5>Start learning about Ice for JavaScript by experimenting with the sample programs.</h5> - <a class="button expand" href="demo/index.html">Sample Programs</a> - <h5>Use the test suite to ensure everything works in your target browsers.</h5> - <a class="button expand" href="test/Ice/acm/index.html">Test Suite</a> - </div> - </div> - </section> - <div id="footer" class="show-for-medium-up"> - <div class="logo"> - <h4><strong>ZeroC</strong></h4> - </div> - <div class="copyright"> - <h6>© 2003-2015 ZeroC, Inc. All rights reserved.</h6> - </div> - </div> - <script type="text/javascript" src="assets/common.min.js"></script> - </body> -</html> diff --git a/js/package.json b/js/package.json index 673c07f304f..448f320d8aa 100644 --- a/js/package.json +++ b/js/package.json @@ -44,7 +44,6 @@ "gulp:clean": "gulp clean", "gulp:test": "gulp test", "gulp:lint": "gulp lint", - "gulp:demo:run": "gulp demo:run", "gulp:test:run-with-browser": "gulp test:run-with-browser", "gulp:test:run-with-node": "gulp test:run-with-node" } diff --git a/js/test/Common/index.html b/js/test/Common/index.html index c46509ef8ae..3842fff78d5 100644 --- a/js/test/Common/index.html +++ b/js/test/Common/index.html @@ -11,7 +11,7 @@ <nav class="top-bar" data-topbar> <ul class="title-area"> <li class="name"> - <h1><a href="../../../index.html">Ice for JavaScript</a></h1> + <h1><a href="#">Ice for Javascript</a></h1> </li> <li class="toggle-topbar menu-icon"><a href="#">Menu</a></li> </ul> @@ -24,7 +24,7 @@ </section> </nav> <ul class="breadcrumbs"> - <li><a href="../../../index.html">Ice</a></li> + <li>Ice</li> <li class="current"><a href="#">Test</a></li> </ul> </div> @@ -111,11 +111,11 @@ <script type="text/javascript"> /* jshint browser:true, jquery:true */ var TestCases = { - "Ice/acm": + "Ice/acm": { files: ["Test.js", "Client.js"] }, - "Ice/ami": + "Ice/ami": { files: ["Test.js", "Client.js"] }, @@ -140,7 +140,7 @@ }, ] }, - "Ice/exceptions": + "Ice/exceptions": { files: ["Test.js", "Client.js"], configurations: @@ -165,7 +165,7 @@ } ] }, - "Ice/exceptionsBidir": + "Ice/exceptionsBidir": { files: ["Test.js", "TestAMD.js", "ThrowerI.js", "AMDThrowerI.js", "../exceptions/Client.js", "Client.js"], @@ -178,19 +178,19 @@ { files: ["Test.js", "TestI.js", "../facets/Client.js", "Client.js"] }, - "Ice/hold": + "Ice/hold": { files: ["Test.js", "Client.js"] }, - "Ice/inheritance": + "Ice/inheritance": { files: ["Test.js", "Client.js"] }, - "Ice/inheritanceBidir": + "Ice/inheritanceBidir": { files: ["Test.js", "InitialI.js", "../inheritance/Client.js", "Client.js"], }, - "Ice/operations": + "Ice/operations": { files: ["Test.js", "Twoways.js", "Oneways.js", "BatchOneways.js", "Client.js"], configurations: @@ -209,9 +209,9 @@ } ] }, - "Ice/operationsBidir": + "Ice/operationsBidir": { - files: ["Test.js", "TestAMD.js", "../operations/Twoways.js", "../operations/Oneways.js", + files: ["Test.js", "TestAMD.js", "../operations/Twoways.js", "../operations/Oneways.js", "../operations/BatchOneways.js", "MyDerivedClassI.js", "AMDMyDerivedClassI.js", "../operations/Client.js", "Client.js"] }, @@ -247,9 +247,9 @@ } ] }, - "Ice/optionalBidir": + "Ice/optionalBidir": { - files: ["Test.js", "TestAMD.js", "InitialI.js", "AMDInitialI.js", "../optional/Client.js", + files: ["Test.js", "TestAMD.js", "InitialI.js", "AMDInitialI.js", "../optional/Client.js", "Client.js"] }, "Ice/promise": @@ -260,7 +260,7 @@ { files: ["Client.js"] }, - "Ice/proxy": + "Ice/proxy": { files: ["Test.js", "Client.js"], configurations: @@ -272,7 +272,6 @@ name: "AMD server" } ] - }, "Ice/retry": { |