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

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

Issue 2658793002: Report w3c test result count for WPT (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/external/wpt/selection/extend-20-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c3d3ff941a35b01d183504af7ee8036ec0e77929 100644
--- a/third_party/WebKit/LayoutTests/resources/testharnessreport.js
+++ b/third_party/WebKit/LayoutTests/resources/testharnessreport.js
@@ -188,11 +188,24 @@
} else {
// Iterate through tests array and build string that contains
// results for all tests.
+ let testResults = "";
+ let resultCounter = [0, 0, 0, 0];
for (var i = 0; i < tests.length; ++i) {
- resultStr += convertResult(tests[i].status) + " " +
+ resultCounter[tests[i].status]++;
+ testResults += convertResult(tests[i].status) + " " +
sanitize(tests[i].name) + " " +
sanitize(tests[i].message) + "\n";
}
+ if (output_document.URL.indexOf("http://web-platform.test") >= 0 &&
+ tests.length >= 50 && (resultCounter[1] || resultCounter[2] || resultCounter[3])) {
+ // Output failure metrics if there are many.
+ resultStr += `Found ${tests.length} tests;` +
+ ` ${resultCounter[0]} PASS,` +
+ ` ${resultCounter[1]} FAIL,` +
+ ` ${resultCounter[2]} TIMEOUT,` +
+ ` ${resultCounter[3]} NOTRUN.\n`;
+ }
+ resultStr += testResults;
}
resultStr += "Harness: the test ran to completion.\n";
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/external/wpt/selection/extend-20-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698