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

Side by Side Diff: Tools/GardeningServer/model/test/ct-failures-tests.html

Issue 476903004: [sheriff-o-matic]: Basic trooper display for sheriff-o-matic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
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-failures.html"> 7 <link rel="import" href="../ct-failures.html">
8 8
9 <script> 9 <script>
10 (function () { 10 (function () {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 assert(analyzer._failureByTreeListComparator('chromium', group1, group2) > 0); 53 assert(analyzer._failureByTreeListComparator('chromium', group1, group2) > 0);
54 assert(analyzer._failureByTreeListComparator('blink', group1, group2) < 0) ; 54 assert(analyzer._failureByTreeListComparator('blink', group1, group2) < 0) ;
55 55
56 // Default to 'chromium'. 56 // Default to 'chromium'.
57 assert(analyzer._failureByTreeListComparator(undefined, group1, group2) > 0); 57 assert(analyzer._failureByTreeListComparator(undefined, group1, group2) > 0);
58 58
59 // Failures without a revision go to the end. 59 // Failures without a revision go to the end.
60 assert(analyzer._failureByTreeListComparator('chromium', group4, group1) > 0); 60 assert(analyzer._failureByTreeListComparator('chromium', group4, group1) > 0);
61 }); 61 });
62 }); 62 });
63
64 describe('processTrooperFailures', function() {
65 it('should filter out updates that are not alerts', function() {
66 var analyzer = new CTFailures(new CTCommitList(undefined, []));
67 analyzer._processTrooperFailures(
68 {'key_1': {'tree_1': {should_alert: true, should_appear: true},
69 'tree_2': {should_alert: false, should_appear: false}},
70 'key_2': {'tree_3': {should_alert: false, should_appear: false},
71 'tree_4': {should_alert: true, should_appear: true}}});
72 analyzer.failures['trooper'].forEach(function(failure) {
73 assert(failure.data.should_appear);
74 });
75 assert(analyzer.failures['trooper'].length == 2);
76 });
77 });
78
63 }); 79 });
64 80
65 })() 81 })()
66 </script> 82 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698