Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Tools / GardeningServer / model / test / ct-step-failure-tests.html
1 <!--
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.
5 -->
6
7 <link rel="import" href="../ct-step-failure.html">
8
9 <script>
10 (function () {
11
12 var assert = chai.assert;
13
14 describe('ct-failure model', function() {
15   var tests = [
16     {
17       failure: new CTStepFailure('browser_tests', 'FooTest.Bar', {}, 123, 123),
18       expectedGroupName: 'FooTest',
19       expectedKey: 'browser_tests::FooTest.Bar',
20     },
21     {
22       failure: new CTStepFailure('webkit_tests', 'fast/text/foo.html', {}, 123, 123),
23       expectedGroupName: 'fast/text',
24       expectedKey: 'webkit_tests::fast/text/foo.html',
25     },
26     {
27       failure: new CTStepFailure('compile', undefined, {}, 123, 123),
28       expectedGroupName: undefined,
29       expectedKey: 'compile::undefined',
30     }
31   ];
32   it('group name', function() {
33     tests.forEach(function(test) {
34       assert.equal(test.failure.reasonGroupName(), test.expectedGroupName);
35     });
36   });
37   it('has key', function() {
38     tests.forEach(function(test) {
39       assert.propertyVal(test.failure, 'key', test.expectedKey);
40     });
41   });
42 });
43
44 })();
45 </script>