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

Unified Diff: chrome/test/data/webui/media_router/route_details_tests.js

Issue 2002293003: [Media Router] Allow casting new media to sink with existing route. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/media_router/route_details_tests.js
diff --git a/chrome/test/data/webui/media_router/route_details_tests.js b/chrome/test/data/webui/media_router/route_details_tests.js
index 2d8d0741f9dd6ba16169181b6ef33dccbfaac771..49c03fa9b4a2d3c57ced3b23140afd10b830b059 100644
--- a/chrome/test/data/webui/media_router/route_details_tests.js
+++ b/chrome/test/data/webui/media_router/route_details_tests.js
@@ -95,10 +95,22 @@ cr.define('route_details', function() {
});
// Tests for 'start-casting-to-route-click' event firing when the
- // 'start-casting-to-route-button' button is clicked.
+ // 'start-casting-to-route-button' button is clicked when the current
+ // route is joinable.
test('start casting to route button click', function(done) {
details.addEventListener(
'start-casting-to-route-click', function() { done(); });
+ details.route = fakeRouteTwo;
+ MockInteractions.tap(details.$['start-casting-to-route-button']);
+ });
+
+ // Tests for 'cast-new-media-click' event firing when the
+ // 'start-casting-to-route-button' button is clicked when the current
+ // route is not joinable.
+ test('start casting button click starts new media', function(done) {
+ details.addEventListener(
+ 'cast-new-media-click', function() { done(); });
+ details.route = fakeRouteOne;
MockInteractions.tap(details.$['start-casting-to-route-button']);
});
@@ -125,7 +137,7 @@ cr.define('route_details', function() {
checkSpanText(loadTimeData.getStringF('castingActivityStatus',
fakeRouteOne.description), 'route-information');
checkDefaultViewIsShown();
- checkStartCastButtonIsNotShown();
+ checkStartCastButtonIsShown();
// Set |route| to a different route.
details.route = fakeRouteTwo;

Powered by Google App Engine
This is Rietveld 408576698