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

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

Issue 484753002: Fix exception when running Sheriff-o-Matic tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
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
(...skipping 12 matching lines...) Expand all
23 23
24 describe('commit list UI', function() { 24 describe('commit list UI', function() {
25 beforeEach(function(done) { 25 beforeEach(function(done) {
26 var repos = [ 26 var repos = [
27 { commits: [ new CTCommitMock(), new CTCommitMock() ], 27 { commits: [ new CTCommitMock(), new CTCommitMock() ],
28 expanded: false }, 28 expanded: false },
29 { commits: [ new CTCommitMock(), new CTCommitMock() ], 29 { commits: [ new CTCommitMock(), new CTCommitMock() ],
30 expanded: false } 30 expanded: false }
31 ]; 31 ];
32 32
33 var CommitList = Object.create(Object); 33 list.commitList = {
34 CommitList.prototype.repositories = function() { 34 repositories: function() {
35 return repos; 35 return repos;
36 }
36 }; 37 };
37 list.commitList = CommitList;
38 38
39 setTimeout(done); 39 setTimeout(done);
40 }); 40 });
41 41
42 it('should show no commits by default', function() { 42 it('should show no commits by default', function() {
43 var commits = list.shadowRoot.querySelectorAll('ct-commit'); 43 var commits = list.shadowRoot.querySelectorAll('ct-commit');
44 assert.lengthOf(commits, 0); 44 assert.lengthOf(commits, 0);
45 }); 45 });
46 46
47 describe('expanded test', function() { 47 describe('expanded test', function() {
48 beforeEach(function(done) { 48 beforeEach(function(done) {
49 list.commitList.repositories().first().expanded = true; 49 list.commitList.repositories().first().expanded = true;
50 list.commitList.repositories().last().expanded = true; 50 list.commitList.repositories().last().expanded = true;
51 setTimeout(done); 51 setTimeout(done);
52 }); 52 });
53 53
54 it('should show commits when expanded', function() { 54 it('should show commits when expanded', function() {
55 assert.lengthOf(list.shadowRoot.querySelectorAll('ct-commit'), 4); 55 assert.lengthOf(list.shadowRoot.querySelectorAll('ct-commit'), 4);
56 }); 56 });
57 }); 57 });
58 }); 58 });
59 }); 59 });
60 60
61 })() 61 })()
62 </script> 62 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/karma.conf.js ('k') | Tools/GardeningServer/ui/test/ct-results-panel-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698