OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |