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 <map> | 5 #include <map> |
6 #include <set> | 6 #include <set> |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 61 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
62 #include "chrome/browser/extensions/crx_installer.h" | 62 #include "chrome/browser/extensions/crx_installer.h" |
63 #include "chrome/browser/extensions/extension_service.h" | 63 #include "chrome/browser/extensions/extension_service.h" |
64 #include "chrome/browser/lifetime/application_lifetime.h" | 64 #include "chrome/browser/lifetime/application_lifetime.h" |
65 #include "chrome/browser/policy/profile_policy_connector.h" | 65 #include "chrome/browser/policy/profile_policy_connector.h" |
66 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 66 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
67 #include "chrome/browser/policy/test/local_policy_test_server.h" | 67 #include "chrome/browser/policy/test/local_policy_test_server.h" |
68 #include "chrome/browser/prefs/session_startup_pref.h" | 68 #include "chrome/browser/prefs/session_startup_pref.h" |
69 #include "chrome/browser/profiles/profile.h" | 69 #include "chrome/browser/profiles/profile.h" |
70 #include "chrome/browser/profiles/profile_manager.h" | 70 #include "chrome/browser/profiles/profile_manager.h" |
| 71 #include "chrome/browser/signin/signin_manager_factory.h" |
71 #include "chrome/browser/ui/browser.h" | 72 #include "chrome/browser/ui/browser.h" |
72 #include "chrome/browser/ui/browser_commands.h" | 73 #include "chrome/browser/ui/browser_commands.h" |
73 #include "chrome/browser/ui/browser_finder.h" | 74 #include "chrome/browser/ui/browser_finder.h" |
74 #include "chrome/browser/ui/browser_list.h" | 75 #include "chrome/browser/ui/browser_list.h" |
75 #include "chrome/browser/ui/browser_list_observer.h" | 76 #include "chrome/browser/ui/browser_list_observer.h" |
76 #include "chrome/browser/ui/browser_window.h" | 77 #include "chrome/browser/ui/browser_window.h" |
77 #include "chrome/browser/ui/extensions/app_launch_params.h" | 78 #include "chrome/browser/ui/extensions/app_launch_params.h" |
78 #include "chrome/browser/ui/extensions/application_launch.h" | 79 #include "chrome/browser/ui/extensions/application_launch.h" |
79 #include "chrome/browser/ui/host_desktop.h" | 80 #include "chrome/browser/ui/host_desktop.h" |
80 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 81 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 10 matching lines...) Expand all Loading... |
91 #include "chromeos/login/auth/user_context.h" | 92 #include "chromeos/login/auth/user_context.h" |
92 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 93 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
93 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 94 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
94 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 95 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
95 #include "components/policy/core/common/cloud/policy_builder.h" | 96 #include "components/policy/core/common/cloud/policy_builder.h" |
96 #include "components/policy/core/common/external_data_fetcher.h" | 97 #include "components/policy/core/common/external_data_fetcher.h" |
97 #include "components/policy/core/common/policy_map.h" | 98 #include "components/policy/core/common/policy_map.h" |
98 #include "components/policy/core/common/policy_namespace.h" | 99 #include "components/policy/core/common/policy_namespace.h" |
99 #include "components/policy/core/common/policy_service.h" | 100 #include "components/policy/core/common/policy_service.h" |
100 #include "components/policy/core/common/policy_switches.h" | 101 #include "components/policy/core/common/policy_switches.h" |
101 #include "components/signin/core/common/signin_pref_names.h" | 102 #include "components/signin/core/browser/signin_manager.h" |
102 #include "components/user_manager/user.h" | 103 #include "components/user_manager/user.h" |
103 #include "components/user_manager/user_manager.h" | 104 #include "components/user_manager/user_manager.h" |
104 #include "components/user_manager/user_type.h" | 105 #include "components/user_manager/user_type.h" |
105 #include "content/public/browser/browser_thread.h" | 106 #include "content/public/browser/browser_thread.h" |
106 #include "content/public/browser/notification_details.h" | 107 #include "content/public/browser/notification_details.h" |
107 #include "content/public/browser/notification_service.h" | 108 #include "content/public/browser/notification_service.h" |
108 #include "content/public/browser/notification_source.h" | 109 #include "content/public/browser/notification_source.h" |
109 #include "content/public/browser/web_contents.h" | 110 #include "content/public/browser/web_contents.h" |
110 #include "content/public/browser/web_ui.h" | 111 #include "content/public/browser/web_ui.h" |
111 #include "content/public/test/browser_test_utils.h" | 112 #include "content/public/test/browser_test_utils.h" |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 EXPECT_EQ(expected_tab_count, tabs->count()); | 931 EXPECT_EQ(expected_tab_count, tabs->count()); |
931 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) { | 932 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) { |
932 EXPECT_EQ(GURL(kStartupURLs[i]), | 933 EXPECT_EQ(GURL(kStartupURLs[i]), |
933 tabs->GetWebContentsAt(i)->GetVisibleURL()); | 934 tabs->GetWebContentsAt(i)->GetVisibleURL()); |
934 } | 935 } |
935 | 936 |
936 // Verify that the session is not considered to be logged in with a GAIA | 937 // Verify that the session is not considered to be logged in with a GAIA |
937 // account. | 938 // account. |
938 Profile* profile = GetProfileForTest(); | 939 Profile* profile = GetProfileForTest(); |
939 ASSERT_TRUE(profile); | 940 ASSERT_TRUE(profile); |
940 EXPECT_FALSE(profile->GetPrefs()->HasPrefPath( | 941 EXPECT_FALSE( |
941 prefs::kGoogleServicesUsername)); | 942 SigninManagerFactory::GetForProfile(profile)->IsAuthenticated()); |
942 } | 943 } |
943 | 944 |
944 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, FullscreenDisallowed) { | 945 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, FullscreenDisallowed) { |
945 UploadAndInstallDeviceLocalAccountPolicy(); | 946 UploadAndInstallDeviceLocalAccountPolicy(); |
946 AddPublicSessionToDevicePolicy(kAccountId1); | 947 AddPublicSessionToDevicePolicy(kAccountId1); |
947 | 948 |
948 WaitForPolicy(); | 949 WaitForPolicy(); |
949 | 950 |
950 ASSERT_NO_FATAL_FAILURE(StartLogin(std::string(), std::string())); | 951 ASSERT_NO_FATAL_FAILURE(StartLogin(std::string(), std::string())); |
951 WaitForSessionStart(); | 952 WaitForSessionStart(); |
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2202 ASSERT_TRUE(content::ExecuteScript(contents_, | 2203 ASSERT_TRUE(content::ExecuteScript(contents_, |
2203 "$('tos-accept-button').click();")); | 2204 "$('tos-accept-button').click();")); |
2204 | 2205 |
2205 WaitForSessionStart(); | 2206 WaitForSessionStart(); |
2206 } | 2207 } |
2207 | 2208 |
2208 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, | 2209 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, |
2209 TermsOfServiceDownloadTest, testing::Bool()); | 2210 TermsOfServiceDownloadTest, testing::Bool()); |
2210 | 2211 |
2211 } // namespace policy | 2212 } // namespace policy |
OLD | NEW |