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

Unified Diff: third_party/WebKit/LayoutTests/resources/testharnessreport.js

Issue 2658793002: Report w3c test result count for WPT (Closed)
Patch Set: update Created 3 years, 11 months 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: third_party/WebKit/LayoutTests/resources/testharnessreport.js
diff --git a/third_party/WebKit/LayoutTests/resources/testharnessreport.js b/third_party/WebKit/LayoutTests/resources/testharnessreport.js
index 8086a623fa6e7a1a82319e64fd7149e35de0dbcb..6835e56e32a56fffaa02c159dbec107e3768d8c6 100644
--- a/third_party/WebKit/LayoutTests/resources/testharnessreport.js
+++ b/third_party/WebKit/LayoutTests/resources/testharnessreport.js
@@ -185,6 +185,21 @@
sanitize(tests[i].name) + " " +
sanitize(tests[i].message) + "\n";
}
+ } else if (output_document.URL.indexOf("http://web-platform.test") >= 0){
tkent 2017/01/26 22:09:43 I don't think this condition makes much sense. Th
yoichio 2017/01/27 07:21:56 I would be helpful but it needs much rebasing -exp
+ let testResults = "";
+ let resultCounter = [0,0,0,0];
tkent 2017/01/26 22:09:43 [0,0,0,0] -> [0, 0, 0, 0]
yoichio 2017/01/27 07:21:56 Done.
+ for (var i = 0; i < tests.length; ++i) {
+ resultCounter[tests[i].status]++;
+ testResults += convertResult(tests[i].status) + " " +
+ sanitize(tests[i].name) + " " +
+ sanitize(tests[i].message) + "\n";
+ }
+ resultStr += `Found ${tests.length} tests.` +
tkent 2017/01/26 22:09:43 I recommend to show the stats only if - non-0 FAI
yoichio 2017/01/27 07:21:56 Done.
+ ` ${resultCounter[0]} PASS` +
+ ` ${resultCounter[1]} FAIL` +
+ ` ${resultCounter[2]} TIMEOUT` +
+ ` ${resultCounter[3]} NOTRUN\n`;
+ resultStr += testResults;
} else {
// Iterate through tests array and build string that contains
// results for all tests.
@@ -195,6 +210,8 @@
}
}
+
tkent 2017/01/26 22:09:43 Do not add unnecessary blank lines.
yoichio 2017/01/27 07:21:56 Done.
+
resultStr += "Harness: the test ran to completion.\n";
// Set results element's textContent to the results string.

Powered by Google App Engine
This is Rietveld 408576698