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

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

Issue 1933013002: [Media Router WebUI] Remove unnecessary default property values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 checkDataFromEventFiring(fakeNonBlockingIssueOne, 159 checkDataFromEventFiring(fakeNonBlockingIssueOne,
160 data, false); 160 data, false);
161 done(); 161 done();
162 }); 162 });
163 MockInteractions.tap(banner.$['opt-button']); 163 MockInteractions.tap(banner.$['opt-button']);
164 }); 164 });
165 165
166 // Tests the issue text. While the UI will show only the blocking or 166 // Tests the issue text. While the UI will show only the blocking or
167 // non-blocking interface, the issue's info will be set if specified. 167 // non-blocking interface, the issue's info will be set if specified.
168 test('issue text', function() { 168 test('issue text', function() {
169 // |issue| is null. Title text should be empty. 169 // |issue| is initially undefined.
170 assertEquals(null, banner.issue); 170 assertEquals(undefined, banner.issue);
171 checkIssueText(banner.issue);
172 171
173 // Set |issue| to be a blocking issue. Title text should be updated. 172 // Set |issue| to be a blocking issue. Title text should be updated.
174 banner.issue = fakeBlockingIssueOne; 173 banner.issue = fakeBlockingIssueOne;
175 checkIssueText(banner.issue); 174 checkIssueText(banner.issue);
176 175
177 // Set |issue| to be a non-blocking issue. Title text should be 176 // Set |issue| to be a non-blocking issue. Title text should be
178 // updated. 177 // updated.
179 banner.issue = fakeNonBlockingIssueOne; 178 banner.issue = fakeNonBlockingIssueOne;
180 checkIssueText(banner.issue); 179 checkIssueText(banner.issue);
181 }); 180 });
(...skipping 17 matching lines...) Expand all
199 banner.issue = fakeNonBlockingIssueTwo; 198 banner.issue = fakeNonBlockingIssueTwo;
200 checkButtonVisibility(fakeNonBlockingIssueTwo.secondaryActionType); 199 checkButtonVisibility(fakeNonBlockingIssueTwo.secondaryActionType);
201 }); 200 });
202 }); 201 });
203 } 202 }
204 203
205 return { 204 return {
206 registerTests: registerTests, 205 registerTests: registerTests,
207 }; 206 };
208 }); 207 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698