OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <string> | 5 #include <string> |
6 | 6 |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 EXPECT_EQ(registration_utility_stub_->display_name(), | 223 EXPECT_EQ(registration_utility_stub_->display_name(), |
224 UTF8ToUTF16(kSupervisedUserDisplayName)); | 224 UTF8ToUTF16(kSupervisedUserDisplayName)); |
225 | 225 |
226 registration_utility_stub_->RunSuccessCallback("token"); | 226 registration_utility_stub_->RunSuccessCallback("token"); |
227 | 227 |
228 // Token writing moves control to BlockingPool and back. | 228 // Token writing moves control to BlockingPool and back. |
229 base::RunLoop().RunUntilIdle(); | 229 base::RunLoop().RunUntilIdle(); |
230 content::BrowserThread::GetBlockingPool()->FlushForTesting(); | 230 content::BrowserThread::GetBlockingPool()->FlushForTesting(); |
231 base::RunLoop().RunUntilIdle(); | 231 base::RunLoop().RunUntilIdle(); |
232 | 232 |
233 JSExpect("$('managed-user-creation').currentPage_ == 'created-1'"); | 233 JSExpect("$('managed-user-creation').currentPage_ == 'created'"); |
234 JSEval("$('managed-user-creation-gotit-button').click()"); | 234 JSEval("$('managed-user-creation-gotit-button').click()"); |
235 } | 235 } |
236 | 236 |
237 IN_PROC_BROWSER_TEST_F(SupervisedUserCreationTest, CreateSupervisedUser) { | 237 IN_PROC_BROWSER_TEST_F(SupervisedUserCreationTest, CreateSupervisedUser) { |
238 // Log in as supervised user, make sure that everything works. | 238 // Log in as supervised user, make sure that everything works. |
239 ASSERT_EQ(3UL, UserManager::Get()->GetUsers().size()); | 239 ASSERT_EQ(3UL, UserManager::Get()->GetUsers().size()); |
240 // Created supervised user have to be first in a list. | 240 // Created supervised user have to be first in a list. |
241 const User* user = UserManager::Get()->GetUsers().at(0); | 241 const User* user = UserManager::Get()->GetUsers().at(0); |
242 ASSERT_EQ(UTF8ToUTF16(kSupervisedUserDisplayName), user->display_name()); | 242 ASSERT_EQ(UTF8ToUTF16(kSupervisedUserDisplayName), user->display_name()); |
243 LoginUser(user->email()); | 243 LoginUser(user->email()); |
244 } | 244 } |
245 | 245 |
246 } // namespace chromeos | 246 } // namespace chromeos |
OLD | NEW |