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

Side by Side Diff: tests/test_console_merger/surroundings_input.html

Issue 11535002: chromium-build app now renders console from stored rows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/chromium-build
Patch Set: Add test_parse_master_utf8 Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <title>BuildBot: Chromium</title>
7 <link rel="stylesheet" href="default.css" type="text/css" />
8 <script type="text/javascript">
9 // <![CDATA[
10 //
11
12 //
13 // Functions used to display the build status bubble on box click.
14 //
15
16 // show the build status box. This is called when the user clicks on a block.
17 function showBuildBox(url, event) {
18 // Find the current curson position.
19 var cursorPosTop = (window.event ? window.event.clientY : event.pageY)
20 var cursorPosLeft = (window.event ? window.event.clientX : event.pageX)
21
22 // Offset the position by 5, to make the window appears under the cursor.
23 cursorPosTop = cursorPosTop + document.body.scrollTop -5 ;
24 cursorPosLeft = cursorPosLeft + document.body.scrollLeft - 5;
25
26 // Move the div (hidden) under the cursor.
27 var divBox = document.getElementById('divBox');
28 divBox.style.top = parseInt(cursorPosTop) + 'px';
29 divBox.style.left = parseInt(cursorPosLeft) + 'px';
30
31 // Reload the hidden frame with the build page we want to show.
32 // The onload even on this frame will update the div and make it visible.
33 document.getElementById("frameBox").src = url
34
35 // We don't want to reload the page.
36 return false;
37 }
38
39 // OnLoad handler for the iframe containing the build to show.
40 function updateDiv(event) {
41 // Get the frame innerHTML.
42 var iframeContent = document.getElementById("frameBox").contentWindow.docume nt.body.innerHTML;
43
44 // If there is any content, update the div, and make it visible.
45 if (iframeContent) {
46 var divBox = document.getElementById('divBox');
47 divBox.innerHTML = iframeContent ;
48 divBox.style.display = "block";
49 }
50 }
51
52 // Util functions to know if an element is contained inside another element.
53 // We use this to know when we mouse out our build status div.
54 function containsDOM (container, containee) {
55 var isParent = false;
56 do {
57 if ((isParent = container == containee))
58 break;
59 containee = containee.parentNode;
60 } while (containee != null);
61
62 return isParent;
63 }
64
65 // OnMouseOut handler. Returns true if the mouse moved out of the element.
66 // It is false if the mouse is still in the element, but in a blank part of it,
67 // like in an empty table cell.
68 function checkMouseLeave(element, event) {
69 if (element.contains && event.toElement) {
70 return !element.contains(event.toElement);
71 }
72 else if (event.relatedTarget) {
73 return !containsDOM(element, event.relatedTarget);
74 }
75 }
76
77 // Creates a new cookie.
78 function createCookie(name, value, day) {
79 var date = new Date();
80 date.setTime(date.getTime() + (day * 24 * 60 * 60 * 1000));
81 var expires = "; expires=" + date.toGMTString();
82 document.cookie = name + "=" + value+expires + "; path=/";
83 }
84
85 // Returns the vaue of a cookie, or null if it does not exist.
86 function readCookie(name) {
87 var begin = name + "=";
88 var data = document.cookie.split(';');
89 for(var i = 0; i < data.length; i++) {
90 var cookie = data[i];
91 while (cookie.charAt(0) == ' ')
92 cookie = cookie.substring(1, cookie.length);
93 if (cookie.indexOf(begin) == 0)
94 return cookie.substring(begin.length, cookie.length);
95 }
96
97 return null;
98 }
99
100 // Deletes a cookie.
101 function eraseCookie(name) {
102 createCookie(name, "", -1);
103 }
104
105 // Hides all "details" and "comments" section.
106 function collapse() {
107 // Hide all Comments sections.
108 var comments = document.querySelectorAll('.DevComment');
109 for(var i = 0; i < comments.length; i++) {
110 comments[i].style.display = "none";
111 }
112
113 // Hide all details sections.
114 var details = document.querySelectorAll('.DevDetails');
115 for(var i = 0; i < details.length; i++) {
116 details[i].style.display = "none";
117 }
118
119 // Fix the rounding on the Revision box. (Lower right corner must be round)
120 var revisions = document.querySelectorAll('.DevRev');
121 for(var i = 0; i < revisions.length; i++) {
122 revisions[i].className = revisions[i].className + ' DevRevCollapse';
123 }
124
125 // Fix the rounding on the last category box. (Lower left corner must be rou nd)
126 var status = document.querySelectorAll('.last');
127 for(var i = 0; i < status.length; i++) {
128 status[i].className = status[i].className + ' DevStatusCollapse';
129 }
130
131 // Create a cookie to remember that we want the view to be collapsed.
132 createCookie('collapsed', 'true', 30)
133
134 // Hide the collapse and the unmerge buttons.
135 document.querySelectorAll('.collapse')[0].style.display = 'none'
136 document.querySelectorAll('.unmerge')[0].style.display = 'none'
137
138 // Activate the merge and expand buttons.
139 document.querySelectorAll('.uncollapse')[0].style.display = 'inline'
140 document.querySelectorAll('.merge')[0].style.display = 'inline'
141 }
142
143 // Expands the view. This is the opposite of "Collapse"
144 function uncollapse() {
145 unmerge();
146
147 // Make the comments visible.
148 var comments = document.querySelectorAll('.DevComment');
149 for(var i = 0; i < comments.length; i++) {
150 comments[i].style.display = "";
151 }
152
153 // Make the details visible.
154 var details = document.querySelectorAll('.DevDetails');
155 for(var i = 0; i < details.length; i++) {
156 details[i].style.display = "";
157 }
158
159 // Remove the round corner (lower right) for the Revision box.
160 var revisions = document.querySelectorAll('.DevRev');
161 for(var i = 0; i < revisions.length; i++) {
162 revisions[i].className = revisions[i].className.replace('DevRevCollapse' , '');
163 }
164
165 // Remoe the round corner (lower left) for the last category box.
166 var status = document.querySelectorAll('.DevStatus');
167 for(var i = 0; i < status.length; i++) {
168 status[i].className = status[i].className.replace('DevStatusCollapse', ' ');
169 }
170
171 // Delete the cookies that say that we want to be collapsed or merged.
172 eraseCookie('collapsed')
173 eraseCookie('merged')
174
175 // Display the "collapse" and "merge" buttons.
176 document.querySelectorAll('.collapse')[0].style.display = 'inline'
177 document.querySelectorAll('.merge')[0].style.display = 'inline'
178
179 // Remove the "uncollapse" and "unmerge" buttons.
180 document.querySelectorAll('.uncollapse')[0].style.display = 'none'
181 document.querySelectorAll('.unmerge')[0].style.display = 'none'
182 }
183
184 // Merge all the status boxes together.
185 function merge() {
186 collapse();
187
188 // Hide all the spacing.
189 var spacing = document.querySelectorAll('.DevStatusSpacing');
190 for(var i = 0; i < spacing.length; i++) {
191 spacing[i].style.display = "none";
192 }
193
194 // Each boxes have, in the className, a tag that uniquely represents the
195 // build where this data comes from.
196 // Since we want to merge all the boxes coming from the same build, we
197 // parse the document to find all the builds, and then, for each build, we
198 // concatenate the boxes.
199
200 var allTags = [];
201 all = document.getElementsByTagName('*')
202 for(var i = 0; i < all.length; i++) {
203 var element = all[i];
204 start = element.className.indexOf('Tag')
205 if (start != -1) {
206 var className = ""
207 end = element.className.indexOf(' ', start)
208 if (end != -1) {
209 className = element.className.substring(start, end);
210 } else {
211 className = element.className.substring(start);
212 }
213 allTags[className] = 1;
214 }
215 }
216
217 // Mergeall tags that we found
218 for (i in allTags) {
219 var current = document.querySelectorAll('.' + i);
220
221 // We do the work only if there is more than 1 box with the same
222 // build.
223 if (current.length > 1) {
224 // Add the noround class to all the boxes.
225 for(var i = 0; i < current.length; i++) {
226 current[i].className = current[i].className + ' noround';
227 }
228
229 // Add the begin class to the first box.
230 current[0].className = current[0].className + ' begin';
231
232 // Add the end class to the last box.
233 last = current.length - 1;
234 current[last].className = current[last].className + ' end';
235 }
236 }
237
238 // Display the "unmerge" button.
239 document.querySelectorAll('.unmerge')[0].style.display = 'inline'
240 document.querySelectorAll('.uncollapse')[0].style.display = 'inline'
241
242 // Remove the "merge" button.
243 document.querySelectorAll('.collapse')[0].style.display = 'none'
244 document.querySelectorAll('.merge')[0].style.display = 'none'
245
246 // Create a cookie to remember that we want to be merged.
247 createCookie('merged', 'true', 30)
248 }
249
250 // Un-merge the view. This is the opposite of "merge".
251 function unmerge() {
252 // We put back all the spacing.
253 var spacing = document.querySelectorAll('.DevStatusSpacing');
254 for(var i = 0; i < spacing.length; i++) {
255 spacing[i].style.display = "";
256 }
257
258 // We remove the class added to all the boxes we modified.
259 var noround = document.querySelectorAll('.noround');
260 for(var i = 0; i < noround.length; i++) {
261 noround[i].className = noround[i].className.replace("begin", '');
262 noround[i].className = noround[i].className.replace("end", '');
263 noround[i].className = noround[i].className.replace("noround", '');
264 }
265
266 // Delete the cookie, we don't want to be merged anymore.
267 eraseCookie('merged')
268
269 // Display the "merge" button.
270 document.querySelectorAll('.merge')[0].style.display = 'inline'
271
272 // Hide the "unmerge" button.
273 document.querySelectorAll('.unmerge')[0].style.display = 'none'
274 }
275
276 function SetupView() {
277 if (readCookie('merged')) {
278 merge();
279 } else if (readCookie('collapsed')) {
280 collapse();
281 }
282 }
283
284 document.addEventListener("DOMContentLoaded", SetupView, false);
285
286 // ]]>
287 </script>
288 </head>
289 <body class="interface">
290 <div style="text-align:right; float: right;">
291 <a href="https://www.google.com/accounts/ServiceLogin?service=ah&amp;passive=tru e&amp;continue=https://appengine.google.com/_ah/conflogin%3Fcontinue%3Dhttps://c hromium-build.appspot.com/p/chromium/console&amp;ltmpl=gm&amp;shdf=ChoLEgZhaG5hb WUaDkNocm9taXVtIEJ1aWxkDBICYWgiFHIv83J48VD3Mlzg3YybgIqpV0R7KAEyFGspkZghorlGKUZfU AeY_oik8mCU">Sign In</a>
292 </div>
293 <div class="header">
294 <a href="http://build.chromium.org/p/chromium/.">Home</a>
295 - <a href="http://build.chromium.org/p/chromium/waterfall">Waterfall</a>
296 - <a href="http://build.chromium.org/p/chromium/console">Console</a>
297 - <a href="http://build.chromium.org/p/chromium/builders">Builders</a>
298 - <a href="http://build.chromium.org/p/chromium/one_line_per_build">Recent Bui lds</a>
299 - <a href="http://build.chromium.org/p/chromium/buildslaves">Buildslaves</a>
300 - <a href="http://build.chromium.org/p/chromium/changes">Changesources</a>
301 - <a href="http://build.chromium.org/p/chromium/json/help">JSON API</a>
302 - <a href="http://build.chromium.org/p/chromium/about">About</a>
303 </div>
304 <hr />
305 <script>
306 /**
307 * Pseudo namespace for chromium - keep it short because we are in a very
308 * narrow scope for this file.
309 * @type {Object}
310 */
311 var c = {};
312
313 /**
314 * Replaces html references with anchor tags to the same.
315 * @param {String} className CSS class to operate on.
316 */
317 function autoLink(className) {
318 var comments = document.querySelectorAll(className);
319 for(var i = 0; i < comments.length; i++) {
320 comments[i].innerHTML = comments[i].innerHTML.replace(
321 /https?:\/\/[^ \t\n<]*/g, '<a href="$&">$&</a>');
322 }
323 };
324
325 window.addEventListener("load", function() {
326 autoLink('.DevComment');
327 }, false);
328
329 /**
330 * This is the indicator for whether we are in console or waterfall
331 * mode, or some future resource.
332 * @type {String}
333 */
334 c.viewtype = location.pathname.split('/').slice(-1);
335
336 /**
337 * Returns a search string portion including marker, or an empty string.
338 * optional.
339 * @param {String} opt_s A search string, or some form of emptiness.
340 * @returns {!String}
341 */
342 function search(opt_s) {
343 return opt_s ? '?' + opt_s.replace(/^[?]/, '') : '';
344 };
345
346 /**
347 * Replicates a string.
348 * @param {Number} i A whole number of repetitions.
349 * @param {String} x The string to be repeated.
350 * @returns {!String}
351 */
352 function repeat(i, x){
353 var t = ''
354 for (j = 0; j < i; j++) { t += x; }
355 return t;
356 };
357
358 /**
359 * A simple HTML table string.
360 * @param {String} attributes A set of HTML attributes for the table.
361 * @param {String} contents The contents.
362 * @returns {!String}
363 */
364 function table(attributes, contents) {
365 return '<table ' + attributes + '>' + contents + '</table>\n';
366 };
367
368 /**
369 * A simple HTML div string.
370 * @param {String} attributes A set of HTML attributes for the div.
371 * @param {String} contents The contents.
372 * @returns {!String}
373 */
374 function div(attributes, contents) {
375 return '<div ' + attributes + '>' + contents + '</div>';
376 };
377
378 /**
379 * A simple HTML table row string.
380 * @param {String} attributes A set of HTML attributes for the table row.
381 * @param {String} contents The contents.
382 * @returns {!String}
383 */
384 function tr(contents) {
385 return '<tr>' + contents + '</tr>\n';
386 };
387
388 /**
389 * A simple HTML table cell string.
390 * @param {String} attributes A set of HTML attributes for the table cell.
391 * @param {String} contents The contents.
392 * @returns {!String}
393 */
394 function td(attributes, contents) {
395 return '<td ' + attributes + '>' + contents + '</td>';
396 };
397
398 /**
399 * A simple HTML anchor string.
400 * @param {String} url The value for the href.
401 * @param {String} attributes A set of HTML attributes for the table.
402 * @param {String} contents The contents.
403 * @returns {!String}
404 */
405 function a(url, contents, attributes) {
406 return '<a ' + attributes + ' href="' + url + '">' + contents + '</a>';
407 };
408
409 /**
410 * Gives an HTML anchor string to the specified URL, but of the same view
411 * type as the current page.
412 * @param {String} url The URL portion up to the view.
413 * @param {String} search_opt A the query portion.
414 * @param {String} contents The contents for the tag.
415 * @returns {!String}
416 */
417 function aView(url, search_opt, contents) {
418 return a((url ? url + '/' : '') + c.viewtype + search(search_opt),
419 contents, '')
420 };
421
422 /**
423 * A simple HTML iframe string.
424 * @param {String} attributes A set of HTML attributes for the table.
425 * @param {String} url The source of the iframe.
426 * @returns {!String} the iframe or an empty string if noframe is specified.
427 */
428 function iFrame(attributes, url) {
429 if (window.location.href.search('noframe') == -1) {
430 return '<iframe ' + attributes + ' src="' + url + '"></iframe>';
431 }
432 return ''
433 };
434 </script>
435 <div class="Announcement">
436 <iframe width="100%" height="44" frameborder="0" scrolling="no" src="https://chr omium-build.appspot.com/p/chromium-status/current"></iframe>
437 <center style="padding: 0 7px">
438 <table width="100%" valign="top" bgcolor="#efefef" style="-webkit-border-bottom- left-radius: 24px; -webkit-border-bottom-right-radius: 24px; -moz-border-bottom- right-radius: 24px; -moz-border-bottom-right-radius: 24px; box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6); -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6); -webki t-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);">
439 <tr>
440 <td width="29%">
441 <table valign="top" width="100%">
442 <tr>
443 <td style="text-align: right;">
444 <b>Builds:</b>
445 </td>
446 <td>
447 <a href="http://commondatastorage.googleapis.com/chromium-browser-continuous/ind ex.html">continuous</a> |
448 <a href="http://build.chromium.org/f/chromium/symsrv/index.html">s ymbols</a> |
449 <a href="http://chromium-status.appspot.com">status</a>
450 </td>
451 </tr>
452 <tr>
453 <td style="text-align: right;">
454 <b>Dashboards:</b>
455 </td>
456 <td>
457 <a href="http://build.chromium.org/f/chromium/perf/dashboard/overview.html">perf </a> |
458 <a href="http://build.chromium.org/f/chromium/perf/dashboard/memor y.html">memory</a> |
459 <a href="http://build.chromium.org/f/chromium/perf/dashboard/sizes .html">sizes</a> |
460 <a href="http://build.chromium.org/f/chromium/coverage/">coverage< /a> |
461 <a href="http://build.chromium.org/f/chromium/flakiness/">flakines s</a> |
462 <a href="http://build.chromium.org/p/chromium/stats">stats</a>
463 </td>
464 </tr>
465 <tr>
466 <td style="text-align: right;">
467 <b>Chromium:</b>
468 </td>
469 <td>
470 <a href="http://src.chromium.org/viewvc/chrome">sources</a> |
471 <a href="http://codereview.chromium.org/">reviews</a> |
472 <a href="http://code.google.com/p/chromium/issues/list?can=2&amp;q =&amp;sort=pri+mstone&amp;colspec=ID%20Stars%20Pri%20Area%20Type%20Status%20Summ ary%20Modified%20Owner%20Mstone">bugs</a> |
473 <a href="http://dev.chromium.org/Home">dev</a> |
474 <a href="http://www.google.com/support/chrome/">support</a>
475 </td>
476 </tr>
477 <tr>
478 <td style="text-align: right;">
479 <b>Sheriffs:</b>
480 </td>
481 <td>
482 <script>document.write('miket, perkj, vtl')</script>,<br />
483 <script>document.write('eugenis')</script>(Memory),
484 <script>document.write('mseaborn')</script>(NaCl),<br />
485 <script>document.write('kerz')</script>(Perf),
486 <script>document.write('ferringb, adlr')</script>,
487 <script>document.write('petkov')</script>(CrOS),<br />
488 <script>document.write('pliard')</script>(Android),
489 <script>document.write('droger')</script>,
490 <script>document.write('lliabraa')</script>(iOS),<br />
491 <script>document.write('None (channel is sheriff)')</script>(GPU),<br />
492 <a href="https://www.google.com/calendar/render?cid=google.com_iqfka4i9asiva67vl qqf1es094%40group.calendar.google.com">trooper schedule</a>
493 </td>
494 </tr>
495 <tr>
496 <td style="text-align: right;">
497 <b>Gardeners:</b>
498 </td>
499 <td>
500 <script>document.write('eae, podivilov')</script>(WebKit),
501 <script>document.write('None (channel is sheriff)')</script>
502 (<a href="http://dev.chromium.org/developers/tree-sheriffs/chrome- in-chromeos-gardening">ChromeOS</a>)
503 </td>
504 </tr>
505 <tr>
506 <td style="text-align: right;">
507 <b>Masters:</b>
508 </td>
509 <td colspan="2">
510 <script>
511 document.write([
512 a("http://build.chromium.org/p/chromium/../tryserver.chromium/wa terfall", "tryserver.chromium", ""),
513 aView("http://build.chromium.org/p/chromium/../chromium.fyi", "" , "chromium.fyi"),
514 aView("http://build.chromium.org/p/chromium/../chromium.memory", "", "chromium.memory"),
515 aView("http://build.chromium.org/p/chromium/../chromium.memory.f yi", "", "chromium.memory.fyi"),
516 aView("http://build.chromium.org/p/chromium/../chromium.chromium os", "", "chromium.chromiumos"),
517 aView("http://build.chromium.org/p/chromium/../chromiumos", "", "chromiumos"),
518 aView("http://build.chromium.org/p/chromium/../client.nacl", "", "client.nacl"),
519 aView("http://build.chromium.org/p/chromium/../chromium.webkit", "", "chromium.webkit")].join(' | '));
520 </script>
521 </td>
522 </tr>
523 <tr>
524 <td style="text-align: right;">
525 <b>Navigate:</b>
526 </td>
527 <td colspan="2">
528 <script>
529 document.write([
530 a("http://dev.chromium.org/developers/testing/chromium-build-inf rastructure/tour-of-the-chromium-buildbot", "about", ""),
531 a("http://build.chromium.org/p/chromium/waterfall/help", "custom ize", ""),
532 a("http://build.chromium.org/p/chromium/waterfall", "waterfall", ""),
533 a("http://build.chromium.org/p/chromium/console", "console", "") ,
534 a("http://build.chromium.org/p/chromium/waterfall?show_events=tr ue&failures_only=true", "failures", "")].join(' | '));
535 </script>
536 </td>
537 </tr>
538 </table>
539 </td>
540 <td width="1" bgcolor="#CCCCCC">
541 </td>
542 <td width="1%">
543 </td>
544 <td width="70%">
545 <table width="100%">
546 <script language="javascript">
547 c.chromium = '';
548 c.win = '';
549 c.mac = '';
550 c.linux = '';
551 c.chromium_chromiumos = '';
552 c.memory = '';
553 c.memory_fyi = '';
554 c.perf = '';
555 c.cros = '';
556 c.chrome = '';
557 c.lkgr = '';
558 c.gpu = '';
559 c.gpu_fyi = '';
560
561 c.status = 'http://build.chromium.org/p/chromium/../chromium';
562 c.status_win = 'http://build.chromium.org/p/chromium/../chromium.win ';
563 c.status_mac = 'http://build.chromium.org/p/chromium/../chromium.mac ';
564 c.status_linux = 'http://build.chromium.org/p/chromium/../chromium.l inux';
565 c.status_cros = 'http://build.chromium.org/p/chromium/../chromium.ch romiumos';
566 c.status_memory = 'http://build.chromium.org/p/chromium/../chromium. memory';
567 c.status_memory_fyi = 'http://build.chromium.org/p/chromium/../chrom ium.memory.fyi';
568 c.status_chrome = 'http://build.chromium.org/p/chromium/../chromium. chrome';
569 c.status_perf = 'http://build.chromium.org/p/chromium/../chromium.pe rf';
570 c.status_lkgr = 'http://build.chromium.org/p/chromium/../chromium.lk gr';
571 c.status_gpu = 'http://build.chromium.org/p/chromium/../chromium.gpu ';
572 c.status_gpu_fyi = 'http://build.chromium.org/p/chromium/../chromium .gpu.fyi';
573
574 /**
575 * Builds a reference for the iframe with boxes.
576 * @param {String} x the name of the waterfall.
577 * @returns {String} The URL.
578 */
579 function BarUrl(x) {
580 return 'https://chromium-build.appspot.com/p/' + x +
581 '/horizontal_one_box_per_builder';
582 }
583 c.bar = BarUrl('chromium')
584 c.bar_win = BarUrl('chromium.win');
585 c.bar_mac = BarUrl('chromium.mac');
586 c.bar_linux = BarUrl('chromium.linux');
587 c.bar_memory = BarUrl('chromium.memory');
588 c.bar_memory_fyi = BarUrl('chromium.memory.fyi');
589 c.bar_perf = BarUrl('chromium.perf');
590 c.bar_chrome = BarUrl('chromium.chrome');
591 c.bar_lkgr = BarUrl('chromium.lkgr');
592 c.bar_cros = BarUrl('chromium.chromiumos');
593 c.bar_gpu = BarUrl('chromium.gpu');
594 c.bar_gpu_fyi = BarUrl('chromium.gpu.fyi');
595
596
597 /**
598 * Joins URL and search terms.
599 * @param {String} type The Url without the cgi search portion.
600 * @param {String} content The parameters for the sub-selection
601 * inside the master. Optional.
602 * @returns {String} A completed URL.
603 */
604 function GetUrl(type, content) {
605 return type + search(content);
606 }
607
608 /**
609 * Callback to replace the LKGR link with one that identifies
610 * the current revision for the LKGR.
611 */
612 function DisplayLKGR() {
613 var xmlHttp = new XMLHttpRequest();
614 var lkgrPath = '/p/chromium.lkgr' +
615 '/json/builders/Linux%20x64/builds/-1/as_text=1.jso n';
616 var lkgrLink = document.getElementById('LKGRLink');
617 xmlHttp.open('GET', lkgrPath, false);
618 xmlHttp.send(null);
619 if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
620 var buildData;
621 if (typeof (JSON) !== 'undefined' &&
622 typeof (JSON.parse) === 'function') {
623 buildData = JSON.parse(xmlHttp.responseText);
624 } else {
625 buildData = eval('(' + xmlHttp.responseText + ')');
626 }
627 var properties = buildData['properties'];
628 for (var i = 0; i < properties.length; i++) {
629 if (properties[i][0] == 'got_revision') {
630 lkgrLink.innerHTML = 'LKGR<br>(' + properties[i][1] + ')';
631 return;
632 }
633 }
634 }
635 }
636
637 c.default_iframe_properties = [
638 'width="100%"',
639 'height="20"',
640 'frameborder="0"',
641 'scrolling="no"',
642 ].join(' ');
643
644 /**
645 * The most detailed specification of a builder bar with boxes.
646 * Reutrns an HTMLstring with 2 <td>s
647 * @param {String} status_url URL portion for the title link.
648 * @param {String} bar_url URL portion for the array of boxes.
649 * @param {String} content specification for the references, e.g..
650 * @param {String} name what to call this bar.
651 * @param {String} bar_properties extra attributes for the array
652 * of boxes portion.
653 * @param {String} link_properties extra attributes for the name
654 * portion that is a link.
655 * @returns {String}
656 */
657 function HTMLBaseBar(status_url, bar_url, content, name,
658 bar_properties, link_properties) {
659 return td('',
660 a(GetUrl(status_url, content), name,
661 link_properties)) +
662 td(bar_properties,
663 iFrame(c.default_iframe_properties,
664 GetUrl(bar_url, content)));
665 }
666
667 /**
668 * The more common specification of a builder bar with boxes.
669 * Presume to take an entire row.
670 * @param {String} status_url URL portion for the title link.
671 * @param {String} bar_url URL portion for the array of boxes.
672 * @param {String} content specification for the references, e.g..
673 * @param {String} name what to call this bar.
674 * @returns {String}
675 */
676 function HTMLBar(status_url, bar_url, content, name) {
677 return tr(HTMLBaseBar(status_url, bar_url, content, name,
678 'width="99%" colspan=9', ''));
679 }
680
681 /**
682 * A specification of a builder bar with boxes, which is one of
683 * multiple in a row.
684 * Note that since these are elements of a table, percents
685 * can be irrelevant to the final layout.
686 * @param {String} status_url URL portion for the title link.
687 * @param {String} bar_url URL portion for the array of boxes.
688 * @param {String} content specification for the references, e.g..
689 * @param {String} name what to call this bar.
690 * @param {String} pc percent of the line to allocat to the boxes.
691 * @returns {String}
692 */
693 function HTMLSubBar(status_url, bar_url, content, name, pc) {
694 return HTMLBaseBar(status_url, bar_url, content, name,
695 'width="' + pc + '"', '');
696 }
697
698 document.write(tr(td(
699 'colspan=10 width="99%"',
700 div(
701 'class="closerbox" width="100%"',
702 div('class="title" width="100%" height="10px"',
703 a('http://chromium-status.appspot.com', 'Tree closers')) +
704 table(
705 'width="100%"',
706 tr(
707 HTMLBaseBar(c.status, c.bar, c.chromium, 'Chromium',
708 'width="8%"') +
709 HTMLBaseBar(c.status_win, c.bar_win, c.win, 'Win',
710 'width="42%"') +
711 HTMLBaseBar(c.status_mac, c.bar_mac, c.mac, 'Mac',
712 'width="30%"') +
713 HTMLBaseBar(c.status_linux, c.bar_linux, c.linux,
714 'Linux', 'width="20%"')) +
715 tr(HTMLBaseBar(c.status_cros, c.bar_cros, c.cros,
716 'ChromiumOS', 'width="50%" colspan=3') +
717 HTMLSubBar(c.status_chrome, c.bar_chrome, c.chrome,
718 'Official', '30%') +
719 HTMLSubBar(c.status_memory, c.bar_memory, c.memory,
720 'Memory', '20%')))))));
721
722 document.write(tr(
723 HTMLBaseBar(c.status_lkgr, c.bar_lkgr, c.lkgr,
724 'LKGR', 'width="25%"', 'id="LKGRLink"') +
725 HTMLBaseBar(c.status_perf, c.bar_perf, c.perf,
726 'Perf', 'width="75%" colspan=5', '')));
727
728 document.write(tr(
729 HTMLBaseBar(c.status_memory_fyi, c.bar_memory_fyi, c.memory_fyi,
730 'Memory<br>FYI', 'width="100%" colspan=6', '')));
731
732 document.write(tr(
733 HTMLBaseBar(c.status_gpu, c.bar_gpu, c.gpu,
734 'GPU', 'width="80%"', '') +
735 HTMLBaseBar(c.status_gpu_fyi, c.bar_gpu_fyi, c.gpu_fyi,
736 'GPU FYI', 'width="20%" colspan=5', '')));
737
738 setTimeout('DisplayLKGR()', 100);
739 </script>
740 </table>
741 </td>
742 </tr>
743 </table>
744 </center>
745 </div>
746 <hr />
747 <div class="content">
748 <div align="center">
749 <table width="95%" class="Grid" border="0" cellspacing="0">
750 <tr>
751 <td width="33%" align="left" class="left_align">
752 </td>
753 <td width="33%" align="center" class="center_align">
754 <div align="center">
755 <table class="info">
756 <tr>
757 <td>Legend:&nbsp;&nbsp;</td>
758 <td class="legend success" title="All tests passed">Passed</td>
759 <td class="legend failure" title="There is a new failure. Take a look!">Failed</ td>
760 <td class="legend warnings" title="It was failing before, and it is still failin g. Make sure you did not introduce new regressions">Failed&nbsp;Again</td>
761 <td class="legend running" title="The tests are still running">Running</td>
762 <td class="legend exception" title="Something went wrong with the test, there is no result">Exception</td>
763 <td class="legend offline" title="The builder is offline, as there are no slaves connected to it">Offline</td>
764 <td class="legend notstarted" title="No result yet.">No&nbsp;data</td>
765 </tr>
766 </table>
767 </div>
768 </td>
769 <td width="33%" align="right" class="right_align">
770 <script type="text/javascript">
771 // <![CDATA[
772 function reload_page() {
773 name_value = document.getElementById('namebox').value
774 if (document.location.href.lastIndexOf('?') == -1)
775 document.location.href = document.location.href+ '?name=' + name_v alue;
776 else
777 document.location.href = document.location.href+ '&name=' + name_v alue;
778 }
779 // ]]>
780 </script>
781 <!-- <input id='namebox' name='name' type='text' style='color:#999;'
782 onblur='this.value = this.value || this.defaultValue; this.style.col or = "#999";'
783 onfocus='this.value=""; this.style.color = "#000";'
784 value='Personalized for...' />
785 <input type='submit' value='Go' onclick='reload_page()' /> -->
786 </td>
787 </tr>
788 </table>
789 </div>
790 <br />
791 <div align="center">
792 <table width="96%" class="ConsoleData"><tr>
793 </table>
794 </div>
795 <div id="divBox" onmouseout="if (checkMouseLeave(this, event)) this.style.displa y = 'None'" class="BuildWaterfall">
796 </div>
797 <iframe id="frameBox" style="display: none;"></iframe>
798 <script type="text/javascript">
799 // replace 'onload="updateDiv(event);" with this, as iframe doesn't have onload event in xhtml
800 window.addEventListener("load", function() {
801 document.getElementById('frameBox').onload = function(event) {
802 updateDiv(event);
803 };
804 }, false);
805 </script>
806 </div><div class="footer" style="clear:both">
807 <hr />
808 [ <a class="collapse" href="#" onclick="collapse(); return false;">collapse</a >
809 <a class="uncollapse" href="#" onclick="uncollapse(); return false;">un-collapse </a>
810 <a class="merge" href="#" onclick="merge(); return false;">merge</a>
811 <a class="unmerge" style="display: none" href="#" onclick="unmerge(); return fal se;">un-merge</a> ]
812 <p>Debug info: {'revision_final': 25, 'builds_scanned': 200, 'source_all': 25, 'source_len': 25, 'last_revision': u'171866', 'from_cache': 54, 'added_blocks': 0, 'load_time': 0.038244009017944336}</p>
813 </div>
814 </body>
815 </html>
OLDNEW
« no previous file with comments | « tests/test_console_merger/merged_console_output.html ('k') | tests/test_console_merger/win_categories_input.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698