OLD | NEW |
1 /** | 1 /** |
2 * @fileoverview Base JS file for pages that want to parse the results JSON | 2 * @fileoverview Base JS file for pages that want to parse the results JSON |
3 * from the testing bots. This deals with generic utility functions, visible | 3 * from the testing bots. This deals with generic utility functions, visible |
4 * history, popups and appending the script elements for the JSON files. | 4 * history, popups and appending the script elements for the JSON files. |
5 * | 5 * |
6 * The calling page is expected to implement three "abstract" functions/objects. | 6 * The calling page is expected to implement three "abstract" functions/objects. |
7 * generatePage, validateHashParameter and defaultStateValues. | 7 * generatePage, validateHashParameter and defaultStateValues. |
8 */ | 8 */ |
9 var pageLoadStartTime = Date.now(); | 9 var pageLoadStartTime = Date.now(); |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 switch(key) { | 71 switch(key) { |
72 case 'testType': | 72 case 'testType': |
73 validateParameter(currentState, key, value, | 73 validateParameter(currentState, key, value, |
74 function() { | 74 function() { |
75 return isValidName(value); | 75 return isValidName(value); |
76 }); | 76 }); |
77 | 77 |
78 return true; | 78 return true; |
79 | 79 |
80 case 'useWebKitCanary': | 80 case 'useWebKitCanary': |
| 81 case 'useV8Canary': |
81 case 'debug': | 82 case 'debug': |
82 currentState[key] = value == 'true'; | 83 currentState[key] = value == 'true'; |
83 | 84 |
84 return true; | 85 return true; |
85 | 86 |
86 default: | 87 default: |
87 return handleValidHashParameter(key, value); | 88 return handleValidHashParameter(key, value); |
88 } | 89 } |
89 } | 90 } |
90 | 91 |
91 var defaultCrossDashboardStateValues = { | 92 var defaultCrossDashboardStateValues = { |
92 testType: 'layout_test_results', | 93 testType: 'layout_test_results', |
93 useWebKitCanary: false, | 94 useWebKitCanary: false, |
| 95 useV8Canary: false, |
94 debug: false | 96 debug: false |
95 } | 97 } |
96 | 98 |
97 // Generic utility functions. | 99 // Generic utility functions. |
98 function $(id) { | 100 function $(id) { |
99 return document.getElementById(id); | 101 return document.getElementById(id); |
100 } | 102 } |
101 | 103 |
102 function stringContains(a, b) { | 104 function stringContains(a, b) { |
103 return a.indexOf(b) != -1; | 105 return a.indexOf(b) != -1; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } else { | 191 } else { |
190 // Map of builderName (the name shown in the waterfall) | 192 // Map of builderName (the name shown in the waterfall) |
191 // to builderPath (the path used in the builder's URL) | 193 // to builderPath (the path used in the builder's URL) |
192 // TODO(ojan): Make this switch based off of the testType. | 194 // TODO(ojan): Make this switch based off of the testType. |
193 if (currentState.useWebKitCanary) { | 195 if (currentState.useWebKitCanary) { |
194 builders = { | 196 builders = { |
195 'Webkit (webkit.org)': 'webkit-rel-webkit-org', | 197 'Webkit (webkit.org)': 'webkit-rel-webkit-org', |
196 'Webkit Linux (webkit.org)': 'webkit-rel-linux-webkit-org', | 198 'Webkit Linux (webkit.org)': 'webkit-rel-linux-webkit-org', |
197 'Webkit Mac (webkit.org)': 'webkit-rel-mac-webkit-org' | 199 'Webkit Mac (webkit.org)': 'webkit-rel-mac-webkit-org' |
198 }; | 200 }; |
| 201 } else if (currentState.useV8Canary) { |
| 202 builders = { |
| 203 'Webkit (V8-Latest)': 'webkit-rel-v8', |
| 204 'Webkit Mac (V8-Latest)': 'webkit-rel-mac-v8', |
| 205 'Webkit Linux (V8-Latest)': 'webkit-rel-linux-v8' |
| 206 } |
199 } else { | 207 } else { |
200 builders = { | 208 builders = { |
201 'Webkit': 'webkit-rel', | 209 'Webkit': 'webkit-rel', |
202 'Webkit (dbg)(1)': 'webkit-dbg-1', | 210 'Webkit (dbg)(1)': 'webkit-dbg-1', |
203 'Webkit (dbg)(2)': 'webkit-dbg-2', | 211 'Webkit (dbg)(2)': 'webkit-dbg-2', |
204 'Webkit (dbg)(3)': 'webkit-dbg-3', | 212 'Webkit (dbg)(3)': 'webkit-dbg-3', |
205 'Webkit Linux': 'webkit-rel-linux', | 213 'Webkit Linux': 'webkit-rel-linux', |
206 'Webkit Linux (dbg)(1)': 'webkit-dbg-linux-1', | 214 'Webkit Linux (dbg)(1)': 'webkit-dbg-linux-1', |
207 'Webkit Linux (dbg)(2)': 'webkit-dbg-linux-2', | 215 'Webkit Linux (dbg)(2)': 'webkit-dbg-linux-2', |
208 'Webkit Linux (dbg)(3)': 'webkit-dbg-linux-3', | 216 'Webkit Linux (dbg)(3)': 'webkit-dbg-linux-3', |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 !(popup.compareDocumentPosition(e.target) & 16)) { | 352 !(popup.compareDocumentPosition(e.target) & 16)) { |
345 hidePopup(); | 353 hidePopup(); |
346 } | 354 } |
347 }, false); | 355 }, false); |
348 | 356 |
349 window.addEventListener('load', function() { | 357 window.addEventListener('load', function() { |
350 // This doesn't seem totally accurate as there is a race between | 358 // This doesn't seem totally accurate as there is a race between |
351 // onload firing and the last script tag being executed. | 359 // onload firing and the last script tag being executed. |
352 logTime('Time to load JS', pageLoadStartTime); | 360 logTime('Time to load JS', pageLoadStartTime); |
353 }, false); | 361 }, false); |
OLD | NEW |