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

Unified Diff: Tools/GardeningServer/model/test/ct-commit-log-tests.html

Issue 498523002: [Sheriff-o-matic] Use likely_revisions instead of first_failing/last_passing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase + no sort Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Tools/GardeningServer/model/test/ct-commit-log-tests.html
diff --git a/Tools/GardeningServer/model/test/ct-commit-log-tests.html b/Tools/GardeningServer/model/test/ct-commit-log-tests.html
index eea8e849312055b7b265a684f2c2ab2d1a32a4e0..ca438600e1a9dcbbc12641c885e90015a636bed7 100644
--- a/Tools/GardeningServer/model/test/ct-commit-log-tests.html
+++ b/Tools/GardeningServer/model/test/ct-commit-log-tests.html
@@ -53,18 +53,27 @@ describe('ct-commit-log model', function() {
expectedCommits[repository][commit.revision] = commit;
assert.deepEqual(log.commits, expectedCommits);
- assert.deepEqual(log.range(repository, commit.revision, commit.revision), [commit]);
+ var revisions = [commit.revision];
+ assert.deepEqual(log.range(repository, revisions), [commit]);
- // This url is different than the one obove because CTCommitLog gets the url
+ // This url is different than the one above because CTCommitLog gets the url
// from CTRepositories.
var incompleteRepositoryUrl = log._repositories.repositories[repository].repositoryUrl;
- var incompleteCommitAfter = CTCommit.createIncomplete(incompleteRepositoryUrl, commit.revision + 1, repository);
+
+ var nextRev = String(commit.revision + 1);
+ var incompleteCommitAfter =
+ CTCommit.createIncomplete(incompleteRepositoryUrl, nextRev, repository);
+ revisions.push(nextRev);
// Expect an incomplete commit for revision + 1.
- assert.deepEqual(log.range(repository, commit.revision, commit.revision + 1), [commit, incompleteCommitAfter]);
+ assert.deepEqual(log.range(repository, revisions), [commit, incompleteCommitAfter]);
// Expect two incomplete commits: one before and one after.
- var incompleteCommitBefore = CTCommit.createIncomplete(incompleteRepositoryUrl, commit.revision - 1, repository);
- assert.deepEqual(log.range(repository, commit.revision - 1, commit.revision + 1),
+ var prevRev = String(commit.revision - 1);
+ var incompleteCommitBefore =
+ CTCommit.createIncomplete(incompleteRepositoryUrl, prevRev, repository);
+ // Inserting at the beginning of the list.
+ revisions.splice(0, 0, prevRev);
+ assert.deepEqual(log.range(repository, revisions),
[incompleteCommitBefore, commit, incompleteCommitAfter]);
});
});

Powered by Google App Engine
This is Rietveld 408576698