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

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

Issue 1415533019: [Media Router] Use common media-router-header for MR UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per imcheng@'s comments. Created 5 years, 1 month 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 issue-banner. */ 5 /** @fileoverview Suite of tests for issue-banner. */
6 cr.define('issue_banner', function() { 6 cr.define('issue_banner', function() {
7 function registerTests() { 7 function registerTests() {
8 suite('IssueBanner', function() { 8 suite('IssueBanner', function() {
9 /** 9 /**
10 * Issue Banner created before each test. 10 * Issue Banner created before each test.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 banner.issue = fakeNonBlockingIssueOne; 179 banner.issue = fakeNonBlockingIssueOne;
180 checkIssueText(banner.issue); 180 checkIssueText(banner.issue);
181 }); 181 });
182 182
183 // Tests whether parts of the issue-banner is hidden based on the 183 // Tests whether parts of the issue-banner is hidden based on the
184 // current state. 184 // current state.
185 test('hidden versus visible components', function() { 185 test('hidden versus visible components', function() {
186 // The blocking UI should be shown along with an optional action. 186 // The blocking UI should be shown along with an optional action.
187 banner.issue = fakeBlockingIssueOne; 187 banner.issue = fakeBlockingIssueOne;
188 checkButtonVisibility(fakeBlockingIssueOne.secondaryActionType); 188 checkButtonVisibility(fakeBlockingIssueOne.secondaryActionType);
189 assertFalse(banner.$['issue-header'].hasAttribute('hidden'));
190 189
191 // The blocking UI should be shown without an optional action. 190 // The blocking UI should be shown without an optional action.
192 banner.issue = fakeBlockingIssueTwo; 191 banner.issue = fakeBlockingIssueTwo;
193 checkButtonVisibility(fakeBlockingIssueTwo.secondaryActionType); 192 checkButtonVisibility(fakeBlockingIssueTwo.secondaryActionType);
194 assertFalse(banner.$['issue-header'].hasAttribute('hidden'));
195 193
196 // The non-blocking UI should be shown along with an optional action. 194 // The non-blocking UI should be shown along with an optional action.
197 banner.issue = fakeNonBlockingIssueOne; 195 banner.issue = fakeNonBlockingIssueOne;
198 checkButtonVisibility(fakeNonBlockingIssueOne.secondaryActionType); 196 checkButtonVisibility(fakeNonBlockingIssueOne.secondaryActionType);
199 assertTrue(banner.$['issue-header'].hasAttribute('hidden'));
200 197
201 // The non-blocking UI should be shown without an optional action. 198 // The non-blocking UI should be shown without an optional action.
202 banner.issue = fakeNonBlockingIssueTwo; 199 banner.issue = fakeNonBlockingIssueTwo;
203 checkButtonVisibility(fakeNonBlockingIssueTwo.secondaryActionType); 200 checkButtonVisibility(fakeNonBlockingIssueTwo.secondaryActionType);
204 assertTrue(banner.$['issue-header'].hasAttribute('hidden'));
205 }); 201 });
206 }); 202 });
207 } 203 }
208 204
209 return { 205 return {
210 registerTests: registerTests, 206 registerTests: registerTests,
211 }; 207 };
212 }); 208 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698