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/ui/user_adding_screen.h" | 10 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 EXPECT_EQ(is_owner, !warning_visible); | 84 EXPECT_EQ(is_owner, !warning_visible); |
85 | 85 |
86 bool guest_option_enabled; | 86 bool guest_option_enabled; |
87 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 87 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
88 contents, | 88 contents, |
89 "var e = document.getElementById('allowBwsiCheck');" | 89 "var e = document.getElementById('allowBwsiCheck');" |
90 "window.domAutomationController.send(!e.disabled);", | 90 "window.domAutomationController.send(!e.disabled);", |
91 &guest_option_enabled)); | 91 &guest_option_enabled)); |
92 EXPECT_EQ(is_owner, guest_option_enabled); | 92 EXPECT_EQ(is_owner, guest_option_enabled); |
93 | 93 |
| 94 bool supervised_users_enabled; |
| 95 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
| 96 contents, |
| 97 "var e = document.getElementById('allowSupervisedCheck');" |
| 98 "window.domAutomationController.send(!e.disabled);", |
| 99 &supervised_users_enabled)); |
| 100 ASSERT_EQ(is_owner, supervised_users_enabled); |
| 101 |
94 bool user_pods_enabled; | 102 bool user_pods_enabled; |
95 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 103 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
96 contents, | 104 contents, |
97 "var e = document.getElementById('showUserNamesCheck');" | 105 "var e = document.getElementById('showUserNamesCheck');" |
98 "window.domAutomationController.send(!e.disabled);", | 106 "window.domAutomationController.send(!e.disabled);", |
99 &user_pods_enabled)); | 107 &user_pods_enabled)); |
100 EXPECT_EQ(is_owner, user_pods_enabled); | 108 EXPECT_EQ(is_owner, user_pods_enabled); |
101 | 109 |
102 bool whitelist_enabled; | 110 bool whitelist_enabled; |
103 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 111 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
(...skipping 24 matching lines...) Expand all Loading... |
128 AddUser(kTestUsers[1]); | 136 AddUser(kTestUsers[1]); |
129 | 137 |
130 UserManager* manager = UserManager::Get(); | 138 UserManager* manager = UserManager::Get(); |
131 ASSERT_EQ(2u, manager->GetLoggedInUsers().size()); | 139 ASSERT_EQ(2u, manager->GetLoggedInUsers().size()); |
132 | 140 |
133 CheckAccountsUI(manager->FindUser(kTestUsers[0]), true /* is_owner */); | 141 CheckAccountsUI(manager->FindUser(kTestUsers[0]), true /* is_owner */); |
134 CheckAccountsUI(manager->FindUser(kTestUsers[1]), false /* is_owner */); | 142 CheckAccountsUI(manager->FindUser(kTestUsers[1]), false /* is_owner */); |
135 } | 143 } |
136 | 144 |
137 } // namespace chromeos | 145 } // namespace chromeos |
OLD | NEW |