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

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

Issue 1415103006: Non-Local Join for Media Router and Presentation API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing ChromeOS System Tray Test Created 4 years, 11 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 Suite of tests for media-router-container. */ 5 /** @fileoverview Suite of tests for media-router-container. */
6 cr.define('media_router_container', function() { 6 cr.define('media_router_container', function() {
7 function registerTests() { 7 function registerTests() {
8 suite('MediaRouterContainer', function() { 8 suite('MediaRouterContainer', function() {
9 /** 9 /**
10 * Media Router Container created before each test. 10 * Media Router Container created before each test.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 new media_router.CastMode(0x4, 'Description 2', null), 119 new media_router.CastMode(0x4, 'Description 2', null),
120 ]; 120 ];
121 121
122 fakeCastModeListWithNonDefaultModesOnly = [ 122 fakeCastModeListWithNonDefaultModesOnly = [
123 new media_router.CastMode(0x2, 'Description 1', null), 123 new media_router.CastMode(0x2, 'Description 1', null),
124 new media_router.CastMode(0x4, 'Description 2', null), 124 new media_router.CastMode(0x4, 'Description 2', null),
125 new media_router.CastMode(0x8, 'Description 3', null), 125 new media_router.CastMode(0x8, 'Description 3', null),
126 ]; 126 ];
127 127
128 fakeRouteList = [ 128 fakeRouteList = [
129 new media_router.Route('id 1', 'sink id 1', 'Title 1', 0, true), 129 new media_router.Route('id 1', 'sink id 1',
130 new media_router.Route('id 2', 'sink id 2', 'Title 2', 1, false), 130 'Title 1', 0, true, false),
131 new media_router.Route('id 2', 'sink id 2',
132 'Title 2', 1, false, true),
131 ]; 133 ];
132 134
133 fakeRouteListWithLocalRoutesOnly = [ 135 fakeRouteListWithLocalRoutesOnly = [
134 new media_router.Route('id 1', 'sink id 1', 'Title 1', 0, true), 136 new media_router.Route('id 1', 'sink id 1',
135 new media_router.Route('id 2', 'sink id 2', 'Title 2', 1, true), 137 'Title 1', 0, true, false),
138 new media_router.Route('id 2', 'sink id 2',
139 'Title 2', 1, true, false),
136 ]; 140 ];
137 141
138 var castModeBitset = 0x2 | 0x4 | 0x8; 142 var castModeBitset = 0x2 | 0x4 | 0x8;
139 fakeSinkList = [ 143 fakeSinkList = [
140 new media_router.Sink('sink id 1', 'Sink 1', null, 144 new media_router.Sink('sink id 1', 'Sink 1', null,
141 media_router.SinkIconType.CAST, 145 media_router.SinkIconType.CAST,
142 media_router.SinkStatus.ACTIVE, castModeBitset), 146 media_router.SinkStatus.ACTIVE, castModeBitset),
143 new media_router.Sink('sink id 2', 'Sink 2', null, 147 new media_router.Sink('sink id 2', 'Sink 2', null,
144 media_router.SinkIconType.CAST, 148 media_router.SinkIconType.CAST,
145 media_router.SinkStatus.ACTIVE, castModeBitset), 149 media_router.SinkStatus.ACTIVE, castModeBitset),
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 new media_router.Sink('sink id 20', 'Sink 20', null, 624 new media_router.Sink('sink id 20', 'Sink 20', null,
621 media_router.SinkIconType.CAST, 625 media_router.SinkIconType.CAST,
622 media_router.SinkStatus.ACTIVE, 0x2 | 0x4 | 0x8), 626 media_router.SinkStatus.ACTIVE, 0x2 | 0x4 | 0x8),
623 new media_router.Sink('sink id 30', 'Sink 30', null, 627 new media_router.Sink('sink id 30', 'Sink 30', null,
624 media_router.SinkIconType.CAST, 628 media_router.SinkIconType.CAST,
625 media_router.SinkStatus.PENDING, 0x4 | 0x8), 629 media_router.SinkStatus.PENDING, 0x4 | 0x8),
626 ]; 630 ];
627 631
628 container.allSinks = newSinks; 632 container.allSinks = newSinks;
629 container.routeList = [ 633 container.routeList = [
630 new media_router.Route('id 1', 'sink id 30', 'Title 1', 1, false), 634 new media_router.Route('id 1', 'sink id 30',
635 'Title 1', 1, false, false),
631 ]; 636 ];
632 637
633 setTimeout(function() { 638 setTimeout(function() {
634 var sinkList = 639 var sinkList =
635 container.$['sink-list'].querySelectorAll('paper-item'); 640 container.$['sink-list'].querySelectorAll('paper-item');
636 641
637 // Since we haven't selected a cast mode, we don't filter sinks. 642 // Since we haven't selected a cast mode, we don't filter sinks.
638 assertEquals(3, sinkList.length); 643 assertEquals(3, sinkList.length);
639 644
640 MockInteractions.tap(container.$['container-header']. 645 MockInteractions.tap(container.$['container-header'].
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 }); 803 });
799 }); 804 });
800 }); 805 });
801 }); 806 });
802 } 807 }
803 808
804 return { 809 return {
805 registerTests: registerTests, 810 registerTests: registerTests,
806 }; 811 };
807 }); 812 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698