| 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-search-highlighter. */ | 5 /** @fileoverview Suite of tests for media-router-search-highlighter. */ |
| 6 cr.define('media_router_search_highlighter', function() { | 6 cr.define('media_router_search_highlighter', function() { |
| 7 function registerTests() { | 7 function registerTests() { |
| 8 suite('MediaRouterSearchHighlighter', function() { | 8 suite('MediaRouterSearchHighlighter', function() { |
| 9 /** | 9 /** |
| 10 * Media Router Search Highlighted created before each test. | 10 * Media Router Search Highlighted created before each test. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return PolymerTest.importHtml( | 39 return PolymerTest.importHtml( |
| 40 'chrome://media-router/elements/media_router_search_highlighter/' + | 40 'chrome://media-router/elements/media_router_search_highlighter/' + |
| 41 'media_router_search_highlighter.html'); | 41 'media_router_search_highlighter.html'); |
| 42 }); | 42 }); |
| 43 | 43 |
| 44 // Initialize a media-router-search-highlighter before each test. | 44 // Initialize a media-router-search-highlighter before each test. |
| 45 setup(function(done) { | 45 setup(function(done) { |
| 46 PolymerTest.clearBody(); | 46 PolymerTest.clearBody(); |
| 47 searchHighlighter = | 47 searchHighlighter = |
| 48 document.createElement('media-router-search-highlighter'); | 48 document.createElement('media-router-search-highlighter'); |
| 49 document.body.appendChild(searchHighlighter); |
| 49 | 50 |
| 50 | |
| 51 document.body.appendChild(searchHighlighter); | |
| 52 // Let the search highlighter be created and attached. | 51 // Let the search highlighter be created and attached. |
| 53 setTimeout(done); | 52 setTimeout(done); |
| 54 }); | 53 }); |
| 55 | 54 |
| 56 test('text content correct', function(done) { | 55 test('text content correct', function(done) { |
| 57 var testInputs = []; | 56 var testInputs = []; |
| 58 | 57 |
| 59 // Both null and '' should be acceptable in the arrays for producing no | 58 // Both null and '' should be acceptable in the arrays for producing no |
| 60 // text. | 59 // text. |
| 61 var highlightedOnlyMultiple = { | 60 var highlightedOnlyMultiple = { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 }); | 147 }); |
| 149 done(); | 148 done(); |
| 150 }); | 149 }); |
| 151 }); | 150 }); |
| 152 } | 151 } |
| 153 | 152 |
| 154 return { | 153 return { |
| 155 registerTests: registerTests, | 154 registerTests: registerTests, |
| 156 }; | 155 }; |
| 157 }); | 156 }); |
| OLD | NEW |