OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. | 4 found in the LICENSE file. |
5 --> | 5 --> |
6 | 6 |
7 <link rel="import" href="ct-commit-list.html"> | 7 <link rel="import" href="ct-commit-list.html"> |
8 | 8 |
9 <link rel="import" href="../model/ct-commit-log-mock.html"> | 9 <link rel="import" href="../model/ct-commit-log-mock.html"> |
10 | 10 |
11 <script> | 11 <script> |
12 (function () { | 12 (function () { |
13 | 13 |
14 module("ct-commit-list"); | 14 module("ct-commit-list"); |
15 | 15 |
16 asyncTest("basic", 1, function() { | 16 asyncTest("basic", 1, function() { |
17 var list = document.createElement('ct-commit-list'); | 17 var list = document.createElement('ct-commit-list'); |
18 | 18 |
19 list.commits = new CTCommitLogMock(); | 19 list.commits = new CTCommitLogMock(); |
20 | 20 |
| 21 // FIXME: This test shouldn't rely on firstRevision being empty to pass. |
| 22 list.commits.firstRevision = {}; |
| 23 |
21 var blinkCommits = list.commits.commits.blink; | 24 var blinkCommits = list.commits.commits.blink; |
22 var revision; | 25 var revision; |
23 for (revision in blinkCommits) | 26 for (revision in blinkCommits) |
24 break; | 27 break; |
25 | 28 |
26 var numCommits = 2; | 29 var numCommits = 2; |
27 | 30 |
28 list.first = {blink: revision}; | 31 list.first = {blink: revision}; |
29 list.last = {blink: Number(revision) + numCommits}; | 32 list.last = {blink: Number(revision) + numCommits}; |
30 | 33 |
(...skipping 21 matching lines...) Expand all Loading... |
52 requestAnimationFrame(function() { | 55 requestAnimationFrame(function() { |
53 var commits = list.shadowRoot.querySelectorAll('ct-commit'); | 56 var commits = list.shadowRoot.querySelectorAll('ct-commit'); |
54 equal(commits.length, 0); | 57 equal(commits.length, 0); |
55 | 58 |
56 start(); | 59 start(); |
57 }); | 60 }); |
58 }); | 61 }); |
59 | 62 |
60 })() | 63 })() |
61 </script> | 64 </script> |
OLD | NEW |