Chromium Code Reviews| Index: chrome/browser/ui/webui/options/manage_profile_browsertest.js |
| diff --git a/chrome/browser/ui/webui/options/manage_profile_browsertest.js b/chrome/browser/ui/webui/options/manage_profile_browsertest.js |
| index e02a526cad5ff8225a6be8e79ef0e554aa2701d3..147f513db73a361b7ee4e7fe588631f041759222 100644 |
| --- a/chrome/browser/ui/webui/options/manage_profile_browsertest.js |
| +++ b/chrome/browser/ui/webui/options/manage_profile_browsertest.js |
| @@ -301,6 +301,31 @@ TEST_F('ManageProfileUITest', 'PolicyDynamicRefresh', function() { |
| 're-allowed and signed in'); |
| }); |
| +// The managed user checkbox should correctly update its state during profile |
| +// creation and afterwards. |
| +TEST_F('ManageProfileUITest', 'CreateInProgress', function() { |
| + ManageProfileOverlay.getInstance().initializePage(); |
| + |
| + var custodianEmail = 'chrome.playpen.test@gmail.com'; |
| + CreateProfileOverlay.updateSignedInStatus(custodianEmail); |
| + CreateProfileOverlay.updateManagedUsersAllowed(true); |
| + var checkbox = $('create-profile-managed'); |
| + var link = $('create-profile-managed-not-signed-in-link'); |
| + var indicator = $('create-profile-managed-indicator'); |
| + |
| + assertFalse(checkbox.disabled, 'allowed and signed in'); |
| + assertFalse(link.hidden, 'allowed and signed in'); |
| + assertEquals('none', window.getComputedStyle(indicator, null).display, |
| + 'allowed and signed in'); |
| + assertFalse(indicator.hasAttribute('controlled-by')); |
| + |
| + CreateProfileOverlay.updateCreateInProgress(true); |
| + assertTrue(checkbox.disabled, 'creation in progress'); |
| + |
| + CreateProfileOverlay.updateCreateInProgress(false); |
|
Pam (message me for reviews)
2013/09/05 10:08:38
This test wouldn't have caught the bug. We must ha
Bernhard Bauer
2013/09/05 12:49:14
Good catch! Yeah, ProfileSyncService is quite libe
|
| + assertFalse(checkbox.disabled, 'creation finished'); |
| +}); |
| + |
| // Managed users shouldn't be able to open the delete or create dialogs. |
| TEST_F('ManageProfileUITest', 'ManagedShowDeleteAndCreate', function() { |
| this.setProfileManaged_(false); |