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"; |