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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/accounts_options_browsertest.cc

Issue 228553002: Preference dis/allowing supervised users creation is now available as owner setting, not only as de… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/chromeos/login/login_manager_test.h" 8 #include "chrome/browser/chromeos/login/login_manager_test.h"
9 #include "chrome/browser/chromeos/login/startup_utils.h" 9 #include "chrome/browser/chromeos/login/startup_utils.h"
10 #include "chrome/browser/chromeos/login/user_adding_screen.h" 10 #include "chrome/browser/chromeos/login/user_adding_screen.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 EXPECT_EQ(is_owner, !warning_visible); 85 EXPECT_EQ(is_owner, !warning_visible);
86 86
87 bool guest_option_enabled; 87 bool guest_option_enabled;
88 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 88 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
89 contents, 89 contents,
90 "var e = document.getElementById('allowBwsiCheck');" 90 "var e = document.getElementById('allowBwsiCheck');"
91 "window.domAutomationController.send(!e.disabled);", 91 "window.domAutomationController.send(!e.disabled);",
92 &guest_option_enabled)); 92 &guest_option_enabled));
93 ASSERT_EQ(is_owner, guest_option_enabled); 93 ASSERT_EQ(is_owner, guest_option_enabled);
94 94
95 bool supervised_users_enabled;
96 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
97 contents,
98 "var e = document.getElementById('allowSupervisedCheck');"
99 "window.domAutomationController.send(!e.disabled);",
100 &supervised_users_enabled));
101 ASSERT_EQ(is_owner, supervised_users_enabled);
102
95 bool user_pods_enabled; 103 bool user_pods_enabled;
96 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 104 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
97 contents, 105 contents,
98 "var e = document.getElementById('showUserNamesCheck');" 106 "var e = document.getElementById('showUserNamesCheck');"
99 "window.domAutomationController.send(!e.disabled);", 107 "window.domAutomationController.send(!e.disabled);",
100 &user_pods_enabled)); 108 &user_pods_enabled));
101 ASSERT_EQ(is_owner, user_pods_enabled); 109 ASSERT_EQ(is_owner, user_pods_enabled);
102 110
103 bool whitelist_enabled; 111 bool whitelist_enabled;
104 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( 112 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
(...skipping 24 matching lines...) Expand all
129 AddUser(kTestUsers[1]); 137 AddUser(kTestUsers[1]);
130 138
131 UserManager* manager = UserManager::Get(); 139 UserManager* manager = UserManager::Get();
132 ASSERT_EQ(2u, manager->GetLoggedInUsers().size()); 140 ASSERT_EQ(2u, manager->GetLoggedInUsers().size());
133 141
134 CheckAccountsUI(manager->FindUser(kTestUsers[0]), true /* is_owner */); 142 CheckAccountsUI(manager->FindUser(kTestUsers[0]), true /* is_owner */);
135 CheckAccountsUI(manager->FindUser(kTestUsers[1]), false /* is_owner */); 143 CheckAccountsUI(manager->FindUser(kTestUsers[1]), false /* is_owner */);
136 } 144 }
137 145
138 } // namespace chromeos 146 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698