THRIFT-1249 js-test-driver support (run unittests on multiple browsers and get XML test results)

additonal improvements
- unit test log in XML
- fetch local copy of jslibs to build/js/lib/
- remove unused json2.js
- some lint on test.js

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1153673 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/js/test/test.js b/lib/js/test/test.js
index e24cb92..caf34a2 100755
--- a/lib/js/test/test.js
+++ b/lib/js/test/test.js
@@ -1,4 +1,4 @@
-/*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
@@ -62,11 +62,11 @@
 module("Structured Types");
 
   test("Struct", function() {
-    var structTestInput = new ThriftTest.Xtruct()
-    structTestInput.string_thing = 'worked'
-    structTestInput.byte_thing = 0x01
-    structTestInput.i32_thing = Math.pow(2,30)
-    structTestInput.i64_thing = Math.pow(2,60)
+    var structTestInput = new ThriftTest.Xtruct();
+    structTestInput.string_thing = 'worked';
+    structTestInput.byte_thing = 0x01;
+    structTestInput.i32_thing = Math.pow(2,30);
+    structTestInput.i64_thing = Math.pow(2,60);
 
     var structTestOutput = client.testStruct(structTestInput);
 
@@ -75,20 +75,20 @@
     equals(structTestOutput.i32_thing, structTestInput.i32_thing);
     equals(structTestOutput.i64_thing, structTestInput.i64_thing);
     
-    equals(JSON.stringify(structTestOutput), JSON.stringify(structTestInput))
+    equals(JSON.stringify(structTestOutput), JSON.stringify(structTestInput));
   });
 
   test("Nest", function() {
-    var xtrTestInput = new ThriftTest.Xtruct()
-    xtrTestInput.string_thing = 'worked'
-    xtrTestInput.byte_thing = 0x01
-    xtrTestInput.i32_thing = Math.pow(2,30)
-    xtrTestInput.i64_thing = Math.pow(2,60)
+    var xtrTestInput = new ThriftTest.Xtruct();
+    xtrTestInput.string_thing = 'worked';
+    xtrTestInput.byte_thing = 0x01;
+    xtrTestInput.i32_thing = Math.pow(2,30);
+    xtrTestInput.i64_thing = Math.pow(2,60);
     
-    var nestTestInput = new ThriftTest.Xtruct2()
-    nestTestInput.byte_thing = 0x02
-    nestTestInput.struct_thing = xtrTestInput
-    nestTestInput.i32_thing = Math.pow(2,15)
+    var nestTestInput = new ThriftTest.Xtruct2();
+    nestTestInput.byte_thing = 0x02;
+    nestTestInput.struct_thing = xtrTestInput;
+    nestTestInput.i32_thing = Math.pow(2,15);
     
     var nestTestOutput = client.testNest(nestTestInput);
     
@@ -99,13 +99,13 @@
     equals(nestTestOutput.struct_thing.i64_thing, nestTestInput.struct_thing.i64_thing);
     equals(nestTestOutput.i32_thing, nestTestInput.i32_thing);
     
-    equals(JSON.stringify(nestTestOutput), JSON.stringify(nestTestInput))
+    equals(JSON.stringify(nestTestOutput), JSON.stringify(nestTestInput));
   });
 
   test("Map", function() {
     var mapTestInput = {7:77, 8:88, 9:99};
 
-    var mapTestOutput = client.testMap(mapTestInput)
+    var mapTestOutput = client.testMap(mapTestInput);
 
     for (var key in mapTestOutput) {
       equals(mapTestOutput[key], mapTestInput[key]);
@@ -118,7 +118,7 @@
       "longValue":stringTest, stringTest:"long key"
     };
 
-    var mapTestOutput = client.testStringMap(mapTestInput)
+    var mapTestOutput = client.testStringMap(mapTestInput);
 
     for (var key in mapTestOutput) {
       equals(mapTestOutput[key], mapTestInput[key]);
@@ -126,12 +126,12 @@
   });
 
   test("Set", function() {
-    var setTestInput = new Array(1,2,3)
+    var setTestInput = [1,2,3];
     ok(client.testSet(setTestInput), setTestInput);
   });
 
   test("List", function() {
-    var listTestInput = new Array(1,2,3)
+    var listTestInput = [1,2,3];
     ok(client.testList(listTestInput), listTestInput);
   });
 
@@ -161,7 +161,7 @@
       }
     }
     
-    equals(JSON.stringify(mapMapTestOutput), JSON.stringify(mapMapTestExpectedResult))
+    equals(JSON.stringify(mapMapTestOutput), JSON.stringify(mapMapTestExpectedResult));
   });
 
 
@@ -239,7 +239,7 @@
     var res = client.testInsanity("");
     ok(res, JSON.stringify(res));
     ok(insanity, JSON.stringify(insanity));
-    equals(JSON.stringify(res), JSON.stringify(insanity)) //TODO: read and compare maps recursively
+    equals(JSON.stringify(res), JSON.stringify(insanity)); //TODO: read and compare maps recursively
   });