mirror of
https://github.com/tc39/test262.git
synced 2025-07-05 21:24:40 +02:00
From the 'Run' tab, there's now a clickable 'Error' link showing precisely what
failed.
This commit is contained in:
parent
0937e10a03
commit
ec5dce172d
@ -217,12 +217,38 @@ function Presenter() {
|
|||||||
|
|
||||||
/* Append a result to the run page's result log. */
|
/* Append a result to the run page's result log. */
|
||||||
function logResult(test) {
|
function logResult(test) {
|
||||||
|
var appendStr = "";
|
||||||
altStyle = (altStyle !== ' ') ? ' ' : 'alternate';
|
altStyle = (altStyle !== ' ') ? ' ' : 'alternate';
|
||||||
var appendStr = '<tbody><tr class=\"' + altStyle +
|
|
||||||
'\"><td width=\"20%\">' + "<a class='showSource' href='#" +
|
if (test.result==="fail") {
|
||||||
test.id + "'>" + test.id + "</a>" + '</td><td>' +
|
appendStr += '<tbody>';
|
||||||
test.description + '</td><td align="right"><span class=\"Fail\">' +
|
appendStr += '<tr class=\"' + altStyle + '\">';
|
||||||
test.result + '</span></td></tr></tbody>';
|
|
||||||
|
appendStr += '<td width=\"20%\">';
|
||||||
|
appendStr += "<a class='showSource' href='#" + test.id + "'>";
|
||||||
|
appendStr += test.id + "</a>";
|
||||||
|
appendStr += '</td>';
|
||||||
|
|
||||||
|
appendStr += '<td>' + test.description + '</td>';
|
||||||
|
|
||||||
|
appendStr += '<td align="right">';
|
||||||
|
appendStr += '<span class=\"Fail\">' + "<a class='showError' href='#" + test.id + "'>";
|
||||||
|
appendStr += 'Fail</a></span></td></tr></tbody>';
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (test.result==="pass") {
|
||||||
|
if (! isSiteDebugMode()) { return;}
|
||||||
|
appendStr += '<tbody><tr class=\"' + altStyle + '\"><td width=\"20%\">';
|
||||||
|
appendStr += "<a class='showSource' href='#" + test.id + "'>";
|
||||||
|
appendStr += test.id + "</a>" + '</td><td>' + test.description;
|
||||||
|
appendStr += '</td><td align="right"><span class=\"Fail\">';
|
||||||
|
appendStr += 'Pass</span></td></tr></tbody>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw "Result for '" + test.id + "' must either be 'pass' or 'fail', not '" + test.result + "'!";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
logger.append(appendStr);
|
logger.append(appendStr);
|
||||||
logger.parent().attr("scrollTop", logger.parent().attr("scrollHeight"));
|
logger.parent().attr("scrollTop", logger.parent().attr("scrollHeight"));
|
||||||
}
|
}
|
||||||
|
@ -217,12 +217,38 @@ function Presenter() {
|
|||||||
|
|
||||||
/* Append a result to the run page's result log. */
|
/* Append a result to the run page's result log. */
|
||||||
function logResult(test) {
|
function logResult(test) {
|
||||||
|
var appendStr = "";
|
||||||
altStyle = (altStyle !== ' ') ? ' ' : 'alternate';
|
altStyle = (altStyle !== ' ') ? ' ' : 'alternate';
|
||||||
var appendStr = '<tbody><tr class=\"' + altStyle +
|
|
||||||
'\"><td width=\"20%\">' + "<a class='showSource' href='#" +
|
if (test.result==="fail") {
|
||||||
test.id + "'>" + test.id + "</a>" + '</td><td>' +
|
appendStr += '<tbody>';
|
||||||
test.description + '</td><td align="right"><span class=\"Fail\">' +
|
appendStr += '<tr class=\"' + altStyle + '\">';
|
||||||
test.result + '</span></td></tr></tbody>';
|
|
||||||
|
appendStr += '<td width=\"20%\">';
|
||||||
|
appendStr += "<a class='showSource' href='#" + test.id + "'>";
|
||||||
|
appendStr += test.id + "</a>";
|
||||||
|
appendStr += '</td>';
|
||||||
|
|
||||||
|
appendStr += '<td>' + test.description + '</td>';
|
||||||
|
|
||||||
|
appendStr += '<td align="right">';
|
||||||
|
appendStr += '<span class=\"Fail\">' + "<a class='showError' href='#" + test.id + "'>";
|
||||||
|
appendStr += 'Fail</a></span></td></tr></tbody>';
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (test.result==="pass") {
|
||||||
|
if (! isSiteDebugMode()) { return;}
|
||||||
|
appendStr += '<tbody><tr class=\"' + altStyle + '\"><td width=\"20%\">';
|
||||||
|
appendStr += "<a class='showSource' href='#" + test.id + "'>";
|
||||||
|
appendStr += test.id + "</a>" + '</td><td>' + test.description;
|
||||||
|
appendStr += '</td><td align="right"><span class=\"Fail\">';
|
||||||
|
appendStr += 'Pass</span></td></tr></tbody>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw "Result for '" + test.id + "' must either be 'pass' or 'fail', not '" + test.result + "'!";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
logger.append(appendStr);
|
logger.append(appendStr);
|
||||||
logger.parent().attr("scrollTop", logger.parent().attr("scrollHeight"));
|
logger.parent().attr("scrollTop", logger.parent().attr("scrollHeight"));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user