output_list = Array(); /* Level - 0: Summary; 1: Failed; 2: All; 3: Skipped */ function showCase(level) { table_rows = document.getElementsByTagName("tr"); for (var i = 0; i < table_rows.length; i++) { row = table_rows[i]; id = row.id; if (id.substr(0,2) == 'ft') { if (level < 1 || level == 3) { row.classList.add('hiddenRow'); } else { row.classList.remove('hiddenRow'); } } if (id.substr(0,2) == 'pt') { if (level > 1 && level != 3) { row.classList.remove('hiddenRow'); } else { row.classList.add('hiddenRow'); } } if (id.substr(0,2) == 'st') { if (level >=2) { row.classList.remove('hiddenRow'); } else { row.classList.add('hiddenRow'); } } } } function showClassDetail(class_id, count) { var testcases_list = Array(count); var all_hidden = true; for (var i = 0; i < count; i++) { testcase_postfix_id = 't' + class_id.substr(1) + '.' + (i+1); testcase_id = 'f' + testcase_postfix_id; testcase = document.getElementById(testcase_id); if (!testcase) { testcase_id = 'p' + testcase_postfix_id; testcase = document.getElementById(testcase_id); } if (!testcase) { testcase_id = 's' + testcase_postfix_id; testcase = document.getElementById(testcase_id); } testcases_list[i] = testcase; if (testcase.classList.contains('hiddenRow')) { all_hidden = false; } } for (var i = 0; i < count; i++) { testcase = testcases_list[i]; if (!all_hidden) { testcase.classList.remove('hiddenRow'); } else { testcase.classList.add('hiddenRow'); } } } function showTestDetail(div_id){ var details_div = document.getElementById(div_id) var displayState = details_div.style.display // alert(displayState) if (displayState != 'block' ) { displayState = 'block' details_div.style.display = 'block' } else { details_div.style.display = 'none' } } function html_escape(s) { s = s.replace(/&/g,'&'); s = s.replace(//g,'>'); return s; } /* obsoleted by detail in
"); d.write(html_escape(output_list[id])); d.write("\n"); d.write("close\n"); d.write("\n"); d.close(); } */ function drawCircle(pass, fail, error, skip){ var color = ["#5cb85c","#d9534f","#c00","#f0ad4e"]; var data = [pass,fail,error,skip]; var text_arr = ["pass", "fail", "error","skip"]; var canvas = document.getElementById("circle"); var ctx = canvas.getContext("2d"); var startPoint=0; var width = 20, height = 10; var posX = 112 * 2 + 20, posY = 30; var textX = posX + width + 5, textY = posY + 10; for(var i=0;i