Make results.html more sane

https://bugs.webkit.org/show_bug.cgi?id=124446

Reviewed by Sam Weinig.

Fix various issues with results.html:
    * make it use page scrolling, not overflow scrolling
    * remove -webkit-flex stuff that wasn't doing anything
    * prettify the floating overlay for flagged tests
    * pull some markup out of the JS and into the HTML
    * remove the self-testing, which provides very little reward.

* fast/harness/resources/results-test.js: Removed.
* fast/harness/results-expected.txt:
* fast/harness/results.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1eae3156
2013-11-15 Simon Fraser <simon.fraser@apple.com>
Make results.html more sane
https://bugs.webkit.org/show_bug.cgi?id=124446
Reviewed by Sam Weinig.
Fix various issues with results.html:
* make it use page scrolling, not overflow scrolling
* remove -webkit-flex stuff that wasn't doing anything
* prettify the floating overlay for flagged tests
* pull some markup out of the JS and into the HTML
* remove the self-testing, which provides very little reward.
* fast/harness/resources/results-test.js: Removed.
* fast/harness/results-expected.txt:
* fast/harness/results.html:
2013-11-15 Tim Horton <timothy_horton@apple.com>
results.html should have a link to historical results for a test/all failing tests
......
This diff is collapsed.
You should see a series of PASS lines.
TEST-1: PASS
TEST-1: PASS
TEST-1: PASS
TEST-2: PASS
TEST-2: PASS
TEST-2: PASS
TEST-2: PASS
TEST-2: PASS
TEST-3: PASS
TEST-3: PASS
TEST-4: PASS
TEST-4: PASS
TEST-4: PASS
TEST-4: PASS
TEST-4: PASS
TEST-4: PASS
TEST-4: PASS
TEST-4: PASS
TEST-4: PASS
TEST-4: PASS
TEST-4: PASS
TEST-4: PASS
TEST-5: PASS
TEST-5: PASS
TEST-5: PASS
TEST-5: PASS
TEST-5: PASS
TEST-5: PASS
TEST-5: PASS
TEST-5: PASS
TEST-5: PASS
TEST-5: PASS
TEST-5: PASS
TEST-5: PASS
TEST-6: PASS
TEST-6: PASS
TEST-6: PASS
TEST-6: PASS
TEST-6: PASS
TEST-6: PASS
TEST-6: PASS
TEST-6: PASS
TEST-6: PASS
TEST-6: PASS
TEST-6: PASS
TEST-7: PASS
TEST-8: PASS
TEST-8: PASS
TEST-8: PASS
TEST-8: PASS
TEST-8: PASS
TEST-8: PASS
TEST-9: PASS
TEST-9: PASS
TEST-9: PASS
TEST-9: PASS
TEST-9: PASS
TEST-9: PASS
TEST-10: PASS
TEST-10: PASS
TEST-10: PASS
TEST-10: PASS
TEST-10: PASS
TEST-10: PASS
TEST-11: PASS
TEST-11: PASS
TEST-11: PASS
TEST-11: PASS
TEST-11: PASS
TEST-11: PASS
TEST-12: PASS
TEST-12: PASS
TEST-12: PASS
TEST-12: PASS
TEST-12: PASS
TEST-12: PASS
TEST-13: PASS
TEST-13: PASS
TEST-13: PASS
TEST-13: PASS
TEST-13: PASS
TEST-13: PASS
TEST-14: PASS
TEST-14: PASS
TEST-14: PASS
TEST-14: PASS
TEST-14: PASS
TEST-14: PASS
TEST-15: PASS
TEST-15: PASS
TEST-15: PASS
TEST-15: PASS
TEST-15: PASS
TEST-15: PASS
TEST-16: PASS
TEST-16: PASS
TEST-16: PASS
TEST-16: PASS
TEST-16: PASS
TEST-16: PASS
TEST-17: PASS
TEST-17: PASS
TEST-17: PASS
TEST-17: PASS
TEST-17: PASS
TEST-17: PASS
TEST-18: PASS
TEST-18: PASS
TEST-18: PASS
TEST-18: PASS
TEST-18: PASS
TEST-18: PASS
TEST-19: PASS
TEST-19: PASS
TEST-19: PASS
TEST-19: PASS
TEST-19: PASS
TEST-19: PASS
TEST-20: PASS
TEST-21: PASS
TEST-22: PASS
TEST-22: PASS
TEST-22: PASS
TEST-23: PASS
TEST-23: PASS
TEST-23: PASS
TEST-24: PASS
TEST-24: PASS
TEST-24: PASS
TEST-24: PASS
TEST-25: PASS
TEST-25: PASS
TEST-26: PASS
TEST-26: PASS
TEST-26: PASS
TEST-26: PASS
TEST-26: PASS
TEST-27: PASS
TEST-27: PASS
TEST-28: PASS
TEST-28: PASS
TEST-29: PASS
TEST-30: PASS
TEST-30: PASS
TEST-31: PASS
TEST-32: PASS
TEST-33: PASS
TEST-34: PASS
TEST-34: PASS
TEST-34: PASS
TEST-35: PASS
TEST-35: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-36: PASS
TEST-37: PASS
TEST-37: PASS
TEST-37: PASS
TEST-37: PASS
TEST-37: PASS
TEST-37: PASS
TEST-37: PASS
TEST-37: PASS
TEST-37: PASS
TEST-37: PASS
TEST-38: PASS
TEST-38: PASS
TEST-38: PASS
TEST-38: PASS
TEST-39: PASS
TEST-39: PASS
TEST-39: PASS
TEST-39: PASS
TEST-39: PASS
TEST-39: PASS
TEST-39: PASS
TEST-39: PASS
TEST-40: PASS
TEST-40: PASS
TEST-40: PASS
TEST-41: PASS
TEST-41: PASS
TEST-41: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-42: PASS
TEST-43: PASS
TEST-43: PASS
TEST-43: PASS
TEST-43: PASS
TEST-43: PASS
TEST-43: PASS
TEST-43: PASS
TEST-43: PASS
TEST-43: PASS
TEST-43: PASS
TEST-43: PASS
TEST-43: PASS
TEST-44: PASS
TEST-44: PASS
TEST-44: PASS
TEST-44: PASS
TEST-45: PASS
TEST-45: PASS
TEST-45: PASS
TEST-46: PASS
TEST-47: PASS
TEST-47: PASS
Use the i, j, k and l keys to navigate, e, c to expand and collapse, and f to flag
expand all collapse all options
Only unexpected results
Toggle images
Use newlines in flagged list
<!DOCTYPE html>
<style>
html {
height: 100%;
}
body {
margin: 0;
font-family: Helvetica, sans-serif;
font-size: 11pt;
display: -webkit-flex;
-webkit-flex-direction: column;
height: 100%;
}
body > * {
......@@ -52,9 +46,7 @@ th {
}
.content-container {
-webkit-flex: 1;
min-height: 0;
overflow: auto;
}
.note {
......@@ -77,11 +69,14 @@ th {
#toolbar {
position: fixed;
padding: 4px;
top: 2px;
right: 2px;
text-align: right;
background-color: rgba(255, 255, 255, 0.85);
}
.floating-panel {
padding: 4px;
background-color: rgba(255, 255, 255, 0.9);
border: 1px solid silver;
border-radius: 4px;
}
......@@ -208,14 +203,32 @@ tbody.flagged .flag {
image-rendering: -webkit-optimize-contrast;
}
#flagged-test-container {
position: fixed;
bottom: 4px;
right: 4px;
width: 50%;
min-width: 400px;
background-color: rgba(255, 255, 255, 0.75);
}
#flagged-test-container > h2 {
margin: 0 0 4px 0;
}
#flagged-tests {
padding: 5px;
height: 100px;
padding: 0 5px;
margin: 0;
height: 7em;
overflow-y: scroll;
}
</style>
<style id="unexpected-style"></style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var g_state;
function globalState()
{
......@@ -1113,6 +1126,7 @@ TestNavigator.updateFlaggedTests = function()
if (!flaggedTestTextbox) {
var flaggedTestContainer = document.createElement('div');
flaggedTestContainer.id = 'flagged-test-container';
flaggedTestContainer.className = 'floating-panel';
flaggedTestContainer.innerHTML = '<h2>Flagged Tests</h2><pre id="flagged-tests" contentEditable></pre>';
document.body.appendChild(flaggedTestContainer);
......@@ -1151,9 +1165,8 @@ TestNavigator._scrollToCurrentTest = function()
return;
var rowRect = targetLink.getBoundingClientRect();
var container = document.querySelector('.content-container');
// rowRect is in client coords (i.e. relative to viewport), so we just want to add its top to the current scroll position.
container.scrollTop += rowRect.top - 20;
document.body.scrollTop += rowRect.top;
}
TestNavigator.onlyShowUnexpectedFailuresChanged = function()
......@@ -1169,7 +1182,6 @@ TestNavigator.onlyShowUnexpectedFailuresChanged = function()
// Recompute TestNavigator.currentTestIndex
var links = visibleTests();
TestNavigator.currentTestIndex = links.indexOf(currentTest);
window.console.log('TestNavigator.currentTestIndex is ', TestNavigator.currentTestIndex)
}
}
......@@ -1338,7 +1350,6 @@ function failingTestsTable(tests, title, id)
header += '</tr></thead>';
return header + tableRowHtml + '</table></div>';
}
......@@ -1347,16 +1358,7 @@ function generatePage()
{
forEachTest(processGlobalStateFor);
var html = '<div class=content-container><div id=toolbar>' +
'<div class="note">Use the i, j, k and l keys to navigate, e, c to expand and collapse, and f to flag</div>' +
'<a href="javascript:void()" onclick="expandAllExpectations()">expand all</a> ' +
'<a href="javascript:void()" onclick="collapseAllExpectations()">collapse all</a> ' +
'<a href="javascript:void()" id=options-link onclick="toggleOptionsMenu()">options</a>' +
'<div id=options-menu class=hidden-menu>' +
'<label><input id="unexpected-results" type=checkbox checked onchange="handleUnexpectedResultsChange()">Only unexpected results</label>' +
'<label><input id="toggle-images" type=checkbox checked onchange="handleToggleImagesChange()">Toggle images</label>' +
'<label title="Use newlines instead of spaces to separate flagged tests"><input id="use-newlines" type=checkbox checked onchange="handleToggleUseNewlines()">Use newlines</input>' +
'</div></div>';
var html = "";
if (globalState().results.interrupted)
html += "<p class='stopped-running-early-message'>Testing exited early.</p>"
......@@ -1387,7 +1389,7 @@ function generatePage()
'<p>httpd error log: <a href="error_log.txt">error_log.txt</a></p>';
}
document.body.innerHTML = html + '</div>';
document.getElementById('main-content').innerHTML = html + '</div>';
if (document.getElementById('results-table')) {
document.getElementById('results-table').addEventListener('click', TableSorter.handleClick, false);
......@@ -1408,7 +1410,21 @@ function generatePage()
OptionWriter.apply();
}
</script>
<!-- HACK: when json_results_test.js is included, loading this page runs the tests.
It is not copied to the layout-test-results output directory. -->
<script src="resources/results-test.js"></script>
<body onload="generatePage()"></body>
<body onload="generatePage()">
<div class="content-container">
<div id="toolbar" class="floating-panel">
<div class="note">Use the i, j, k and l keys to navigate, e, c to expand and collapse, and f to flag</div>
<a href="javascript:void()" onclick="expandAllExpectations()">expand all</a>
<a href="javascript:void()" onclick="collapseAllExpectations()">collapse all</a>
<a href="javascript:void()" id=options-link onclick="toggleOptionsMenu()">options</a>
<div id="options-menu" class="hidden-menu">
<label><input id="unexpected-results" type="checkbox" checked onchange="handleUnexpectedResultsChange()">Only unexpected results</label>
<label><input id="toggle-images" type="checkbox" checked onchange="handleToggleImagesChange()">Toggle images</label>
<label title="Use newlines instead of spaces to separate flagged tests"><input id="use-newlines" type="checkbox" checked onchange="handleToggleUseNewlines()">Use newlines in flagged list</input>
</div>
</div>
<div id="main-content"></div>
</body>
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