Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: chrome/test/data/webui/media_router/media_router_elements_browsertest.js

Issue 2725503002: [Media Router] Custom Controls 4 - Implement details view WebUI (Closed)
Patch Set: Address Mark's comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 30 matching lines...) Expand all
41 'issue_banner_tests.js', 41 'issue_banner_tests.js',
42 'media_router_container_cast_mode_list_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', 44 'media_router_container_first_run_flow_tests.js',
45 'media_router_container_route_tests.js', 45 'media_router_container_route_tests.js',
46 'media_router_container_search_tests.js', 46 'media_router_container_search_tests.js',
47 'media_router_container_sink_list_tests.js', 47 'media_router_container_sink_list_tests.js',
48 'media_router_container_test_base.js', 48 'media_router_container_test_base.js',
49 'media_router_header_tests.js', 49 'media_router_header_tests.js',
50 'media_router_search_highlighter_tests.js', 50 'media_router_search_highlighter_tests.js',
51 'route_controls_tests.js',
51 'route_details_tests.js', 52 'route_details_tests.js',
52 ]), 53 ]),
53 54
55 /**
56 * Mocks the browser API methods to make them fire events instead.
57 */
58 installMockBrowserApi: function() {
59 cr.define('media_router.browserApi', function() {
60 'use strict';
61
62 function pauseCurrentMedia() {
63 document.dispatchEvent(new Event('mock-pause-current-media'));
64 }
65
66 function playCurrentMedia() {
67 document.dispatchEvent(new Event('mock-play-current-media'));
68 }
69
70 function seekCurrentMedia(time) {
71 var event = new CustomEvent('mock-seek-current-media',
72 {detail: {time: time}})
73 document.dispatchEvent(event);
74 }
75
76 function setCurrentMediaMute(mute) {
77 var event = new CustomEvent('mock-set-current-media-mute',
78 {detail: {mute: mute}});
79 document.dispatchEvent(event);
80 }
81
82 function setCurrentMediaVolume(volume) {
83 var event = new CustomEvent('mock-set-current-media-volume',
84 {detail: {volume: volume}});
85 document.dispatchEvent(event);
86 }
87
88 return {
89 pauseCurrentMedia: pauseCurrentMedia,
90 playCurrentMedia: playCurrentMedia,
91 seekCurrentMedia: seekCurrentMedia,
92 setCurrentMediaMute: setCurrentMediaMute,
93 setCurrentMediaVolume: setCurrentMediaVolume,
94 };
95 });
96 },
97
54 /** @override */ 98 /** @override */
55 setUp: function() { 99 setUp: function() {
56 PolymerTest.prototype.setUp.call(this); 100 PolymerTest.prototype.setUp.call(this);
101 this.installMockBrowserApi();
57 102
58 // Enable when failure is resolved. 103 // Enable when failure is resolved.
59 // AX_ARIA_02: http://crbug.com/591547 104 // AX_ARIA_02: http://crbug.com/591547
60 this.accessibilityAuditConfig.ignoreSelectors( 105 this.accessibilityAuditConfig.ignoreSelectors(
61 'nonExistentAriaRelatedElement', '#input'); 106 'nonExistentAriaRelatedElement', '#input');
62 107
63 // Enable when failure is resolved. 108 // Enable when failure is resolved.
64 // AX_ARIA_04: http://crbug.com/591550 109 // AX_ARIA_04: http://crbug.com/591550
65 this.accessibilityAuditConfig.ignoreSelectors( 110 this.accessibilityAuditConfig.ignoreSelectors(
66 'badAriaAttributeValue', '#input'); 111 'badAriaAttributeValue', '#input');
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 mocha.run(); 172 mocha.run();
128 }); 173 });
129 174
130 TEST_F('MediaRouterElementsBrowserTest', 175 TEST_F('MediaRouterElementsBrowserTest',
131 'MediaRouterSearchHighlighter', 176 'MediaRouterSearchHighlighter',
132 function() { 177 function() {
133 media_router_search_highlighter.registerTests(); 178 media_router_search_highlighter.registerTests();
134 mocha.run(); 179 mocha.run();
135 }); 180 });
136 181
182 TEST_F(
183 'MediaRouterElementsBrowserTest', 'MediaRouterRouteControls', function() {
184 route_controls.registerTests();
185 mocha.run();
186 });
187
137 TEST_F('MediaRouterElementsBrowserTest', 'MediaRouterRouteDetails', function() { 188 TEST_F('MediaRouterElementsBrowserTest', 'MediaRouterRouteDetails', function() {
138 route_details.registerTests(); 189 route_details.registerTests();
139 mocha.run(); 190 mocha.run();
140 }); 191 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698