Commit 3032d1ac authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

testharnessreport: Improve readability of test results

Add the following style:
  white-space: pre-wrap;
  line-height: 1.5;

Change-Id: I51be1df221787ff5fcac3cf92c528fbecb27c744
Reviewed-on: https://chromium-review.googlesource.com/c/1469198
Auto-Submit: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: default avatarYoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632012}
parent 900b83e6
......@@ -151,9 +151,12 @@
* readable test results.
*/
function completionCallback(tests, harness_status) {
const xhtmlNS = 'http://www.w3.org/1999/xhtml';
// Create element to hold results.
const resultsElement = outputDocument.createElement('pre');
const resultsElement = outputDocument.createElementNS(xhtmlNS, 'pre');
resultsElement.style.whiteSpace = 'pre-wrap';
resultsElement.style.lineHeight = '1.5';
// Declare result string.
let resultStr = 'This is a testharness.js-based test.\n';
......@@ -186,7 +189,6 @@
resultsElement.textContent = resultStr;
function done() {
const xhtmlNS = 'http://www.w3.org/1999/xhtml';
let body = null;
if (outputDocument.body && outputDocument.body.tagName == 'BODY' &&
outputDocument.body.namespaceURI == xhtmlNS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment