| Index: chrome/test/data/webui/media_router/media_router_container_sink_list_tests.js
|
| diff --git a/chrome/test/data/webui/media_router/media_router_container_sink_list_tests.js b/chrome/test/data/webui/media_router/media_router_container_sink_list_tests.js
|
| index 91ad26fd11a02cdce3eea61ace5168e3f736b5ab..60f75f6ee3f31cf1e5f340d10388dc54a4f6a9d2 100644
|
| --- a/chrome/test/data/webui/media_router/media_router_container_sink_list_tests.js
|
| +++ b/chrome/test/data/webui/media_router/media_router_container_sink_list_tests.js
|
| @@ -72,6 +72,7 @@ cr.define('media_router_container_sink_list', function() {
|
| // Get common functions and variables.
|
| var test_base = media_router_container_test_base.init(container);
|
|
|
| + checkCurrentView = test_base.checkCurrentView;
|
| checkElementsVisibleWithId = test_base.checkElementsVisibleWithId;
|
| checkElementText = test_base.checkElementText;
|
| fakeBlockingIssue = test_base.fakeBlockingIssue;
|
| @@ -178,9 +179,11 @@ cr.define('media_router_container_sink_list', function() {
|
| });
|
|
|
| // Tests for expected visible UI when the view is SINK_LIST, and there is
|
| - // a non blocking issue.
|
| + // a non blocking issue. Also tests for expected visible UI when the
|
| + // issue is cleared.
|
| test('sink list visibility non blocking issue', function(done) {
|
| container.showSinkList_();
|
| + checkCurrentView(media_router.MediaRouterView.SINK_LIST);
|
|
|
| // Set an non-empty sink list.
|
| container.allSinks = fakeSinkList;
|
| @@ -188,18 +191,29 @@ cr.define('media_router_container_sink_list', function() {
|
| // Set a non-blocking issue. The issue should be shown.
|
| container.issue = fakeNonBlockingIssue;
|
| setTimeout(function() {
|
| + checkCurrentView(media_router.MediaRouterView.SINK_LIST);
|
| checkElementsVisibleWithId(['container-header',
|
| 'issue-banner',
|
| 'sink-list',
|
| 'sink-list-view']);
|
| - done();
|
| + // Replace issue with null.
|
| + container.issue = null;
|
| + setTimeout(function() {
|
| + checkCurrentView(media_router.MediaRouterView.SINK_LIST);
|
| + checkElementsVisibleWithId(['container-header',
|
| + 'sink-list',
|
| + 'sink-list-view']);
|
| + done();
|
| + });
|
| });
|
| });
|
|
|
| // Tests for expected visible UI when the view is SINK_LIST, and there is
|
| - // a blocking issue.
|
| + // a blocking issue. Also tests for expected visible UI when the issue is
|
| + // cleared.
|
| test('sink list visibility blocking issue', function(done) {
|
| container.showSinkList_();
|
| + checkCurrentView(media_router.MediaRouterView.SINK_LIST);
|
|
|
| // Set an non-empty sink list.
|
| container.allSinks = fakeSinkList;
|
| @@ -208,10 +222,52 @@ cr.define('media_router_container_sink_list', function() {
|
| // else, hidden.
|
| container.issue = fakeBlockingIssue;
|
| setTimeout(function() {
|
| + checkCurrentView(media_router.MediaRouterView.ISSUE);
|
| checkElementsVisibleWithId(['container-header',
|
| 'issue-banner',
|
| 'sink-list']);
|
| - done();
|
| + // Replace issue with null.
|
| + container.issue = null;
|
| + setTimeout(function() {
|
| + checkCurrentView(media_router.MediaRouterView.SINK_LIST);
|
| + checkElementsVisibleWithId(['container-header',
|
| + 'sink-list',
|
| + 'sink-list-view']);
|
| + done();
|
| + });
|
| + });
|
| + });
|
| +
|
| + // Tests for expected visible UI when the view is SINK_LIST, and there is
|
| + // a blocking issue. Also tests for expected visible UI when the issue is
|
| + // cleared.
|
| + test('sink list visibility non-blocking replaced with blocking issue',
|
| + function(done) {
|
| + container.showSinkList_();
|
| + checkCurrentView(media_router.MediaRouterView.SINK_LIST);
|
| +
|
| + // Set an non-empty sink list.
|
| + container.allSinks = fakeSinkList;
|
| +
|
| + // Set a non-blocking issue. The issue should be shown.
|
| + container.issue = fakeNonBlockingIssue;
|
| + setTimeout(function() {
|
| + checkCurrentView(media_router.MediaRouterView.SINK_LIST);
|
| + checkElementsVisibleWithId(['container-header',
|
| + 'issue-banner',
|
| + 'sink-list',
|
| + 'sink-list-view']);
|
| +
|
| + // Set a blocking issue. The issue should be shown, and everything
|
| + // else, hidden.
|
| + container.issue = fakeBlockingIssue;
|
| + setTimeout(function() {
|
| + checkCurrentView(media_router.MediaRouterView.ISSUE);
|
| + checkElementsVisibleWithId(['container-header',
|
| + 'issue-banner',
|
| + 'sink-list']);
|
| + done();
|
| + });
|
| });
|
| });
|
|
|
|
|