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

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

Issue 600413002: Pass test-list as JSON to layout-test-server. (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 unified diff | Download patch
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/tool/servers/layouttestsserver.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 html { 3 html {
4 height: 100%; 4 height: 100%;
5 } 5 }
6 body { 6 body {
7 margin: 0; 7 margin: 0;
8 font-family: Helvetica, sans-serif; 8 font-family: Helvetica, sans-serif;
9 font-size: 11pt; 9 font-size: 11pt;
10 display: -webkit-flex; 10 display: -webkit-flex;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 testObject.name = newPrefix; 115 testObject.name = newPrefix;
116 handler(testObject); 116 handler(testObject);
117 } else 117 } else
118 forEachTest(handler, tree[key], newPrefix); 118 forEachTest(handler, tree[key], newPrefix);
119 } 119 }
120 } 120 }
121 function getTests() 121 function getTests()
122 { 122 {
123 var table = document.getElementById('results-table'); 123 var table = document.getElementById('results-table');
124 var testCount = table.rows.length; 124 var testCount = table.rows.length;
125 //FIXME : CONVERT TO JSON 125 var tests_list = {
126 var tests_list = ''; 126 tests : []
127 };
127 for(var i = 1; i < testCount; i++) { 128 for(var i = 1; i < testCount; i++) {
128 var selected = table.rows[i].cells[0].getElementsByTagName("input")[0]; 129 var selected = table.rows[i].cells[0].getElementsByTagName("input")[0];
129 if(selected.checked) { 130 if(selected.checked) {
130 var test = table.rows[i].cells[1].innerHTML; 131 var test = table.rows[i].cells[1].innerHTML;
131 tests_list += test + ' ' ; 132 tests_list.tests.push(test);
132 } 133 }
133 } 134 }
134 return tests_list; 135 return tests_list;
135 } 136 }
136 function rerun() 137 function rerun()
137 { 138 {
138 var log = document.getElementById('log'); 139 var log = document.getElementById('log');
139 log.innerHTML = 'Re running tests again'; 140 log.innerHTML = 'Re running tests again';
140 var testList = getTests() 141 var testList = getTests()
141 if (testList == '') 142 if (testList == '')
142 alert('Please select atlest one Test'); 143 alert('Please select atlest one Test');
143 else { 144 else {
144 xmlhttp = new XMLHttpRequest(); 145 xmlhttp = new XMLHttpRequest();
145 var url ='http://localhost:9630/'; 146 var url ='http://localhost:9630/';
146 xmlhttp.open('POST', url, true); 147 xmlhttp.open('POST', url, true);
147 xmlhttp.onerror = function() { 148 xmlhttp.onerror = function() {
148 alert('Server offline'); 149 alert('Server offline');
149 } 150 }
150 xmlhttp.setRequestHeader("Content-type", "application/json"); 151 xmlhttp.setRequestHeader("Content-type", "application/json");
151 xmlhttp.onreadystatechange = function() { 152 xmlhttp.onreadystatechange = function() {
152 if(xmlhttp.readyState > 0) 153 if(xmlhttp.readyState > 0)
153 document.body.innerHTML = xmlhttp.responseText; 154 document.body.innerHTML = xmlhttp.responseText;
154 } 155 }
155 xmlhttp.send(String(getTests())); 156 xmlhttp.send(JSON.stringify(getTests()));
156 } 157 }
157 } 158 }
158 function checkalltests() 159 function checkalltests()
159 { 160 {
160 var value = document.getElementById("check_all").checked; 161 var value = document.getElementById("check_all").checked;
161 var table = document.getElementById("results-table"); 162 var table = document.getElementById("results-table");
162 var length = table.rows.length; 163 var length = table.rows.length;
163 for (var i = 1; i < length; i++) { 164 for (var i = 1; i < length; i++) {
164 var checkbox = table.rows[i].cells[0].getElementsByTagName("input")[0]; 165 var checkbox = table.rows[i].cells[0].getElementsByTagName("input")[0];
165 checkbox.checked = value; 166 checkbox.checked = value;
(...skipping 18 matching lines...) Expand all
184 } 185 }
185 </script> 186 </script>
186 <!-- To run the tests --> 187 <!-- To run the tests -->
187 <script src="resources/archived-results-dashboard-test.js"></script> 188 <script src="resources/archived-results-dashboard-test.js"></script>
188 <body onload="generatePage()"> 189 <body onload="generatePage()">
189 <h1>Dashboard</h1> 190 <h1>Dashboard</h1>
190 <p id=log></p> 191 <p id=log></p>
191 <p><button onclick="rerun()">Re Run Tests</button></p> 192 <p><button onclick="rerun()">Re Run Tests</button></p>
192 </body> 193 </body>
193 </html> 194 </html>
OLDNEW
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/tool/servers/layouttestsserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698