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

Side by Side Diff: webkit/tools/layout_tests/dashboards/dashboard_base.js

Issue 267044: Fix double page generation bug. Now that we use onhashchange,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 2 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
« no previous file with comments | « no previous file | webkit/tools/layout_tests/flakiness_dashboard.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 appendScript(getPathToBuilderResultsFile(builderName) + 'results.json'); 241 appendScript(getPathToBuilderResultsFile(builderName) + 'results.json');
242 } 242 }
243 243
244 // Grab expectations file from any builder. 244 // Grab expectations file from any builder.
245 appendScript(getPathToBuilderResultsFile(builderName) + 'expectations.json'); 245 appendScript(getPathToBuilderResultsFile(builderName) + 'expectations.json');
246 } 246 }
247 247
248 var hasDoneInitialPageGeneration = false; 248 var hasDoneInitialPageGeneration = false;
249 249
250 function handleResourceLoad() { 250 function handleResourceLoad() {
251 // In case we load a results.json that's not in the list of builders,
252 // make sure to only call handleLocationChange once from the resource loads.
251 if (!hasDoneInitialPageGeneration) 253 if (!hasDoneInitialPageGeneration)
252 handleLocationChange(); 254 handleLocationChange();
253 } 255 }
254 256
255 function handleLocationChange() { 257 function handleLocationChange() {
256 if (!expectationsLoaded) 258 if (!expectationsLoaded)
257 return; 259 return;
258 260
259 for (var build in builders) { 261 for (var build in builders) {
260 if (!resultsByBuilder[build]) 262 if (!resultsByBuilder[build])
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 !(popup.compareDocumentPosition(e.target) & 16)) { 337 !(popup.compareDocumentPosition(e.target) & 16)) {
336 hidePopup(); 338 hidePopup();
337 } 339 }
338 }, false); 340 }, false);
339 341
340 window.addEventListener('load', function() { 342 window.addEventListener('load', function() {
341 // This doesn't seem totally accurate as there is a race between 343 // This doesn't seem totally accurate as there is a race between
342 // onload firing and the last script tag being executed. 344 // onload firing and the last script tag being executed.
343 logTime('Time to load JS', pageLoadStartTime); 345 logTime('Time to load JS', pageLoadStartTime);
344 }, false); 346 }, false);
OLDNEW
« no previous file with comments | « no previous file | webkit/tools/layout_tests/flakiness_dashboard.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698