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-failure.html"> | 7 <link rel="import" href="../ct-failure.html"> |
8 | 8 |
9 <script> | 9 <script> |
10 (function () { | 10 (function () { |
11 | 11 |
12 var assert = chai.assert; | 12 var assert = chai.assert; |
13 | 13 |
14 describe('ct-failure model', function() { | 14 describe('ct-failure model', function() { |
15 var tests = [ | 15 var tests = [ |
16 { | 16 { |
17 failure: new CTFailure('browser_tests', 'FooTest.Bar', {}, 123, 123), | 17 failure: new CTFailure('browser_tests', 'FooTest.Bar', {}, 123, 123), |
18 expectedGroupName: 'FooTest' | 18 expectedGroupName: 'FooTest', |
| 19 expectedFingerprint: 'browser_tests::FooTest.Bar', |
19 }, | 20 }, |
20 { | 21 { |
21 failure: new CTFailure('webkit_tests', 'fast/text/foo.html', {}, 123, 123)
, | 22 failure: new CTFailure('webkit_tests', 'fast/text/foo.html', {}, 123, 123)
, |
22 expectedGroupName: 'fast/text' | 23 expectedGroupName: 'fast/text', |
| 24 expectedFingerprint: 'webkit_tests::fast/text/foo.html', |
23 }, | 25 }, |
24 { | 26 { |
25 failure: new CTFailure('compile', undefined, {}, 123, 123), | 27 failure: new CTFailure('compile', undefined, {}, 123, 123), |
26 expectedGroupName: undefined | 28 expectedGroupName: undefined, |
| 29 expectedFingerprint: 'compile::undefined', |
27 } | 30 } |
28 ]; | 31 ]; |
29 it('group name', function() { | 32 it('group name', function() { |
30 tests.forEach(function(test) { | 33 tests.forEach(function(test) { |
31 assert.equal(test.failure.reasonGroupName(), test.expectedGroupName); | 34 assert.equal(test.failure.reasonGroupName(), test.expectedGroupName); |
32 }); | 35 }); |
33 }); | 36 }); |
| 37 it('has fingerprint', function() { |
| 38 tests.forEach(function(test) { |
| 39 assert.propertyVal(test.failure, 'fingerprint', test.expectedFingerprint); |
| 40 }); |
| 41 }); |
34 }); | 42 }); |
35 | 43 |
36 })(); | 44 })(); |
37 </script> | 45 </script> |
OLD | NEW |