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

Unified Diff: chrome/test/data/webui/md_user_manager/create_profile_tests.js

Issue 2561243002: Hide supervised user creation from UserManager when force sign in is enabled. (Closed)
Patch Set: Created 4 years 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/test/data/webui/md_user_manager/create_profile_tests.js
diff --git a/chrome/test/data/webui/md_user_manager/create_profile_tests.js b/chrome/test/data/webui/md_user_manager/create_profile_tests.js
index 62579562e8d779d97563a9ba01969dbeb8038ccd..57ceef4d25e783de7cb09290774e09306a3f445c 100644
--- a/chrome/test/data/webui/md_user_manager/create_profile_tests.js
+++ b/chrome/test/data/webui/md_user_manager/create_profile_tests.js
@@ -507,6 +507,45 @@ cr.define('user_manager.create_profile_tests', function() {
});
});
});
+
+ suite('CreateProfileTestsSupervisedUserCreationCheckBox', function() {
Moe 2016/12/11 22:11:40 nit: CreateProfileTestsForceSigninPolicy
zmin 2016/12/12 20:32:43 Done.
+ setup(function() {
+ browserProxy = new TestProfileBrowserProxy();
+ // Replace real proxy with mock proxy.
+ signin.ProfileBrowserProxyImpl.instance_ = browserProxy;
+ browserProxy.setIcons([{url: 'icon1.png', label: 'icon1'}]);
+ });
+
+ teardown(function(done) {
+ createProfileElement.remove();
+ // Allow asynchronous tasks to finish.
+ setTimeout(done);
+ });
+
+ test('Create profile without supervised checkbox', function () {
Moe 2016/12/11 22:11:40 nit: 'force sign in policy enabled'
zmin 2016/12/12 20:32:43 Done.
+ loadTimeData.overrideValues({
+ isForceSigninEnabled: true,
+ });
+ createProfileElement = createElement();
+ Polymer.dom.flush();
+
+ var createSupervisedUserCheckbox =
+ createProfileElement.$.makeSupervisedCheckbox;
+ assertTrue(createSupervisedUserCheckbox.clientHeight == 0);
+ });
+
+ test('Create profile with supervised checkbox', function () {
Moe 2016/12/11 22:11:40 nit: 'force sign in policy not enabled'
zmin 2016/12/12 20:32:43 Done.
+ loadTimeData.overrideValues({
+ isForceSigninEnabled: false,
+ });
+ createProfileElement = createElement();
+ Polymer.dom.flush();
+
+ var createSupervisedUserCheckbox =
+ createProfileElement.$.makeSupervisedCheckbox;
+ assertTrue(createSupervisedUserCheckbox.clientHeight > 0);
+ });
+ });
}
return {

Powered by Google App Engine
This is Rietveld 408576698