| 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 30 matching lines...) Expand all Loading... |
| 41 'P': 'PASS', | 41 'P': 'PASS', |
| 42 'F': 'TEXT FAIL', | 42 'F': 'TEXT FAIL', |
| 43 'S': 'SIMPLIFIED', | 43 'S': 'SIMPLIFIED', |
| 44 'I': 'IMAGE', | 44 'I': 'IMAGE', |
| 45 'O': 'OTHER', | 45 'O': 'OTHER', |
| 46 'N': 'NO DATA', | 46 'N': 'NO DATA', |
| 47 'X': 'SKIP' | 47 'X': 'SKIP' |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // Keys in the JSON files. | 50 // Keys in the JSON files. |
| 51 var NON_WONTFIX_COUNTS_KEY = 'nonWontfixCounts'; | 51 var WONTFIX_COUNTS_KEY = 'wontfixCounts'; |
| 52 var ALL_COUNTS_KEY = 'allCounts'; | 52 var FIXABLE_COUNTS_KEY = 'fixableCounts'; |
| 53 var DEFERRED_COUNTS_KEY = 'deferredCounts'; | 53 var DEFERRED_COUNTS_KEY = 'deferredCounts'; |
| 54 var NON_WONTFIX_DESCRIPTION = 'All tests we want to pass for this release'; | 54 var WONTFIX_DESCRIPTION = 'Tests never to be fixed (WONTFIX)'; |
| 55 var ALL_COUNTS_DESCRIPTION = 'All tests (inludes WONTFIX)'; | 55 var FIXABLE_DESCRIPTION = 'All tests for this release'; |
| 56 var DEFERRED_DESCRIPTION = 'All deferred tests'; | 56 var DEFERRED_DESCRIPTION = 'All deferred tests (DEFER)'; |
| 57 var FIXABLE_COUNT_KEY = 'fixableCount'; | 57 var FIXABLE_COUNT_KEY = 'fixableCount'; |
| 58 var ALL_FIXABLE_COUNT_KEY = 'allFixableCount'; |
| 58 var CHROME_REVISIONS_KEY = 'chromeRevision'; | 59 var CHROME_REVISIONS_KEY = 'chromeRevision'; |
| 59 var WEBKIT_REVISIONS_KEY = 'webkitRevision'; | 60 var WEBKIT_REVISIONS_KEY = 'webkitRevision'; |
| 60 | 61 |
| 61 /** | 62 /** |
| 62 * Takes a key and a value and sets the currentState[key] = value iff key is | 63 * Takes a key and a value and sets the currentState[key] = value iff key is |
| 63 * a valid hash parameter and the value is a valid value for that key. Handles | 64 * a valid hash parameter and the value is a valid value for that key. Handles |
| 64 * cross-dashboard parameters then falls back to calling | 65 * cross-dashboard parameters then falls back to calling |
| 65 * handleValidHashParameter for dashboard-specific parameters. | 66 * handleValidHashParameter for dashboard-specific parameters. |
| 66 * | 67 * |
| 67 * @return {boolean} Whether the key what inserted into the currentState. | 68 * @return {boolean} Whether the key what inserted into the currentState. |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 350 |
| 350 window.addEventListener('load', function() { | 351 window.addEventListener('load', function() { |
| 351 // This doesn't seem totally accurate as there is a race between | 352 // This doesn't seem totally accurate as there is a race between |
| 352 // onload firing and the last script tag being executed. | 353 // onload firing and the last script tag being executed. |
| 353 logTime('Time to load JS', pageLoadStartTime); | 354 logTime('Time to load JS', pageLoadStartTime); |
| 354 setInterval(function() { | 355 setInterval(function() { |
| 355 if (oldLocation != window.location.href) | 356 if (oldLocation != window.location.href) |
| 356 handleLocationChange(); | 357 handleLocationChange(); |
| 357 }, 100); | 358 }, 100); |
| 358 }, false); | 359 }, false); |
| OLD | NEW |