Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: Tools/GardeningServer/model/test/ct-step-failure-tests.html

Issue 638333002: Take two at fixing duplicate alert failures. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Tools/GardeningServer/model/test/ct-failures-tests.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-step-failure.html"> 7 <link rel="import" href="../ct-step-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('CTStepFailure', function() {
15 var tests = [ 15 var tests = [
16 { 16 {
17 failure: new CTStepFailure('browser_tests', 'FooTest.Bar', {}, 123, 123), 17 failure: new CTStepFailure('browser_tests', 'FooTest.Bar', {}, 123, 123),
18 expectedGroupName: 'FooTest', 18 expectedGroupName: 'FooTest',
19 expectedKey: 'browser_tests::FooTest.Bar', 19 expectedKey: 'browser_tests::FooTest.Bar',
20 }, 20 },
21 { 21 {
22 failure: new CTStepFailure('webkit_tests', 'fast/text/foo.html', {}, 123, 123), 22 failure: new CTStepFailure('webkit_tests', 'fast/text/foo.html', {}, 123, 123),
23 expectedGroupName: 'fast/text', 23 expectedGroupName: 'fast/text',
24 expectedKey: 'webkit_tests::fast/text/foo.html', 24 expectedKey: 'webkit_tests::fast/text/foo.html',
25 }, 25 },
26 { 26 {
27 failure: new CTStepFailure('compile', undefined, {}, 123, 123), 27 failure: new CTStepFailure('compile', undefined, {builder1: {}}, 123, 123) ,
28 expectedGroupName: undefined, 28 expectedGroupName: undefined,
29 expectedKey: 'compile::undefined', 29 expectedKey: 'compile::builder1',
30 } 30 }
31 ]; 31 ];
32 32
33 it('group name', function() { 33 it('group name', function() {
34 tests.forEach(function(test) { 34 tests.forEach(function(test) {
35 assert.equal(test.failure.reasonGroupName(), test.expectedGroupName); 35 assert.equal(test.failure.reasonGroupName(), test.expectedGroupName);
36 }); 36 });
37 }); 37 });
38 38
39 it('has key', function() { 39 it('has key', function() {
40 tests.forEach(function(test) { 40 tests.forEach(function(test) {
41 assert.propertyVal(test.failure, 'key', test.expectedKey); 41 assert.propertyVal(test.failure, 'key', test.expectedKey);
42 }); 42 });
43 }); 43 });
44 44
45 it('no tree closers', function() { 45 it('no tree closers', function() {
46 var failure = new CTStepFailure('browser_tests', 'FooTest.Bar', {}, 123, 123 ); 46 var failure = new CTStepFailure('browser_tests', 'FooTest.Bar', {}, 123, 123 );
47 assert.notOk(failure.isTreeCloser()); 47 assert.notOk(failure.isTreeCloser());
48 }); 48 });
49 49
50 it('tree closer', function() { 50 it('tree closer', function() {
51 var failure = new CTStepFailure('browser_tests', 'FooTest.Bar', {'builder': {isTreeCloser: true}}, 123, 123); 51 var failure = new CTStepFailure('browser_tests', 'FooTest.Bar', {'builder': {isTreeCloser: true}}, 123, 123);
52 assert.ok(failure.isTreeCloser()); 52 assert.ok(failure.isTreeCloser());
53 }); 53 });
54 54
55 }); 55 });
56 56
57 })(); 57 })();
58 </script> 58 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/model/test/ct-failures-tests.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698