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

Side by Side Diff: Tools/GardeningServer/scripts/results_unittests.js

Issue 23521006: Rework garden-o-matic to fetch lists of builds from googlestorage properly. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: lint Created 7 years, 3 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 | « Tools/GardeningServer/scripts/results.js ('k') | no next file » | 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 * 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 simulator.jsonp = function(url, callback) { 323 simulator.jsonp = function(url, callback) {
324 simulator.scheduleCallback(function() { 324 simulator.scheduleCallback(function() {
325 var result = keyMap[/[^/]+_Builder/.exec(url)][/\d+/.exec(url)]; 325 var result = keyMap[/[^/]+_Builder/.exec(url)][/\d+/.exec(url)];
326 callback(result ? result : {}); 326 callback(result ? result : {});
327 }); 327 });
328 }; 328 };
329 329
330 simulator.get = function(url, callback) { 330 simulator.get = function(url, callback) {
331 simulator.scheduleCallback(function() { 331 simulator.scheduleCallback(function() {
332 if (/Mock_Builder/.test(url)) 332 if (/Mock_Builder/.test(url))
333 callback('<a href="11101/"></a><a href="11102/"></a><a href="111 03/"></a><a href="11104/"></a><a href="11105/"></a><a href="11106/"></a><a href= "11107/"></a><a href="11108/"></a>'); 333 callback('<Prefix>Mock_Builder/11101/</Prefix>' +
334 '<Prefix>Mock_Builder/11102/</Prefix>' +
335 '<Prefix>Mock_Builder/11103/</Prefix>' +
336 '<Prefix>Mock_Builder/11104/</Prefix>' +
337 '<Prefix>Mock_Builder/11105/</Prefix>' +
338 '<Prefix>Mock_Builder/11106/</Prefix>' +
339 '<Prefix>Mock_Builder/11107/</Prefix>' +
340 '<Prefix>Mock_Builder/11108/</Prefix>');
334 else if (/Another_Builder/.test(url)) 341 else if (/Another_Builder/.test(url))
335 callback('<a href="22201/"></a><a href="22202/"></a>'); 342 callback('<Prefix>Another_Builder/22201/</Prefix>' +
343 '<Prefix>Another_Builder/22202/</Prefix>');
336 else 344 else
337 ok(false, 'Unexpected URL: ' + url); 345 ok(false, 'Unexpected URL: ' + url);
338 }); 346 });
339 }; 347 };
340 348
341 simulator.runTest(function() { 349 simulator.runTest(function() {
342 results.regressionRangeForFailure("Mock Builder", "userscripts/another-t est.html", function(oldestFailingRevision, newestPassingRevision) { 350 results.regressionRangeForFailure("Mock Builder", "userscripts/another-t est.html", function(oldestFailingRevision, newestPassingRevision) {
343 equals(oldestFailingRevision, 90426); 351 equals(oldestFailingRevision, 90426);
344 equals(newestPassingRevision, 90424); 352 equals(newestPassingRevision, 90424);
345 }); 353 });
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 }); 536 });
529 537
530 deepEqual(probedURLs, [ 538 deepEqual(probedURLs, [
531 MockResultsBaseURL.replace('Mock_Builder', 'MockBuilder1') + "/failing_r esults.json", 539 MockResultsBaseURL.replace('Mock_Builder', 'MockBuilder1') + "/failing_r esults.json",
532 MockResultsBaseURL.replace('Mock_Builder', 'MockBuilder2') + "/failing_r esults.json" 540 MockResultsBaseURL.replace('Mock_Builder', 'MockBuilder2') + "/failing_r esults.json"
533 ]); 541 ]);
534 542
535 }); 543 });
536 544
537 })(); 545 })();
OLDNEW
« no previous file with comments | « Tools/GardeningServer/scripts/results.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698