Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: LayoutTests/fast/harness/archived-results-dashboard.html

Issue 616533002: Display the stdio output in an iframe and reload after completion of re-reun. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/harness/archived-results-dashboard.html
diff --git a/LayoutTests/fast/harness/archived-results-dashboard.html b/LayoutTests/fast/harness/archived-results-dashboard.html
index e8a4455b26ca46d43b5d08f4bb9df633f8354bf0..56c0528419ac5986dfca36371eaafa4cdb19ab82 100644
--- a/LayoutTests/fast/harness/archived-results-dashboard.html
+++ b/LayoutTests/fast/harness/archived-results-dashboard.html
@@ -56,6 +56,20 @@ td:hover .note{
.test-skip {
background-color:rgb(255,255,255);
}
+.test-run {
+ background-color:rgb(255,252,108);
+}
+.log {
+ font-family: "Courier New"
+}
+.stdio-href {
+ color: grey;
+ font-weight: bold;
+ text-decoration: underline;
+}
+.stdio-href:hover {
+ color:black;
+}
</style>
<script>
var g_state;
@@ -137,8 +151,29 @@ function getTests()
function rerun()
{
var log = document.getElementById('log');
- log.innerHTML = 'Re running tests again';
- var testList = getTests()
+ var testList = JSON.stringify(getTests());
+ var logText = document.createElement('p');
+ logText.innerHTML = 'Re running the tests';
+ logText.className = 'test-run';
+ var stdioIframe = document.createElement("IFRAME");
+ stdioIframe.style.display = 'none';
+ stdioIframe.width = window.innerWidth;
+ stdioIframe.onload = function () {
+ stdioIframe.contentWindow.scrollTo(0,stdioIframe.contentWindow.document.body.scrollHeight);
+ }
+ var stdio = document.createElement("a");
+ stdio.innerHTML = '<p>stdio<p>';
+ stdio.className = 'stdio-href';
+ stdio.onclick = function() {
+ if(stdioIframe.style.display == 'none')
+ stdioIframe.style.display = 'block';
+ else
+ stdioIframe.style.display = 'none';
+
+ };
+ log.appendChild(logText);
+ log.appendChild(stdio);
+ log.appendChild(stdioIframe);
if (testList == '')
alert('Please select atlest one Test');
else {
@@ -146,14 +181,22 @@ function rerun()
var url ='http://localhost:9630/';
xmlhttp.open('POST', url, true);
xmlhttp.onerror = function() {
+ logText.innerHTML = 'Please run the server using "webkit-patch layout-test-server"';
+ logText.className = 'test-fail';
alert('Server offline');
}
xmlhttp.setRequestHeader("Content-type", "application/json");
xmlhttp.onreadystatechange = function() {
- if(xmlhttp.readyState > 0)
- document.body.innerHTML = xmlhttp.responseText;
+ if(xmlhttp.readyState > 0) {
+ stdioIframe.srcdoc = xmlhttp.responseText;
+ }
+ if(xmlhttp.readyState == 4) {
+ logText.innerHTML = 'Tests Re-run done Reloading this page';
+ logText.className = 'test-pass';
+ location.reload();
+ }
}
- xmlhttp.send(JSON.stringify(getTests()));
+ xmlhttp.send(testList);
}
}
function checkalltests()
@@ -188,7 +231,7 @@ function generatePage()
<script src="resources/archived-results-dashboard-test.js"></script>
<body onload="generatePage()">
<h1>Dashboard</h1>
- <p id=log></p>
+ <div id=log class="log"></div>
<p><button onclick="rerun()">Re Run Tests</button></p>
</body>
-</html>
+</html>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698