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

Side by Side Diff: Tools/GardeningServer/ui/ct-commit-list-tests.html

Issue 462453002: Sheriff-O-Matic: Transition more unit tests to mocha. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase and fix 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6
7 <link rel="import" href="ct-commit-list.html">
8
9 <link rel="import" href="../model/ct-commit-log-mock.html">
10
11 <script>
12 (function () {
13
14 module("ct-commit-list");
15
16 asyncTest("basic", 1, function() {
17 var list = document.createElement('ct-commit-list');
18
19 list.commits = new CTCommitLogMock();
20
21 // FIXME: This test shouldn't rely on firstRevision being empty to pass.
22 list.commits.firstRevision = {};
23
24 var blinkCommits = list.commits.commits.blink;
25 var revision;
26 for (revision in blinkCommits)
27 break;
28
29 var numCommits = 2;
30
31 list.first = {blink: revision};
32 list.last = {blink: Number(revision) + numCommits};
33
34 requestAnimationFrame(function() {
35 var commits = list.shadowRoot.querySelectorAll('ct-commit');
36 equal(commits.length, numCommits);
37
38 start();
39 });
40 });
41
42 asyncTest("backwards", 1, function() {
43 var list = document.createElement('ct-commit-list');
44
45 list.commits = new CTCommitLogMock();
46
47 var blinkCommits = list.commits.commits.blink;
48 var revision;
49 for (revision in blinkCommits)
50 break;
51
52 list.first = {blink: revision};
53 list.last = {blink: Number(revision) - 1};
54
55 requestAnimationFrame(function() {
56 var commits = list.shadowRoot.querySelectorAll('ct-commit');
57 equal(commits.length, 0);
58
59 start();
60 });
61 });
62
63 })()
64 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/ui/ct-builder-tests.html ('k') | Tools/GardeningServer/ui/ct-commit-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698