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

Unified Diff: chrome/browser/ui/webui/options/manage_profile_browsertest.js

Issue 23875002: Correctly update enabled state of the "create managed user" checkbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/options/manage_profile_overlay.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/resources/options/manage_profile_overlay.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698