Chromium Code Reviews| 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-unexpected-failures.html'> | 7 <link rel='import' href='../ct-unexpected-failures.html'> |
| 8 | 8 |
| 9 <link rel="import" href="../../model/ct-commit-list.html"> | 9 <link rel="import" href="../../model/ct-commit-list.html"> |
| 10 <link rel="import" href="../../model/ct-failures.html"> | 10 <link rel="import" href="../../model/ct-failures.html"> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 mocktree: [new CTStepFailure('step', 'reason', [])] | 58 mocktree: [new CTStepFailure('step', 'reason', [])] |
| 59 }; | 59 }; |
| 60 hasFailures.tree = 'mocktree'; | 60 hasFailures.tree = 'mocktree'; |
| 61 | 61 |
| 62 setTimeout(function() { | 62 setTimeout(function() { |
| 63 assert.notOk(hasFailures.shadowRoot.querySelector('ct-party-time')); | 63 assert.notOk(hasFailures.shadowRoot.querySelector('ct-party-time')); |
| 64 | 64 |
| 65 done(); | 65 done(); |
| 66 }); | 66 }); |
| 67 }); | 67 }); |
| 68 | |
| 69 it('test showing only chromium tree status when chromium', function(done) { | |
| 70 var hasFailures = document.createElement('ct-unexpected-failures'); | |
| 71 hasFailures.failures = new CTFailures(new CTCommitList(undefined, [])); | |
|
ojan
2014/10/09 01:58:57
Why do we need the failures at all, including the
fgorski
2014/10/10 20:14:59
Good point, failures are only impacting visibility
| |
| 72 hasFailures.failures.failures = { | |
| 73 chromium: [new CTStepFailure('step', 'reason', [])], | |
| 74 blink: [new CTStepFailure('step', 'reason', [])] | |
| 75 }; | |
| 76 hasFailures.tree = 'chromium'; | |
| 77 | |
| 78 setTimeout(function() { | |
| 79 assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').len gth, 1); | |
| 80 | |
| 81 done(); | |
| 82 }); | |
| 83 }); | |
| 84 | |
| 85 it('test showing both chromium and blink tree status when blink (both fail)', function(done) { | |
| 86 var hasFailures = document.createElement('ct-unexpected-failures'); | |
| 87 hasFailures.failures = new CTFailures(new CTCommitList(undefined, [])); | |
| 88 hasFailures.failures.failures = { | |
| 89 chromium: [new CTStepFailure('step', 'reason', [])], | |
| 90 blink: [new CTStepFailure('step', 'reason', [])] | |
| 91 }; | |
| 92 hasFailures.tree = 'blink'; | |
| 93 | |
| 94 setTimeout(function() { | |
| 95 assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').len gth, 2); | |
| 96 | |
| 97 done(); | |
| 98 }); | |
| 99 }); | |
| 100 | |
| 101 it('test showing both chromium and blink tree status when blink (blink fails)' , function(done) { | |
| 102 var hasFailures = document.createElement('ct-unexpected-failures'); | |
| 103 hasFailures.failures = new CTFailures(new CTCommitList(undefined, [])); | |
| 104 hasFailures.failures.failures = { | |
| 105 blink: [new CTStepFailure('step', 'reason', [])] | |
| 106 }; | |
| 107 hasFailures.tree = 'blink'; | |
| 108 | |
| 109 setTimeout(function() { | |
| 110 assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').len gth, 2); | |
| 111 | |
| 112 done(); | |
| 113 }); | |
| 114 }); | |
| 115 | |
| 116 it('test showing both chromium and blink tree status when blink (chromium fail s)', function(done) { | |
| 117 var hasFailures = document.createElement('ct-unexpected-failures'); | |
| 118 hasFailures.failures = new CTFailures(new CTCommitList(undefined, [])); | |
| 119 hasFailures.failures.failures = { | |
| 120 chromium: [new CTStepFailure('step', 'reason', [])] | |
| 121 }; | |
| 122 hasFailures.tree = 'blink'; | |
| 123 | |
| 124 setTimeout(function() { | |
| 125 assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').len gth, 2); | |
| 126 | |
| 127 done(); | |
| 128 }); | |
| 129 }); | |
| 130 | |
| 68 }); | 131 }); |
| 69 | 132 |
| 70 })(); | 133 })(); |
| 71 </script> | 134 </script> |
| OLD | NEW |