success : function(xml){
_resultXML = xml;
Tests = $(xml).find("testcase");
+ getSummary();
getCapPresent();
loadTmpResult();
}
}, false);
}
+function getSummary() {
+ var summaryXML = "";
+
+ if (tizen.systeminfo == 'undefined') {
+ return;
+ } else {
+ summaryXML += "<capabilities>";
+ var caps = tizen.systeminfo.getCapabilities();
+ for (x in caps) {
+ if (typeof(caps[x]) == "boolean")
+ summaryXML += " <capability name=\"" + x + "\" support=\"" + caps[x] + "\" type=\"boolean\"/>\r\n";
+ else {
+ if (typeof(caps[x]) == "number")
+ summaryXML += " <capability name=\"" + x + "\" support=\"true\" type=\"Integer\">\r\n";
+ else if (typeof(caps[x]) == "string")
+ summaryXML += " <capability name=\"" + x + "\" support=\"true\" type=\"String\">\r\n";
+ else
+ summaryXML += " <capability name=\"" + x + "\" support=\"true\" type=\"" + typeof(caps[x]) + "\">\r\n";
+ summaryXML += " <value>" + caps[x] + "</value>\r\n";
+ summaryXML += " </capability>\r\n";
+ }
+ }
+ summaryXML += "</capabilities>";
+ }
+ var summaryDoc = $.parseXML(summaryXML);
+ var testDef = $(_resultXML).find("test_definition");
+ $(testDef[0]).prepend(summaryDoc.documentElement);
+}
+
function getCapPresent() {
try {
caps = tizen.systeminfo.getCapabilities();