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-failures.html"> | 7 <link rel="import" href="../ct-failures.html"> |
8 | 8 |
9 <link rel="import" href="../../lib/network-simulator.html"> | 9 <link rel="import" href="../../lib/network-simulator.html"> |
10 <link rel="import" href="../ct-commit-list.html"> | 10 <link rel="import" href="../ct-commit-list.html"> |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 assert.propertyVal(repositoryCommitList, 'expanded', true); | 342 assert.propertyVal(repositoryCommitList, 'expanded', true); |
343 }); | 343 }); |
344 }); | 344 }); |
345 }); | 345 }); |
346 }); | 346 }); |
347 }); | 347 }); |
348 | 348 |
349 describe('processTrooperFailures', function() { | 349 describe('processTrooperFailures', function() { |
350 it('should filter out updates that are not alerts', function() { | 350 it('should filter out updates that are not alerts', function() { |
351 var analyzer = new CTFailures(new CTCommitList(undefined, [])); | 351 var analyzer = new CTFailures(new CTCommitList(undefined, [])); |
| 352 analyzer.failures = {}; |
352 analyzer._processTrooperFailures( | 353 analyzer._processTrooperFailures( |
353 {'key_1': {'tree_1': {should_alert: true, should_appear: true}, | 354 {'key_1': {'tree_1': {should_alert: true, should_appear: true}, |
354 'tree_2': {should_alert: false, should_appear: false}}, | 355 'tree_2': {should_alert: false, should_appear: false}}, |
355 'key_2': {'tree_3': {should_alert: false, should_appear: false}, | 356 'key_2': {'tree_3': {should_alert: false, should_appear: false}, |
356 'tree_4': {should_alert: true, should_appear: true}}}); | 357 'tree_4': {should_alert: true, should_appear: true}}}); |
357 analyzer.failures['trooper'].forEach(function(failure) { | 358 analyzer.failures['trooper'].forEach(function(failure) { |
358 assert(failure.data.data.should_appear); | 359 assert(failure.data.data.should_appear); |
359 }); | 360 }); |
360 assert(analyzer.failures['trooper'].length == 2); | 361 assert(analyzer.failures['trooper'].length == 2); |
361 }); | 362 }); |
362 }); | 363 }); |
363 | 364 |
364 }); | 365 }); |
365 | 366 |
366 })() | 367 })() |
367 </script> | 368 </script> |
OLD | NEW |