Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: LayoutTests/resources/testharnessreport.js

Issue 109763007: Reland r159735 - support for test harness (text-only) tests w/o expected results. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update testharness-based baselines Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/resources/testharnessreport.js
diff --git a/LayoutTests/resources/testharnessreport.js b/LayoutTests/resources/testharnessreport.js
index 3a51bdc7aa283e9fdf275e602046adf4a91d8374..e809ebbb730b637b2eaed5f0f5a8acfd015ce3b2 100644
--- a/LayoutTests/resources/testharnessreport.js
+++ b/LayoutTests/resources/testharnessreport.js
@@ -43,13 +43,15 @@ setup({output: false});
add_completion_callback(function (tests, harnessStatus)
{
// An array to hold string pieces, which will be joined later to produce the final result.
- var resultsArray = ["\n"];
+ var resultsArray = ["This is a testharness.js-based test.\n"];
if (harnessStatus.status !== 0) {
resultsArray.push("Harness Error. harnessStatus.status = ",
harnessStatus.status,
" , harnessStatus.message = ",
harnessStatus.message);
+ } else if (tests.length == 0) {
+ results.Array.push("FAIL: No tests actually ran.\n");
} else {
for (var i = 0; i < tests.length; i++) {
resultsArray.push(convertResultStatusToString(tests[i].status),
@@ -60,6 +62,7 @@ add_completion_callback(function (tests, harnessStatus)
"\n");
}
}
+ resultsArray.push("Harness: the test ran to completion.\n")
var resultElement = document.createElement("pre");
resultElement.textContent = resultsArray.join("");

Powered by Google App Engine
This is Rietveld 408576698