Fix multiple capability issue
authorjwang <jing.j.wang@intel.com>
Sun, 9 Jun 2013 08:45:34 +0000 (16:45 +0800)
committerjwang <jing.j.wang@intel.com>
Thu, 13 Jun 2013 03:10:01 +0000 (11:10 +0800)
Change-Id: I33267a82b21d605a9504a36993c0b336c43c0c4d

js/main.js

index cf0be5e..b9bf4ad 100755 (executable)
@@ -142,6 +142,8 @@ function _resetResult() {
             $(this).find("capability").each(function(){
                 isCappresent = isCapPresent($(this).attr("name"));
                 isCapmandatory = isCapMandatory($(this).attr("name"));
+                if (isCappresent === false)
+                    return false;
             });
             if(isCappresent === false){
                 noSupport[testAppname] = true;
@@ -280,6 +282,8 @@ function _mergeResult(tmpResult) {
             $(this).find("capability").each(function(){
                 isCappresent = isCapPresent($(this).attr("name"));
                 isCapmandatory = isCapMandatory($(this).attr("name"));
+                if (isCappresent === false)
+                    return false;
             });
             if(isCappresent === false){
                 noSupport[testAppname] = true;
@@ -302,7 +306,8 @@ function initTests() {
     updateFooterButton();
     loadTests();
     window.addEventListener('message', function(e) {
-        var jsonData = eval("("+e.data+")");
+        console.log(e.data);
+        var jsonData = eval("(" + e.data + ")");
         if(jsonData.length > 0){
             recordResultToXML(jsonData[0].testname, jsonData[0].result);
             updateAppDecoration();
@@ -314,8 +319,8 @@ function initTests() {
 function getCapPresent() {
     try {
         caps = tizen.systeminfo.getCapabilities();
-    } catch (e){
-        alert("Exception: " + e.message);
+    } catch (err){
+        alert("Exception: " + err.message);
     }
 }