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-results-panel.html"> | 7 <link rel="import" href="../ct-results-panel.html"> |
8 | 8 |
9 <link rel="import" href="../../model/ct-failure.html"> | 9 <link rel="import" href="../../model/ct-failure.html"> |
10 | 10 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 177164, 177165 | 90 177164, 177165 |
91 ), | 91 ), |
92 ]; | 92 ]; |
93 | 93 |
94 describe('ct-results-panel', function() { | 94 describe('ct-results-panel', function() { |
95 var panel; | 95 var panel; |
96 var failures; | 96 var failures; |
97 | 97 |
98 beforeEach(function(done) { | 98 beforeEach(function(done) { |
99 panel = document.createElement('ct-results-panel'); | 99 panel = document.createElement('ct-results-panel'); |
| 100 panel.hidden = true; |
| 101 document.body.appendChild(panel); |
| 102 |
100 if (failures) | 103 if (failures) |
101 panel.failures = failures; | 104 panel.failures = failures; |
102 | 105 |
103 setTimeout(done); | 106 setTimeout(done); |
104 }); | 107 }); |
105 | 108 |
| 109 afterEach(function() { |
| 110 document.body.removeChild(panel); |
| 111 }); |
| 112 |
106 describe('empty', function() { | 113 describe('empty', function() { |
107 before(function() { | 114 before(function() { |
108 failures = undefined; | 115 failures = undefined; |
109 }); | 116 }); |
110 | 117 |
111 it('should show no results', function() { | 118 it('should show no results', function() { |
112 var message = panel.shadowRoot.querySelector('.message'); | 119 var message = panel.shadowRoot.querySelector('.message'); |
113 assert.equal(message.textContent, 'No results to display.'); | 120 assert.equal(message.textContent, 'No results to display.'); |
114 }); | 121 }); |
115 }); | 122 }); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 assert.lengthOf(results, 1); | 173 assert.lengthOf(results, 1); |
167 assert.equal(results[0].failure, failures[0]); | 174 assert.equal(results[0].failure, failures[0]); |
168 | 175 |
169 assert.lengthOf(panel.shadowRoot.querySelectorAll('ct-embedded-flakiness-d
ashboard'), 0); | 176 assert.lengthOf(panel.shadowRoot.querySelectorAll('ct-embedded-flakiness-d
ashboard'), 0); |
170 }); | 177 }); |
171 }); | 178 }); |
172 }); | 179 }); |
173 | 180 |
174 })(); | 181 })(); |
175 </script> | 182 </script> |
OLD | NEW |