| 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 43b695974823ce343588052f081016836645d57f..a980e49aef42806d286d31c8e83107f75865f2b1 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
|
| @@ -58,6 +58,12 @@ cr.define('media_router_container_cast_mode_list', function() {
|
| var fakeCastModeListWithNonDefaultModesOnly = [];
|
|
|
| /**
|
| + * The list of CastModes to show with default mode forced.
|
| + * @type {!Array<!media_router.CastMode>}
|
| + */
|
| + var fakeCastModeListWithDefaultModeForced = [];
|
| +
|
| + /**
|
| * The blocking issue to show.
|
| * @type {?media_router.Issue}
|
| */
|
| @@ -92,6 +98,8 @@ cr.define('media_router_container_cast_mode_list', function() {
|
| fakeCastModeList = test_base.fakeCastModeList;
|
| fakeCastModeListWithNonDefaultModesOnly =
|
| test_base.fakeCastModeListWithNonDefaultModesOnly;
|
| + fakeCastModeListWithDefaultModeForced =
|
| + test_base.fakeCastModeListWithDefaultModeForced;
|
| fakeNonBlockingIssue = test_base.fakeNonBlockingIssue;
|
| fakeSinkList = test_base.fakeSinkList;
|
|
|
| @@ -322,6 +330,20 @@ cr.define('media_router_container_cast_mode_list', function() {
|
| });
|
| });
|
|
|
| + // When a forced cast mode it set, it is used.
|
| + test('cast mode list respects forced mode', function(done) {
|
| + container.castModeList = fakeCastModeListWithDefaultModeForced;
|
| + MockInteractions.tap(container.$['container-header'].
|
| + $['arrow-drop-icon']);
|
| + setTimeout(function() {
|
| + assertEquals(media_router.CastModeType.DEFAULT,
|
| + container.shownCastModeValue_);
|
| + assertEquals('Cast google.com', container.headerText);
|
| + assertFalse(container.userHasSelectedCastMode_);
|
| + done();
|
| + });
|
| + });
|
| +
|
| // Tests that the sink list does not contain any sinks that are not
|
| // compatible with the selected cast mode and are not associated with a
|
| // route.
|
|
|