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

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

Issue 445003002: Supervised users: UI updates for new-profile-management launch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 6 years, 4 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
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 78a206cd71cf7f5a69d270d8158fe98968494470..4e0cca55dcf3533928702f19f220e260f0d15b4e 100644
--- a/chrome/browser/ui/webui/options/manage_profile_browsertest.js
+++ b/chrome/browser/ui/webui/options/manage_profile_browsertest.js
@@ -429,25 +429,28 @@ TEST_F('ManageProfileUITest', 'PolicyDynamicRefresh', function() {
CreateProfileOverlay.updateSignedInStatus(custodianEmail);
CreateProfileOverlay.updateSupervisedUsersAllowed(true);
var checkbox = $('create-profile-supervised');
- var link = $('create-profile-supervised-not-signed-in-link');
+ var signInPromo = $('create-profile-supervised-not-signed-in');
+ var signInLink = $('create-profile-supervised-sign-in-link');
var indicator = $('create-profile-supervised-indicator');
assertFalse(checkbox.disabled, 'allowed and signed in');
- assertFalse(link.hidden, 'allowed and signed in');
+ assertTrue(signInPromo.hidden, 'allowed and signed in');
assertEquals('none', window.getComputedStyle(indicator, null).display,
'allowed and signed in');
CreateProfileOverlay.updateSignedInStatus('');
CreateProfileOverlay.updateSupervisedUsersAllowed(true);
assertTrue(checkbox.disabled, 'allowed, not signed in');
- assertFalse(link.hidden, 'allowed, not signed in');
+ assertFalse(signInPromo.hidden, 'allowed, not signed in');
+ assertTrue(signInLink.enabled, 'allowed, not signed in');
assertEquals('none', window.getComputedStyle(indicator, null).display,
'allowed, not signed in');
CreateProfileOverlay.updateSignedInStatus('');
CreateProfileOverlay.updateSupervisedUsersAllowed(false);
assertTrue(checkbox.disabled, 'disallowed, not signed in');
- assertTrue(link.hidden, 'disallowed, not signed in');
+ assertFalse(signInPromo.hidden, 'disallowed, not signed in');
+ assertFalse(signInLink.enabled, 'disallowed, not signed in');
assertEquals('inline-block', window.getComputedStyle(indicator, null).display,
'disallowed, not signed in');
assertEquals('policy', indicator.getAttribute('controlled-by'));
@@ -455,7 +458,7 @@ TEST_F('ManageProfileUITest', 'PolicyDynamicRefresh', function() {
CreateProfileOverlay.updateSignedInStatus(custodianEmail);
CreateProfileOverlay.updateSupervisedUsersAllowed(false);
assertTrue(checkbox.disabled, 'disallowed, signed in');
- assertTrue(link.hidden, 'disallowed, signed in');
+ assertTrue(signInPromo.hidden, 'disallowed, signed in');
assertEquals('inline-block', window.getComputedStyle(indicator, null).display,
'disallowed, signed in');
assertEquals('policy', indicator.getAttribute('controlled-by'));
@@ -463,7 +466,7 @@ TEST_F('ManageProfileUITest', 'PolicyDynamicRefresh', function() {
CreateProfileOverlay.updateSignedInStatus(custodianEmail);
CreateProfileOverlay.updateSupervisedUsersAllowed(true);
assertFalse(checkbox.disabled, 're-allowed and signed in');
- assertFalse(link.hidden, 're-allowed and signed in');
+ assertTrue(signInPromo.hidden, 're-allowed and signed in');
assertEquals('none', window.getComputedStyle(indicator, null).display,
're-allowed and signed in');
});
@@ -477,11 +480,11 @@ TEST_F('ManageProfileUITest', 'CreateInProgress', function() {
CreateProfileOverlay.updateSignedInStatus(custodianEmail);
CreateProfileOverlay.updateSupervisedUsersAllowed(true);
var checkbox = $('create-profile-supervised');
- var link = $('create-profile-supervised-not-signed-in-link');
+ var signInPromo = $('create-profile-supervised-not-signed-in');
var indicator = $('create-profile-supervised-indicator');
assertFalse(checkbox.disabled, 'allowed and signed in');
- assertFalse(link.hidden, 'allowed and signed in');
+ assertTrue(signInPromo.hidden, 'allowed and signed in');
assertEquals('none', window.getComputedStyle(indicator, null).display,
'allowed and signed in');
assertFalse(indicator.hasAttribute('controlled-by'));
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/browser/ui/webui/options/manage_profile_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698