OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/chromeos/policy/device_local_account.h" | 5 #include "chrome/browser/chromeos/policy/device_local_account.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 // Start login into the device-local account. | 724 // Start login into the device-local account. |
725 chromeos::LoginDisplayHost* host = | 725 chromeos::LoginDisplayHost* host = |
726 chromeos::LoginDisplayHost::default_host(); | 726 chromeos::LoginDisplayHost::default_host(); |
727 ASSERT_TRUE(host); | 727 ASSERT_TRUE(host); |
728 host->StartSignInScreen(LoginScreenContext()); | 728 host->StartSignInScreen(LoginScreenContext()); |
729 chromeos::ExistingUserController* controller = | 729 chromeos::ExistingUserController* controller = |
730 chromeos::ExistingUserController::current_controller(); | 730 chromeos::ExistingUserController::current_controller(); |
731 ASSERT_TRUE(controller); | 731 ASSERT_TRUE(controller); |
732 | 732 |
733 chromeos::UserContext user_context(user_manager::USER_TYPE_PUBLIC_ACCOUNT, | 733 chromeos::UserContext user_context(user_manager::USER_TYPE_PUBLIC_ACCOUNT, |
734 account_id_1_.GetUserEmail()); | 734 account_id_1_); |
735 user_context.SetPublicSessionLocale(locale); | 735 user_context.SetPublicSessionLocale(locale); |
736 user_context.SetPublicSessionInputMethod(input_method); | 736 user_context.SetPublicSessionInputMethod(input_method); |
737 controller->Login(user_context, chromeos::SigninSpecifics()); | 737 controller->Login(user_context, chromeos::SigninSpecifics()); |
738 } | 738 } |
739 | 739 |
740 void WaitForSessionStart() { | 740 void WaitForSessionStart() { |
741 if (IsSessionStarted()) | 741 if (IsSessionStarted()) |
742 return; | 742 return; |
743 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, | 743 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, |
744 base::Bind(IsSessionStarted)).Wait(); | 744 base::Bind(IsSessionStarted)).Wait(); |
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2441 ASSERT_TRUE(content::ExecuteScript(contents_, | 2441 ASSERT_TRUE(content::ExecuteScript(contents_, |
2442 "$('tos-accept-button').click();")); | 2442 "$('tos-accept-button').click();")); |
2443 | 2443 |
2444 WaitForSessionStart(); | 2444 WaitForSessionStart(); |
2445 } | 2445 } |
2446 | 2446 |
2447 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, | 2447 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, |
2448 TermsOfServiceDownloadTest, testing::Bool()); | 2448 TermsOfServiceDownloadTest, testing::Bool()); |
2449 | 2449 |
2450 } // namespace policy | 2450 } // namespace policy |
OLD | NEW |