| <!-- |
| Copyright 2014 The Chromium Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style license that can be |
| found in the LICENSE file. |
| --> |
| |
| <link rel="import" href="../ct-failure.html"> |
| |
| <script> |
| (function () { |
| |
| var assert = chai.assert; |
| |
| describe('ct-failure model', function() { |
| var tests = [ |
| { |
| failure: new CTFailure('browser_tests', 'FooTest.Bar', {}, 123, 123), |
| expectedGroupName: 'FooTest' |
| }, |
| { |
| failure: new CTFailure('webkit_tests', 'fast/text/foo.html', {}, 123, 123), |
| expectedGroupName: 'fast/text' |
| }, |
| { |
| failure: new CTFailure('compile', undefined, {}, 123, 123), |
| expectedGroupName: undefined |
| } |
| ]; |
| it('group name', function() { |
| tests.forEach(function(test) { |
| assert.equal(test.failure.reasonGroupName(), test.expectedGroupName); |
| }); |
| }); |
| }); |
| |
| })(); |
| </script> |