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

Side by Side Diff: chrome/test/data/webui/settings/about_page_tests.js

Issue 2655193002: MD Settings: Fix case where "Check for updates" is accidentally shown. (Closed)
Patch Set: Add test. Created 3 years, 11 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
« no previous file with comments | « chrome/browser/resources/settings/about_page/about_page.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 cr.define('settings_about_page', function() { 5 cr.define('settings_about_page', function() {
6 /** 6 /**
7 * @constructor 7 * @constructor
8 * @implements {settings.AboutPageBrowserProxy} 8 * @implements {settings.AboutPageBrowserProxy}
9 * @extends {settings.TestBrowserProxy} 9 * @extends {settings.TestBrowserProxy}
10 */ 10 */
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 assertTrue(page.$.buttonContainer.hidden); 373 assertTrue(page.$.buttonContainer.hidden);
374 } 374 }
375 375
376 // Check that |UPDATED| status is ignored if the user has not 376 // Check that |UPDATED| status is ignored if the user has not
377 // explicitly checked for updates yet. 377 // explicitly checked for updates yet.
378 fireStatusChanged(UpdateStatus.UPDATED); 378 fireStatusChanged(UpdateStatus.UPDATED);
379 assertFalse(checkForUpdates.hidden); 379 assertFalse(checkForUpdates.hidden);
380 assertTrue(relaunch.hidden); 380 assertTrue(relaunch.hidden);
381 assertTrue(relaunchAndPowerwash.hidden); 381 assertTrue(relaunchAndPowerwash.hidden);
382 382
383 // Check that the "Check for updates" button gets hidden for certain
384 // UpdateStatus values, even if the CHECKING state was never
385 // encountered (for example triggering update from crosh command
386 // line).
387 fireStatusChanged(UpdateStatus.UPDATING);
388 assertAllHidden();
389 fireStatusChanged(UpdateStatus.NEARLY_UPDATED);
390 assertTrue(checkForUpdates.hidden);
391 assertFalse(relaunch.hidden);
392 assertTrue(relaunchAndPowerwash.hidden);
393
383 fireStatusChanged(UpdateStatus.CHECKING); 394 fireStatusChanged(UpdateStatus.CHECKING);
384 assertAllHidden(); 395 assertAllHidden();
385 396
386 fireStatusChanged(UpdateStatus.UPDATING); 397 fireStatusChanged(UpdateStatus.UPDATING);
387 assertAllHidden(); 398 assertAllHidden();
388 399
389 fireStatusChanged(UpdateStatus.NEARLY_UPDATED); 400 fireStatusChanged(UpdateStatus.NEARLY_UPDATED);
390 assertTrue(checkForUpdates.hidden); 401 assertTrue(checkForUpdates.hidden);
391 assertFalse(relaunch.hidden); 402 assertFalse(relaunch.hidden);
392 assertTrue(relaunchAndPowerwash.hidden); 403 assertTrue(relaunchAndPowerwash.hidden);
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 registerTests: function() { 851 registerTests: function() {
841 if (cr.isChromeOS) { 852 if (cr.isChromeOS) {
842 registerDetailedBuildInfoTests(); 853 registerDetailedBuildInfoTests();
843 registerChannelSwitcherDialogTests(); 854 registerChannelSwitcherDialogTests();
844 } 855 }
845 registerAboutPageTests(); 856 registerAboutPageTests();
846 }, 857 },
847 registerOfficialBuildTests: registerOfficialBuildTests, 858 registerOfficialBuildTests: registerOfficialBuildTests,
848 }; 859 };
849 }); 860 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/about_page/about_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698