| 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 16 matching lines...) Expand all Loading... |
| 27 /** @override */ | 27 /** @override */ |
| 28 runAccessibilityChecks: true, | 28 runAccessibilityChecks: true, |
| 29 | 29 |
| 30 /** @override */ | 30 /** @override */ |
| 31 accessibilityIssuesAreErrors: true, | 31 accessibilityIssuesAreErrors: true, |
| 32 | 32 |
| 33 commandLineSwitches: [{ | 33 commandLineSwitches: [{ |
| 34 switchName: 'media-router', switchValue: '1' | 34 switchName: 'media-router', switchValue: '1' |
| 35 }], | 35 }], |
| 36 | 36 |
| 37 // List tests for individual elements. The media_router_container tests are | 37 // List tests for individual elements. The media-router-container tests are |
| 38 // split between media_router_container_tests.js and | 38 // split between several files and use common functionality from |
| 39 // media_router_container_filter_tests.js. | 39 // media_router_container_test_base.js. |
| 40 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ | 40 extraLibraries: PolymerTest.getLibraries(ROOT_PATH).concat([ |
| 41 'issue_banner_tests.js', | 41 'issue_banner_tests.js', |
| 42 'media_router_container_tests.js', | 42 'media_router_container_cast_mode_list_tests.js', |
| 43 'media_router_container_filter_tests.js', | 43 'media_router_container_filter_tests.js', |
| 44 'media_router_container_first_run_flow_tests.js', |
| 45 'media_router_container_route_tests.js', |
| 46 'media_router_container_sink_list_tests.js', |
| 47 'media_router_container_test_base.js', |
| 44 'media_router_header_tests.js', | 48 'media_router_header_tests.js', |
| 45 'media_router_search_highlighter.js', | 49 'media_router_search_highlighter_tests.js', |
| 46 'route_details_tests.js', | 50 'route_details_tests.js', |
| 47 ]), | 51 ]), |
| 48 | 52 |
| 49 /** @override */ | 53 /** @override */ |
| 50 setUp: function() { | 54 setUp: function() { |
| 51 PolymerTest.prototype.setUp.call(this); | 55 PolymerTest.prototype.setUp.call(this); |
| 52 | 56 |
| 53 // Enable when failure is resolved. | 57 // Enable when failure is resolved. |
| 54 // AX_ARIA_02: http://crbug.com/591547 | 58 // AX_ARIA_02: http://crbug.com/591547 |
| 55 this.accessibilityAuditConfig.ignoreSelectors( | 59 this.accessibilityAuditConfig.ignoreSelectors( |
| (...skipping 19 matching lines...) Expand all Loading... |
| 75 this.accessibilityAuditConfig.ignoreSelectors( | 79 this.accessibilityAuditConfig.ignoreSelectors( |
| 76 'focusableElementNotVisibleAndNotAriaHidden', '#device-missing > A'); | 80 'focusableElementNotVisibleAndNotAriaHidden', '#device-missing > A'); |
| 77 | 81 |
| 78 // Enable when warning is resolved. | 82 // Enable when warning is resolved. |
| 79 // AX_TEXT_04: http://crbug.com/591554 | 83 // AX_TEXT_04: http://crbug.com/591554 |
| 80 this.accessibilityAuditConfig.ignoreSelectors( | 84 this.accessibilityAuditConfig.ignoreSelectors( |
| 81 'linkWithUnclearPurpose', '#device-missing > A'); | 85 'linkWithUnclearPurpose', '#device-missing > A'); |
| 82 }, | 86 }, |
| 83 }; | 87 }; |
| 84 | 88 |
| 85 TEST_F('MediaRouterElementsBrowserTest', 'MediaRouterElementsTestIssueBanner', | 89 TEST_F('MediaRouterElementsBrowserTest', 'IssueBanner', function() { |
| 86 function() { | |
| 87 // Register mocha tests for the issue banner. | |
| 88 issue_banner.registerTests(); | 90 issue_banner.registerTests(); |
| 89 | |
| 90 // Run all registered tests. | |
| 91 mocha.run(); | 91 mocha.run(); |
| 92 }); | 92 }); |
| 93 | 93 |
| 94 // See bugs.chromium.org issue 591227 | 94 // The media-router-container tests are being split into multiple parts due to |
| 95 // timeout issues on bots. |
| 95 TEST_F('MediaRouterElementsBrowserTest', | 96 TEST_F('MediaRouterElementsBrowserTest', |
| 96 'DISABLED_MediaRouterElementsTestMediaRouterContainer', | 97 'MediaRouterContainerCastModeList', |
| 97 function() { | 98 function() { |
| 98 // Register mocha tests for the container. | 99 media_router_container_cast_mode_list.registerTests(); |
| 99 media_router_container.registerTests(); | |
| 100 | |
| 101 // Run all registered tests. | |
| 102 mocha.run(); | 100 mocha.run(); |
| 103 }); | 101 }); |
| 104 | 102 |
| 105 TEST_F('MediaRouterElementsBrowserTest', | 103 TEST_F('MediaRouterElementsBrowserTest', |
| 106 'MediaRouterElementsTestMediaRouterContainerFilter', | 104 'MediaRouterContainerFirstRunFlow', |
| 107 function() { | 105 function() { |
| 108 // Register mocha tests for the container filter. | 106 media_router_container_first_run_flow.registerTests(); |
| 109 media_router_container_filter.registerTests(); | |
| 110 | |
| 111 // Run all registered tests. | |
| 112 mocha.run(); | 107 mocha.run(); |
| 113 }); | 108 }); |
| 114 | 109 |
| 115 TEST_F('MediaRouterElementsBrowserTest', | 110 TEST_F('MediaRouterElementsBrowserTest', |
| 116 'MediaRouterElementsTestMediaRouterHeader', | 111 'MediaRouterContainerRoute', |
| 117 function() { | 112 function() { |
| 118 // Register mocha tests for the header. | 113 media_router_container_route.registerTests(); |
| 119 media_router_header.registerTests(); | |
| 120 | |
| 121 // Run all registered tests. | |
| 122 mocha.run(); | 114 mocha.run(); |
| 123 }); | 115 }); |
| 124 | 116 |
| 125 TEST_F('MediaRouterElementsBrowserTest', | 117 TEST_F('MediaRouterElementsBrowserTest', |
| 126 'MediaRouterElementsTestMediaRouterSearchHighlighter', | 118 'MediaRouterContainerSinkList', |
| 127 function() { | 119 function() { |
| 128 // Register mocha tests for the search highlighter. | 120 media_router_container_sink_list.registerTests(); |
| 129 media_router_search_highlighter.registerTests(); | |
| 130 | |
| 131 // Run all registered tests. | |
| 132 mocha.run(); | 121 mocha.run(); |
| 133 }); | 122 }); |
| 134 | 123 |
| 135 TEST_F('MediaRouterElementsBrowserTest', | 124 TEST_F('MediaRouterElementsBrowserTest', |
| 136 'MediaRouterElementsTestMediaRouterRouteDetails', | 125 'MediaRouterContainerFilter', |
| 137 function() { | 126 function() { |
| 138 // Register mocha tests for the route details. | 127 media_router_container_filter.registerTests(); |
| 139 route_details.registerTests(); | |
| 140 | |
| 141 // Run all registered tests. | |
| 142 mocha.run(); | 128 mocha.run(); |
| 143 }); | 129 }); |
| 130 |
| 131 TEST_F('MediaRouterElementsBrowserTest', 'MediaRouterHeader', function() { |
| 132 media_router_header.registerTests(); |
| 133 mocha.run(); |
| 134 }); |
| 135 |
| 136 TEST_F('MediaRouterElementsBrowserTest', |
| 137 'MediaRouterSearchHighlighter', |
| 138 function() { |
| 139 media_router_search_highlighter.registerTests(); |
| 140 mocha.run(); |
| 141 }); |
| 142 |
| 143 TEST_F('MediaRouterElementsBrowserTest', 'MediaRouterRouteDetails', function() { |
| 144 route_details.registerTests(); |
| 145 mocha.run(); |
| 146 }); |
| OLD | NEW |