| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 Runs the Media Router Polymer elements tests. */ | 5 /** @fileoverview Runs the Media Router Polymer elements tests. */ |
| 6 | 6 |
| 7 /** @const {string} Path to source root. */ | 7 /** @const {string} Path to source root. */ |
| 8 var ROOT_PATH = '../../../../../'; | 8 var ROOT_PATH = '../../../../../'; |
| 9 | 9 |
| 10 // Polymer BrowserTest fixture. | 10 // Polymer BrowserTest fixture. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 MediaRouterElementsBrowserTest.prototype = { | 21 MediaRouterElementsBrowserTest.prototype = { |
| 22 __proto__: PolymerTest.prototype, | 22 __proto__: PolymerTest.prototype, |
| 23 | 23 |
| 24 /** @override */ | 24 /** @override */ |
| 25 browsePreload: 'chrome://media-router/', | 25 browsePreload: 'chrome://media-router/', |
| 26 | 26 |
| 27 commandLineSwitches: [{ | 27 commandLineSwitches: [{ |
| 28 switchName: 'media-router', switchValue: '1' | 28 switchName: 'media-router', switchValue: '1' |
| 29 }], | 29 }], |
| 30 | 30 |
| 31 // List tests for individual elements. | 31 // List tests for individual elements. The media_router_container tests are |
| 32 // split between media_router_container_tests.js and |
| 33 // media_router_container_filter_tests.js. |
| 32 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 34 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
| 33 'issue_banner_tests.js', | 35 'issue_banner_tests.js', |
| 34 'media_router_container_tests.js', | 36 'media_router_container_tests.js', |
| 37 'media_router_container_filter_tests.js', |
| 35 'media_router_header_tests.js', | 38 'media_router_header_tests.js', |
| 36 'media_router_search_highlighter.js', | 39 'media_router_search_highlighter.js', |
| 37 'route_details_tests.js', | 40 'route_details_tests.js', |
| 38 ]), | 41 ]), |
| 39 }; | 42 }; |
| 40 | 43 |
| 41 // Runs all tests. | 44 TEST_F('MediaRouterElementsBrowserTest', 'MediaRouterElementsTestIssueBanner', |
| 42 // TODO(crbug.com/590177, crbug.com/582649): This test is disabled, as it | |
| 43 // consistently fails on Linux Tests, and is flaky on Win7 and other bots. | |
| 44 TEST_F('MediaRouterElementsBrowserTest', 'DISABLED_MediaRouterElementsTest', | |
| 45 function() { | 45 function() { |
| 46 // Register mocha tests for each element. | 46 // Register mocha tests for the issue banner. |
| 47 issue_banner.registerTests(); | 47 issue_banner.registerTests(); |
| 48 |
| 49 // Run all registered tests. |
| 50 mocha.run(); |
| 51 }); |
| 52 |
| 53 TEST_F('MediaRouterElementsBrowserTest', |
| 54 'MediaRouterElementsTestMediaRouterContainer', |
| 55 function() { |
| 56 // Register mocha tests for the container. |
| 48 media_router_container.registerTests(); | 57 media_router_container.registerTests(); |
| 58 |
| 59 // Run all registered tests. |
| 60 mocha.run(); |
| 61 }); |
| 62 |
| 63 TEST_F('MediaRouterElementsBrowserTest', |
| 64 'MediaRouterElementsTestMediaRouterContainerFilter', |
| 65 function() { |
| 66 // Register mocha tests for the container filter. |
| 67 media_router_container_filter.registerTests(); |
| 68 |
| 69 // Run all registered tests. |
| 70 mocha.run(); |
| 71 }); |
| 72 |
| 73 TEST_F('MediaRouterElementsBrowserTest', |
| 74 'MediaRouterElementsTestMediaRouterHeader', |
| 75 function() { |
| 76 // Register mocha tests for the header. |
| 49 media_router_header.registerTests(); | 77 media_router_header.registerTests(); |
| 78 |
| 79 // Run all registered tests. |
| 80 mocha.run(); |
| 81 }); |
| 82 |
| 83 TEST_F('MediaRouterElementsBrowserTest', |
| 84 'MediaRouterElementsTestMediaRouterSearchHighlighter', |
| 85 function() { |
| 86 // Register mocha tests for the search highlighter. |
| 50 media_router_search_highlighter.registerTests(); | 87 media_router_search_highlighter.registerTests(); |
| 88 |
| 89 // Run all registered tests. |
| 90 mocha.run(); |
| 91 }); |
| 92 |
| 93 TEST_F('MediaRouterElementsBrowserTest', |
| 94 'MediaRouterElementsTestMediaRouterRouteDetails', |
| 95 function() { |
| 96 // Register mocha tests for the route details. |
| 51 route_details.registerTests(); | 97 route_details.registerTests(); |
| 52 | 98 |
| 53 // Run all registered tests. | 99 // Run all registered tests. |
| 54 mocha.run(); | 100 mocha.run(); |
| 55 }); | 101 }); |
| OLD | NEW |