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
4 found in the LICENSE file.
7 <link rel="import" href="../ct-step-failure.html">
12 var assert = chai.assert;
14 describe('ct-failure model', function() {
17 failure: new CTStepFailure('browser_tests', 'FooTest.Bar', {}, 123, 123),
18 expectedGroupName: 'FooTest',
19 expectedKey: 'browser_tests::FooTest.Bar',
22 failure: new CTStepFailure('webkit_tests', 'fast/text/foo.html', {}, 123, 123),
23 expectedGroupName: 'fast/text',
24 expectedKey: 'webkit_tests::fast/text/foo.html',
27 failure: new CTStepFailure('compile', undefined, {}, 123, 123),
28 expectedGroupName: undefined,
29 expectedKey: 'compile::undefined',
32 it('group name', function() {
33 tests.forEach(function(test) {
34 assert.equal(test.failure.reasonGroupName(), test.expectedGroupName);
37 it('has key', function() {
38 tests.forEach(function(test) {
39 assert.propertyVal(test.failure, 'key', test.expectedKey);