| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** @fileoverview Suite of tests for media-router-container that focus on | 5 /** @fileoverview Suite of tests for media-router-container that focus on |
| 6 * the MRPM search feature. | 6 * the MRPM search feature. |
| 7 */ | 7 */ |
| 8 cr.define('media_router_container_search', function() { | 8 cr.define('media_router_container_search', function() { |
| 9 function registerTests() { | 9 function registerTests() { |
| 10 suite('MediaRouterContainerSearch', function() { | 10 suite('MediaRouterContainerSearch', function() { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 'pseudo:test', '', null, 'domain.com', | 148 'pseudo:test', '', null, 'domain.com', |
| 149 media_router.SinkIconType.CAST, undefined, | 149 media_router.SinkIconType.CAST, undefined, |
| 150 test_base.castModeBitset); | 150 test_base.castModeBitset); |
| 151 pseudoSink.isPseudoSink = true; | 151 pseudoSink.isPseudoSink = true; |
| 152 foundSink = new media_router.Sink( | 152 foundSink = new media_router.Sink( |
| 153 'found sink id', 'no existing sink', null, pseudoSink.domain, | 153 'found sink id', 'no existing sink', null, pseudoSink.domain, |
| 154 pseudoSink.iconType, undefined, pseudoSink.castModes); | 154 pseudoSink.iconType, undefined, pseudoSink.castModes); |
| 155 fakeSinkListWithPseudoSink = fakeSinkList.concat([pseudoSink]); | 155 fakeSinkListWithPseudoSink = fakeSinkList.concat([pseudoSink]); |
| 156 | 156 |
| 157 container.allSinks = fakeSinkListWithPseudoSink; | 157 container.allSinks = fakeSinkListWithPseudoSink; |
| 158 container.showInitialView(); |
| 158 | 159 |
| 159 // Allow for the media router container to be created, attached, and | 160 // Allow for the media router container to be created, attached, and |
| 160 // listeners registered in an afterNextRender() call. | 161 // listeners registered in an afterNextRender() call. |
| 161 Polymer.RenderStatus.afterNextRender(this, done); | 162 Polymer.RenderStatus.afterNextRender(this, done); |
| 162 }); | 163 }); |
| 163 | 164 |
| 164 test('pseudo sink hidden without filter input', function(done) { | 165 test('pseudo sink hidden without filter input', function(done) { |
| 165 setTimeout(function() { | 166 setTimeout(function() { |
| 166 var sinkList = | 167 var sinkList = |
| 167 container.$$('#sink-list').querySelectorAll('paper-item'); | 168 container.$$('#sink-list').querySelectorAll('paper-item'); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 searchState.checkForRealSink(fakeSinkList.concat([foundSink]))); | 448 searchState.checkForRealSink(fakeSinkList.concat([foundSink]))); |
| 448 assertEquals(foundSink.id, searchState.checkForRealSink(fakeSinkList)); | 449 assertEquals(foundSink.id, searchState.checkForRealSink(fakeSinkList)); |
| 449 }); | 450 }); |
| 450 }); | 451 }); |
| 451 } | 452 } |
| 452 | 453 |
| 453 return { | 454 return { |
| 454 registerTests: registerTests, | 455 registerTests: registerTests, |
| 455 }; | 456 }; |
| 456 }); | 457 }); |
| OLD | NEW |