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

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

Issue 2062913002: [Media Router] Allow casting new media to sink with existing route. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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/media_router_container_cast_mode_list_tests.js
diff --git a/chrome/test/data/webui/media_router/media_router_container_cast_mode_list_tests.js b/chrome/test/data/webui/media_router/media_router_container_cast_mode_list_tests.js
index 61865a10616394a0edb507558f48602bda7f9472..43b695974823ce343588052f081016836645d57f 100644
--- a/chrome/test/data/webui/media_router/media_router_container_cast_mode_list_tests.js
+++ b/chrome/test/data/webui/media_router/media_router_container_cast_mode_list_tests.js
@@ -401,6 +401,53 @@ cr.define('media_router_container_cast_mode_list', function() {
});
});
});
+
+ // Tests that the 'cast' button is shown in the route details view when
+ // the sink for the current route is compatible with the user-selected
+ // cast mode.
+ test('cast to sink with existing route', function(done) {
+ var newSinks = [
+ new media_router.Sink('sink id 10', 'Sink 10', null, null,
+ media_router.SinkIconType.CAST,
+ media_router.SinkStatus.ACTIVE, 0x2 | 0x4 | 0x8),
+ ];
+
+ container.allSinks = newSinks;
+ container.routeList = [
+ new media_router.Route('id 1', 'sink id 10',
+ 'Title 1', 1, false, false),
+ ];
+
+ setTimeout(function() {
+ var sinkList =
+ container.shadowRoot.getElementById('sink-list')
+ .querySelectorAll('paper-item');
+
+ MockInteractions.tap(container.$['container-header'].
+ $['arrow-drop-icon']);
+ setTimeout(function() {
+ // Cast mode 1 is selected, and the sink list is filtered.
+ var castModeList =
+ container.$$('#cast-mode-list').querySelectorAll('paper-item');
+ MockInteractions.tap(castModeList[1]);
+
+ setTimeout(function() {
+ var sinkList =
+ container.shadowRoot.getElementById('sink-list')
+ .querySelectorAll('paper-item');
+
+ MockInteractions.tap(sinkList[0]);
+ setTimeout(function() {
+ assertFalse(container.shadowRoot.getElementById('route-details')
+ .shadowRoot
+ .getElementById('start-casting-to-route-button')
+ .hasAttribute('hidden'));
+ done();
+ });
+ });
+ });
+ });
+ });
});
}
« no previous file with comments | « chrome/browser/resources/media_router/media_router_data.js ('k') | chrome/test/data/webui/media_router/route_details_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698