tests: Updating tests to have correct include path for ndn-js

Now all test cases include ndn-js.js directly.  Helper.js has been
removed from the source.

Status:
 - there is some problem with tests/test-PIT-matching.html
   In Chrome it complains about missing to_ccnb call on Object,
   In Firefox it is doing something, but not everything
diff --git a/js/Helper.js b/js/Helper.js
deleted file mode 100644
index 91bb6cb..0000000
--- a/js/Helper.js
+++ /dev/null
@@ -1,52 +0,0 @@
-// Including js files to be used in the web pages
-// Add your js source code reference here, rather than in the HTML files
-
-// Find path to Helper.js
-var scripts = document.getElementsByTagName('SCRIPT');
-var path = '';
-
-if(scripts && scripts.length>0) {
-    for(var i in scripts) {
-        if(scripts[i].src && scripts[i].src.match(/Helper\.js$/)) {
-            path = scripts[i].src.replace(/(.*)Helper\.js$/, '$1');
-        }
-    }
-}
-console.log(path);
-
-document.write('<script type="text/javascript" src="' + path + 'WebSocketTransport.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'util/CCNProtocolDTags.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'util/CCNTime.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'util/ExponentialReExpressClosure.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'Name.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'ContentObject.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'encoding/DateFormat.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'Interest.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'Key.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'PublisherID.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'PublisherPublicKeyDigest.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'FaceInstance.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'ForwardingEntry.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'Closure.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'encoding/DynamicUint8Array.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'encoding/BinaryXMLEncoder.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'encoding/BinaryXMLDecoder.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'encoding/BinaryXMLStructureDecoder.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'encoding/DataUtils.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'encoding/EncodingUtils.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'security/KeyManager.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'NDN.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'securityLib/jsbn.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'securityLib/jsbn2.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'securityLib/rsa.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'securityLib/rsa2.js"></script>');
-//document.write('<script type="text/javascript" src="' + path + 'securityLib/sha1.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'securityLib/sha256.js"></script>');
-//document.write('<script type="text/javascript" src="' + path + 'securityLib/sha512.js"></script>');
-//document.write('<script type="text/javascript" src="' + path + 'securityLib/md5.js"></script>');
-//document.write('<script type="text/javascript" src="' + path + 'securityLib/ripemd160.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'securityLib/base64.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'securityLib/rsapem-1.1.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'securityLib/rsasign-1.2.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'securityLib/asn1hex-1.1.js"></script>');
-document.write('<script type="text/javascript" src="' + path + 'securityLib/x509-1.1.js"></script>');
diff --git a/tests/test-PIT-matching.html b/tests/test-PIT-matching.html
index 4ccac10..a4a5eaf 100644
--- a/tests/test-PIT-matching.html
+++ b/tests/test-PIT-matching.html
@@ -10,12 +10,12 @@
 <head>

 	<title>NDN PIT Matching</title>

 	

-	<script type="text/javascript" src="../Helper.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

-		var ndn = new NDN({verify:false});

+		var ndn = new NDN({port:9696,host:"localhost", verify:false});

         

-        var AsyncGetClosure = function AsyncGetClosure(target) {

+                var AsyncGetClosure = function AsyncGetClosure(target) {

         	// Inherit from Closure.

 			Closure.call(this);

             

diff --git a/tests/test-decode-FaceInstance.html b/tests/test-decode-FaceInstance.html
index 922d881..1c203f2 100644
--- a/tests/test-decode-FaceInstance.html
+++ b/tests/test-decode-FaceInstance.html
@@ -11,7 +11,7 @@
 <head>

 	<title>NDN Decode Face Instance</title>

 	

-	<script type="text/javascript" src="../Helper.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

 

diff --git a/tests/test-decode-Interest+Forwarding+Entry.html b/tests/test-decode-Interest+Forwarding+Entry.html
index c08f0ef..83c0849 100644
--- a/tests/test-decode-Interest+Forwarding+Entry.html
+++ b/tests/test-decode-Interest+Forwarding+Entry.html
@@ -9,7 +9,7 @@
 <head>

 	<title>NDN Decode Interest + Face Instance</title>

 	

-	<script type="text/javascript" src="../Helper.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

 	

diff --git a/tests/test-encode-decode-ContentObject.html b/tests/test-encode-decode-ContentObject.html
index eb55741..1c2cfe0 100644
--- a/tests/test-encode-decode-ContentObject.html
+++ b/tests/test-encode-decode-ContentObject.html
@@ -9,7 +9,7 @@
 <head>

 	<title>NDN Encode/Decode Content Object</title>

 	

-	<script type="text/javascript" src="../Helper.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

 	

diff --git a/tests/test-encode-decode-Interest.html b/tests/test-encode-decode-Interest.html
index b72aee5..7beef74 100644
--- a/tests/test-encode-decode-Interest.html
+++ b/tests/test-encode-decode-Interest.html
@@ -9,7 +9,7 @@
 <head>

 	<title>NDN Encode/Decode Interest</title>

 	

-	<script type="text/javascript" src="../Helper.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

 	

diff --git a/tests/test-get-async.html b/tests/test-get-async.html
index 401d62d..ede20af 100644
--- a/tests/test-get-async.html
+++ b/tests/test-get-async.html
@@ -10,7 +10,7 @@
 <head>

 	<title>NDN Get via WebSocket</title>

 	

-	<script type="text/javascript" src="../tools/build/ndn-js.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

 		var ndn = new NDN();

diff --git a/tests/test-image-parsing.html b/tests/test-image-parsing.html
index a3c4f82..c1bdb98 100644
--- a/tests/test-image-parsing.html
+++ b/tests/test-image-parsing.html
@@ -9,7 +9,7 @@
 <head>
 	<title>NDN Image Parsing</title>
 
-    <script type="text/javascript" src="../Helper.js"></script>
+    <script type="text/javascript" src="../build/ndn-js.js"></script>
 		
 	<script type="text/javascript">
 		function sign(){
diff --git a/tests/test-interest-matches-name.html b/tests/test-interest-matches-name.html
index 993e1fc..48e00cb 100644
--- a/tests/test-interest-matches-name.html
+++ b/tests/test-interest-matches-name.html
@@ -9,7 +9,7 @@
 <head>

 	<title>NDN Interest Matches Name</title>

 	

-	<script type="text/javascript" src="../Helper.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

 	

diff --git a/tests/test-name.html b/tests/test-name.html
index 318511d..dd2a875 100644
--- a/tests/test-name.html
+++ b/tests/test-name.html
@@ -9,7 +9,7 @@
 <head>

 	<title>NDN Name</title>

 	

-	<script type="text/javascript" src="../Helper.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

 	

diff --git a/tests/test-path.html b/tests/test-path.html
index 3675bfe..430f182 100644
--- a/tests/test-path.html
+++ b/tests/test-path.html
@@ -10,7 +10,7 @@
 <head>

 	<title>Get path to Helper.js</title>

 	

-	<script type="text/javascript" src="../Helper.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

 		var ndn = new NDN();

diff --git a/tests/test-publish-async.html b/tests/test-publish-async.html
index 70b60a9..e3844e6 100644
--- a/tests/test-publish-async.html
+++ b/tests/test-publish-async.html
@@ -1,7 +1,7 @@
 <?xml version = "1.0" encoding="utf-8" ?>

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

 "DTD/xhtml1-strict.dtd">

-<!-- 

+<!--

 	See COPYING for copyright and distribution information.

 -->

 <html xmlns = "http://www.w3.org/1999/xhtml">

@@ -10,17 +10,17 @@
 

 <head>

 	<title>NDN Put via WebSocket</title>

-	

-	<script type="text/javascript" src="../tools/build/ndn-js.js"></script>	

-	

+

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

+

 	<script type="text/javascript">

 		var ndn = new NDN();

-        

+

         var AsyncPutClosure = function AsyncPutClosure() {

         	// Inherit from Closure.

 			Closure.call(this);

 		};

-		

+

 		AsyncPutClosure.prototype.upcall = function(kind, upcallInfo) {

 			if (kind == Closure.UPCALL_FINAL) {

 				// Do nothing.

@@ -30,49 +30,49 @@
 				var content = document.getElementById('content').value;

 				var interest = upcallInfo.interest;

 				var nameStr = interest.name.getName();

-				

+

 				var si = new SignedInfo();

-				

+

 				var co = new ContentObject(new Name(nameStr), si, content, new Signature());

 				co.sign();

-				

+

 				upcallInfo.contentObject = co;

 				return Closure.RESULT_INTEREST_CONSUMED;

 			}

 			return Closure.RESULT_OK;

 		};

-        

-		

+

+

 		function run() {

-			var contentName = document.getElementById('contentname').value;		

-			

+			var contentName = document.getElementById('contentname').value;

+

 			ndn.registerPrefix(new Name(contentName), new AsyncPutClosure());

-			

-			document.getElementById('result').innerHTML = 'Content name \'' + contentName 

+

+			document.getElementById('result').innerHTML = 'Content name \'' + contentName

 					+'\' published.';

 		}

-	

+

 		</script>

-	

+

 </head>

 <body >

 	<form>

 	<div>

 		<p>Please Enter a Content Name:</p>

-		

-		<input id="contentname" type="text" name="CONTENTNAME" value="/wentao.shang/regtest001" /> 

-		

+

+		<input id="contentname" type="text" name="CONTENTNAME" value="/wentao.shang/regtest001" />

+

                 <p>Please Enter the Content:</p>

-		

-		<textarea id="content" cols="40" rows="5" name="CONTENT" >This works!</textarea> 

-		

+

+		<textarea id="content" cols="40" rows="5" name="CONTENT" >This works!</textarea>

+

 		<br />

 		</div>

 	</form>

 	<div>

 		<button id="testBtn" onclick="run()">Publish Content</button>

 	</div>

-	

+

 	<p id="result"></p>

 

 </body>

diff --git a/tests/test-sha256.html b/tests/test-sha256.html
index d441249..ef62010 100644
--- a/tests/test-sha256.html
+++ b/tests/test-sha256.html
@@ -9,7 +9,7 @@
 <head>

 	<title>Test SHA-256</title>

 

-    <script type="text/javascript" src="../Helper.js"></script>

+    <script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/sha256.js"></script>

 	

diff --git a/tests/test-signature-binary.html b/tests/test-signature-binary.html
index c3e28bb..77650d1 100644
--- a/tests/test-signature-binary.html
+++ b/tests/test-signature-binary.html
@@ -9,7 +9,7 @@
 <head>

 	<title>NDN Signature - Binary</title>

 

-	<script type="text/javascript" src="../Helper.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

 		function sign(){

diff --git a/tests/test-signature-string.html b/tests/test-signature-string.html
index 025d065..0d0cab6 100644
--- a/tests/test-signature-string.html
+++ b/tests/test-signature-string.html
@@ -9,7 +9,7 @@
 <head>

 	<title>NDN Signature - String</title>

 

-    <script type="text/javascript" src="../Helper.js"></script>

+    <script type="text/javascript" src="../build/ndn-js.js"></script>

 		

 	<script type="text/javascript">

 		function sign(){

diff --git a/tests/test-throughput-http.html b/tests/test-throughput-http.html
index 3720be7..8635b2e 100644
--- a/tests/test-throughput-http.html
+++ b/tests/test-throughput-http.html
@@ -7,7 +7,7 @@
 <head>

 	<title>HTTP Get via XHR</title>

 	

-	<script type="text/javascript" src="../tools/build/ndn-js.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

 		function run() {

diff --git a/tests/test-throughput-ws-pipeline.html b/tests/test-throughput-ws-pipeline.html
index 8ece0f8..0389583 100644
--- a/tests/test-throughput-ws-pipeline.html
+++ b/tests/test-throughput-ws-pipeline.html
@@ -7,11 +7,10 @@
 <head>

 	<title>NDN Get File via WebSocket</title>

 	

-	<script type="text/javascript" src="../tools/build/ndn-js.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

-		hostip = "131.179.196.232";

-		//hostip = "localhost";

+		hostip = "localhost";

 		var ndncon = new NDN({port:9696,host:hostip});

 		//var ndncon = new NDN({port:9696,host:hostip,verify:false});

         

diff --git a/tests/test-throughput-ws.html b/tests/test-throughput-ws.html
index b059637..3f137e1 100644
--- a/tests/test-throughput-ws.html
+++ b/tests/test-throughput-ws.html
@@ -7,17 +7,14 @@
 <head>

 	<title>NDN Get File via WebSocket</title>

 	

-	<script type="text/javascript" src="../tools/build/ndn-js.js"></script>

+	<script type="text/javascript" src="../build/ndn-js.js"></script>

 

 	<script type="text/javascript">

-		hostip = "131.179.196.232";

-		//hostip = "localhost";

-		//var ndncon = new NDN({port:9696,host:hostip});

+		hostip = "localhost";

 		var ndncon = new NDN({port:9696,host:hostip,verify:false});

-        ndncon.transport.connectWebSocket(ndncon);

         

 ///////////////////////////////////////////////////////////////////////////////////////////////////////////

-        /*

+                /*

 		 * Closure for calling expressInterest to fetch big file.

 		 */                                                

 		var ContentClosure = function ContentClosure(ndn, T0) {