Chromium Code Reviews| 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. |