| 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 40260c62167bdb714f9c3a9dc9208118445e3e34..b06253b52fd7efdc9d08eee96fb13e3f250f1319 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;
|
| @@ -183,9 +184,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;
|
| @@ -193,18 +196,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;
|
| @@ -213,10 +227,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();
|
| + });
|
| });
|
| });
|
|
|
|
|