From d8f4e1f71326ae3f52aa33ba1d8be8561959421f Mon Sep 17 00:00:00 2001 From: JiangXiuqi Date: Tue, 1 Sep 2015 17:24:36 +0800 Subject: [PATCH 1/3] Delete redundant json result div when select the 'Dump JSON' checkbox. --- runner/runner.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runner/runner.js b/runner/runner.js index 0379ffd..08bccfb 100644 --- a/runner/runner.js +++ b/runner/runner.js @@ -285,6 +285,10 @@ VisualOutput.prototype = { var json = this.runner.results.to_json(); if (document.getElementById("dumpit").checked) { + this.json_results_area = Array.prototype.slice.call(this.elem.querySelectorAll("textarea")); + for(var i = 0,t = this.json_results_area.length; i < t; i++){ + this.elem.removeChild(this.json_results_area[i]); + } this.json_results_area = document.createElement("textarea"); this.json_results_area.style.width = "100%"; this.json_results_area.setAttribute("rows", "50"); From dc4e15c8ff2a8a7a2f8717071f6a5ba43e9fabf2 Mon Sep 17 00:00:00 2001 From: JiangXiuqi Date: Tue, 1 Sep 2015 17:30:46 +0800 Subject: [PATCH 2/3] Fixed the bug that fail to run manual tests with w3c js test harness manually. --- runner/runner.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/runner/runner.js b/runner/runner.js index 08bccfb..5fc5099 100644 --- a/runner/runner.js +++ b/runner/runner.js @@ -359,12 +359,12 @@ function ManualUI(elem, runner) { this.pass_button.onclick = function() { this.disable_buttons(); - this.runner.on_result("PASS", "", []); + this.runner.on_result("PASS", "", "unjs"); }.bind(this); this.fail_button.onclick = function() { this.disable_buttons(); - this.runner.on_result("FAIL", "", []); + this.runner.on_result("FAIL", "", "unjs"); }.bind(this); } @@ -661,6 +661,13 @@ Runner.prototype = { }, on_result: function(status, message, subtests) { + if (this.current_test.type == "manual" || this.current_test.type == "reftest"){ + if (subtests != "unjs"){ + return; + }else{ + subtests = []; + } + } clearTimeout(this.timeout); this.results.set(this.current_test, status, message, subtests); this.result_callbacks.forEach(function(callback) { From f6ee450061970c6c85023218dbb479c499468935 Mon Sep 17 00:00:00 2001 From: JiangXiuqi Date: Wed, 2 Sep 2015 15:06:06 +0800 Subject: [PATCH 3/3] Add view port to runner for supporting mobile device. --- runner/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/runner/index.html b/runner/index.html index e08dc6d..3a69e6d 100644 --- a/runner/index.html +++ b/runner/index.html @@ -2,6 +2,7 @@ Web tests +