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

Side by Side Diff: Tools/GardeningServer/scripts/ui/failures.js

Issue 332073002: Green the garden-o-matic unittests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix temp change Created 6 years, 6 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
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 this._addSpan('failures', ' ' + failures.join(', ')); 50 this._addSpan('failures', ' ' + failures.join(', '));
51 }, 51 },
52 _addSpan: function(className, text) 52 _addSpan: function(className, text)
53 { 53 {
54 var span = this.appendChild(document.createElement('span')); 54 var span = this.appendChild(document.createElement('span'));
55 span.className = className; 55 span.className = className;
56 span.textContent = text; 56 span.textContent = text;
57 }, 57 },
58 equals: function(configuration) 58 equals: function(configuration)
59 { 59 {
60 return this._configuration && this._configuration.is64bit == configurati on.is64bit && this._configuration.version == configuration.version; 60 return this._configuration && this._configuration.is64bit == configurati on.is64bit && this._configuration.version == configuration.version;
61 } 61 }
62 }); 62 });
63 63
64 function cellContainsConfiguration(cell, configuration) 64 function cellContainsConfiguration(cell, configuration)
65 { 65 {
66 return Array.prototype.some.call(cell.children, function(configurationElemen t) { 66 return Array.prototype.some.call(cell.children, function(configurationElemen t) {
67 return configurationElement.equals && configurationElement.equals(config uration); 67 return configurationElement.equals && configurationElement.equals(config uration);
68 }); 68 });
69 } 69 }
70 70
71 function cellByBuildType(row, configuration) 71 function cellByBuildType(row, configuration)
72 { 72 {
73 return row.cells[configuration.debug ? 2 : 1]; 73 return row.cells[configuration.debug ? 2 : 1];
74 } 74 }
75 75
76 ui.failures.FailureGrid = base.extends('table', { 76 ui.failures.FailureGrid = base.extends('table', {
77 init: function() 77 init: function()
78 { 78 {
79 this.className = 'failures'; 79 this.className = 'failures';
80 var titles = this.createTHead().insertRow(); 80 var titles = this.createTHead().insertRow();
81 titles.insertCell().textContent = 'type';
82 titles.insertCell().textContent = 'release';
81 titles.insertCell().textContent = 'debug'; 83 titles.insertCell().textContent = 'debug';
ojan 2014/06/15 00:43:44 This and the lines just below it are the only func
82 titles.insertCell().textContent = 'release';
83 titles.insertCell().textContent = 'type';
84 this._body = this.appendChild(document.createElement('tbody')); 84 this._body = this.appendChild(document.createElement('tbody'));
85 this._reset(); 85 this._reset();
86 }, 86 },
87 _rowByResult: function(result) 87 _rowByResult: function(result)
88 { 88 {
89 var row = this._resultRows[result]; 89 var row = this._resultRows[result];
90 $(row).show(); 90 $(row).show();
91 if (row) 91 if (row)
92 return row; 92 return row;
93 93
94 row = this._resultRows[result] = this._body.insertRow(0); 94 row = this._resultRows[result] = this._body.insertRow(0);
95 row.className = result; 95 row.className = result;
96 var titleCell = row.insertCell();
97 titleCell.appendChild(document.createElement('span')).textContent = resu lt;
96 row.insertCell(); 98 row.insertCell();
97 row.insertCell(); 99 row.insertCell();
98 var titleCell = row.insertCell();
99 titleCell.appendChild(document.createElement('span')).textContent = resu lt;
100 return row; 100 return row;
101 }, 101 },
102 update: function(resultsByBuilder) 102 update: function(resultsByBuilder)
103 { 103 {
104 if (this._pendingReset) 104 if (this._pendingReset)
105 this._reset(); 105 this._reset();
106 106
107 if (!resultsByBuilder) 107 if (!resultsByBuilder)
108 return; 108 return;
109 109
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 ui.failures.List = base.extends('ul', { 148 ui.failures.List = base.extends('ul', {
149 init: function() 149 init: function()
150 { 150 {
151 this.className = 'failures'; 151 this.className = 'failures';
152 this.textContent = 'Loading...'; 152 this.textContent = 'Loading...';
153 } 153 }
154 }); 154 });
155 155
156 })(); 156 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698