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 <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 35 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
36 #include "chrome/browser/chromeos/login/wizard_controller.h" | 36 #include "chrome/browser/chromeos/login/wizard_controller.h" |
37 #include "chrome/browser/chromeos/policy/affiliation_test_helper.h" | 37 #include "chrome/browser/chromeos/policy/affiliation_test_helper.h" |
38 #include "chrome/browser/chromeos/policy/device_policy_builder.h" | 38 #include "chrome/browser/chromeos/policy/device_policy_builder.h" |
39 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" | 39 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" |
40 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 40 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
41 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 41 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
42 #include "chrome/browser/chromeos/settings/cros_settings.h" | 42 #include "chrome/browser/chromeos/settings/cros_settings.h" |
43 #include "chrome/browser/policy/test/local_policy_test_server.h" | 43 #include "chrome/browser/policy/test/local_policy_test_server.h" |
44 #include "chrome/browser/profiles/profile.h" | 44 #include "chrome/browser/profiles/profile.h" |
45 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" | 45 #include "chrome/browser/ui/webui/signin/get_auth_frame.h" |
46 #include "chrome/common/chrome_constants.h" | 46 #include "chrome/common/chrome_constants.h" |
47 #include "chrome/common/chrome_paths.h" | 47 #include "chrome/common/chrome_paths.h" |
48 #include "chrome/common/chrome_switches.h" | 48 #include "chrome/common/chrome_switches.h" |
49 #include "chrome/common/extensions/features/feature_channel.h" | 49 #include "chrome/common/extensions/features/feature_channel.h" |
50 #include "chrome/grit/generated_resources.h" | 50 #include "chrome/grit/generated_resources.h" |
51 #include "chrome/test/base/in_process_browser_test.h" | 51 #include "chrome/test/base/in_process_browser_test.h" |
52 #include "chromeos/chromeos_switches.h" | 52 #include "chromeos/chromeos_switches.h" |
53 #include "chromeos/cryptohome/system_salt_getter.h" | 53 #include "chromeos/cryptohome/system_salt_getter.h" |
54 #include "chromeos/dbus/cryptohome/key.pb.h" | 54 #include "chromeos/dbus/cryptohome/key.pb.h" |
55 #include "chromeos/dbus/cryptohome/rpc.pb.h" | 55 #include "chromeos/dbus/cryptohome/rpc.pb.h" |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 } | 859 } |
860 | 860 |
861 guest_view::TestGuestViewManager* SAMLEnrollmentTest::GetGuestViewManager() { | 861 guest_view::TestGuestViewManager* SAMLEnrollmentTest::GetGuestViewManager() { |
862 using namespace guest_view; | 862 using namespace guest_view; |
863 return static_cast<TestGuestViewManager*>( | 863 return static_cast<TestGuestViewManager*>( |
864 TestGuestViewManager::FromBrowserContext( | 864 TestGuestViewManager::FromBrowserContext( |
865 ProfileHelper::GetSigninProfile())); | 865 ProfileHelper::GetSigninProfile())); |
866 } | 866 } |
867 | 867 |
868 content::WebContents* SAMLEnrollmentTest::GetEnrollmentContents() { | 868 content::WebContents* SAMLEnrollmentTest::GetEnrollmentContents() { |
869 content::RenderFrameHost* frame_host = InlineLoginUI::GetAuthFrame( | 869 content::RenderFrameHost* frame_host = |
870 GetLoginUI()->GetWebContents(), GURL(), gaia_frame_parent_); | 870 signin::GetAuthFrame(GetLoginUI()->GetWebContents(), gaia_frame_parent_); |
871 if (!frame_host) | 871 if (!frame_host) |
872 return nullptr; | 872 return nullptr; |
873 return content::WebContents::FromRenderFrameHost(frame_host); | 873 return content::WebContents::FromRenderFrameHost(frame_host); |
874 } | 874 } |
875 | 875 |
876 IN_PROC_BROWSER_TEST_F(SAMLEnrollmentTest, WithoutCredentialsPassingAPI) { | 876 IN_PROC_BROWSER_TEST_F(SAMLEnrollmentTest, WithoutCredentialsPassingAPI) { |
877 fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); | 877 fake_saml_idp()->SetLoginHTMLTemplate("saml_login.html"); |
878 StartSamlAndWaitForIdpPageLoad(kFirstSAMLUserEmail); | 878 StartSamlAndWaitForIdpPageLoad(kFirstSAMLUserEmail); |
879 | 879 |
880 // Fill-in the SAML IdP form and submit. | 880 // Fill-in the SAML IdP form and submit. |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 kTestAuthLSIDCookie1); | 1234 kTestAuthLSIDCookie1); |
1235 | 1235 |
1236 GetCookies(); | 1236 GetCookies(); |
1237 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); | 1237 EXPECT_EQ(kTestAuthSIDCookie1, GetCookieValue(kGAIASIDCookieName)); |
1238 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); | 1238 EXPECT_EQ(kTestAuthLSIDCookie1, GetCookieValue(kGAIALSIDCookieName)); |
1239 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); | 1239 EXPECT_EQ(kSAMLIdPCookieValue1, GetCookieValue(kSAMLIdPCookieName)); |
1240 } | 1240 } |
1241 | 1241 |
1242 | 1242 |
1243 } // namespace chromeos | 1243 } // namespace chromeos |
OLD | NEW |