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

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

Issue 1937963003: [Media Router WebUI] Move listeners to afterNextRender(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « chrome/test/data/webui/media_router/media_router_container_cast_mode_list_tests.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/media_router/media_router_container_route_tests.js
diff --git a/chrome/test/data/webui/media_router/media_router_container_route_tests.js b/chrome/test/data/webui/media_router/media_router_container_route_tests.js
index 016246e9f056e3b1993bdf115b6bf2a4260f08d9..a22dbb6fd3a7045befc1f9b809f713f61641f97c 100644
--- a/chrome/test/data/webui/media_router/media_router_container_route_tests.js
+++ b/chrome/test/data/webui/media_router/media_router_container_route_tests.js
@@ -311,31 +311,33 @@ cr.define('media_router_container_route', function() {
});
test('creating route with selected cast mode', function(done) {
- container.allSinks = fakeSinkList;
- MockInteractions.tap(container.$['container-header'].
- $['arrow-drop-icon']);
setTimeout(function() {
- // Select cast mode 2.
- var castModeList =
- container.$$('#cast-mode-list').querySelectorAll('paper-item');
- MockInteractions.tap(castModeList[1]);
- assertEquals(fakeCastModeList[1].description, container.headerText);
+ container.allSinks = fakeSinkList;
+ MockInteractions.tap(container.$['container-header'].
+ $['arrow-drop-icon']);
setTimeout(function() {
- var sinkList =
- container.shadowRoot.getElementById('sink-list')
- .querySelectorAll('paper-item');
- container.addEventListener('create-route', function(data) {
- assertEquals(fakeSinkList[2].id, data.detail.sinkId);
- // Cast mode 2 is used, since we selected it explicitly.
- assertEquals(fakeCastModeList[1].type,
- data.detail.selectedCastModeValue);
- done();
+ // Select cast mode 2.
+ var castModeList =
+ container.$$('#cast-mode-list').querySelectorAll('paper-item');
+ MockInteractions.tap(castModeList[1]);
+ assertEquals(fakeCastModeList[1].description, container.headerText);
+ setTimeout(function() {
+ var sinkList =
+ container.shadowRoot.getElementById('sink-list')
+ .querySelectorAll('paper-item');
+ container.addEventListener('create-route', function(data) {
+ assertEquals(fakeSinkList[2].id, data.detail.sinkId);
+ // Cast mode 2 is used, since we selected it explicitly.
+ assertEquals(fakeCastModeList[1].type,
+ data.detail.selectedCastModeValue);
+ done();
+ });
+ // All sinks are compatible with cast mode 2.
+ assertEquals(fakeSinkList.length, sinkList.length);
+ // Tap on a sink without a route, which should fire a
+ // 'create-route' event.
+ MockInteractions.tap(sinkList[2]);
});
- // All sinks are compatible with cast mode 2.
- assertEquals(fakeSinkList.length, sinkList.length);
- // Tap on a sink without a route, which should fire a 'create-route'
- // event.
- MockInteractions.tap(sinkList[2]);
});
});
});
« no previous file with comments | « chrome/test/data/webui/media_router/media_router_container_cast_mode_list_tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698