| 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 <cstring> | 5 #include <cstring> |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 | 824 |
| 825 test_server_.reset(new policy::LocalPolicyTestServer(policy_file)); | 825 test_server_.reset(new policy::LocalPolicyTestServer(policy_file)); |
| 826 ASSERT_TRUE(test_server_->Start()); | 826 ASSERT_TRUE(test_server_->Start()); |
| 827 | 827 |
| 828 SamlTest::SetUp(); | 828 SamlTest::SetUp(); |
| 829 } | 829 } |
| 830 | 830 |
| 831 void SAMLEnrollmentTest::SetUpCommandLine(base::CommandLine* command_line) { | 831 void SAMLEnrollmentTest::SetUpCommandLine(base::CommandLine* command_line) { |
| 832 command_line->AppendSwitchASCII(policy::switches::kDeviceManagementUrl, | 832 command_line->AppendSwitchASCII(policy::switches::kDeviceManagementUrl, |
| 833 test_server_->GetServiceURL().spec()); | 833 test_server_->GetServiceURL().spec()); |
| 834 command_line->AppendSwitch(policy::switches::kDisablePolicyKeyVerification); | |
| 835 | 834 |
| 836 SamlTest::SetUpCommandLine(command_line); | 835 SamlTest::SetUpCommandLine(command_line); |
| 837 } | 836 } |
| 838 | 837 |
| 839 void SAMLEnrollmentTest::SetUpOnMainThread() { | 838 void SAMLEnrollmentTest::SetUpOnMainThread() { |
| 840 FakeGaia::AccessTokenInfo token_info; | 839 FakeGaia::AccessTokenInfo token_info; |
| 841 token_info.token = kTestUserinfoToken; | 840 token_info.token = kTestUserinfoToken; |
| 842 token_info.scopes.insert(GaiaConstants::kDeviceManagementServiceOAuth); | 841 token_info.scopes.insert(GaiaConstants::kDeviceManagementServiceOAuth); |
| 843 token_info.scopes.insert(GaiaConstants::kOAuthWrapBridgeUserInfoScope); | 842 token_info.scopes.insert(GaiaConstants::kOAuthWrapBridgeUserInfoScope); |
| 844 token_info.audience = GaiaUrls::GetInstance()->oauth2_chrome_client_id(); | 843 token_info.audience = GaiaUrls::GetInstance()->oauth2_chrome_client_id(); |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1398 | 1397 |
| 1399 // Scraping one password should finish login. | 1398 // Scraping one password should finish login. |
| 1400 content::WindowedNotificationObserver session_start_waiter( | 1399 content::WindowedNotificationObserver session_start_waiter( |
| 1401 chrome::NOTIFICATION_SESSION_STARTED, | 1400 chrome::NOTIFICATION_SESSION_STARTED, |
| 1402 content::NotificationService::AllSources()); | 1401 content::NotificationService::AllSources()); |
| 1403 ExecuteJsInSigninFrame("document.getElementById('Submit').click();"); | 1402 ExecuteJsInSigninFrame("document.getElementById('Submit').click();"); |
| 1404 session_start_waiter.Wait(); | 1403 session_start_waiter.Wait(); |
| 1405 } | 1404 } |
| 1406 | 1405 |
| 1407 } // namespace chromeos | 1406 } // namespace chromeos |
| OLD | NEW |