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

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

Issue 2142613002: [Media Router WebUI] Move replace route responsibility to extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename event name in route_details_tests.js Created 4 years, 4 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
« no previous file with comments | « chrome/browser/resources/media_router/media_router_ui_interface.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Suite of tests for route-details. */ 5 /** @fileoverview Suite of tests for route-details. */
6 cr.define('route_details', function() { 6 cr.define('route_details', function() {
7 function registerTests() { 7 function registerTests() {
8 suite('RouteDetails', function() { 8 suite('RouteDetails', function() {
9 /** 9 /**
10 * Route Details created before each test. 10 * Route Details created before each test.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 details.addEventListener('join-route-click', function() { done(); }); 150 details.addEventListener('join-route-click', function() { done(); });
151 details.route = fakeRouteTwo; 151 details.route = fakeRouteTwo;
152 MockInteractions.tap(details.$['start-casting-to-route-button']); 152 MockInteractions.tap(details.$['start-casting-to-route-button']);
153 }); 153 });
154 154
155 // Tests for 'replace-route-click' event firing when the 155 // Tests for 'replace-route-click' event firing when the
156 // 'start-casting-to-route-button' button is clicked when the current 156 // 'start-casting-to-route-button' button is clicked when the current
157 // route is not joinable. 157 // route is not joinable.
158 test('start casting button click replaces route', function(done) { 158 test('start casting button click replaces route', function(done) {
159 details.addEventListener( 159 details.addEventListener(
160 'replace-route-click', function() { done(); }); 160 'change-route-source-click', function() { done(); });
161 details.route = fakeRouteOne; 161 details.route = fakeRouteOne;
162 details.availableCastModes = 1; 162 details.availableCastModes = 1;
163 MockInteractions.tap(details.$['start-casting-to-route-button']); 163 MockInteractions.tap(details.$['start-casting-to-route-button']);
164 }); 164 });
165 165
166 // Tests the initial expected text. 166 // Tests the initial expected text.
167 test('initial text setting', function() { 167 test('initial text setting', function() {
168 // <paper-button> text is styled as upper case. 168 // <paper-button> text is styled as upper case.
169 checkSpanText(loadTimeData.getString('stopCastingButtonText') 169 checkSpanText(loadTimeData.getString('stopCastingButtonText')
170 .toUpperCase(), 'close-route-button'); 170 .toUpperCase(), 'close-route-button');
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 done(); 229 done();
230 }); 230 });
231 }); 231 });
232 }); 232 });
233 } 233 }
234 234
235 return { 235 return {
236 registerTests: registerTests, 236 registerTests: registerTests,
237 }; 237 };
238 }); 238 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/media_router/media_router_ui_interface.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698