| 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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 EXPECT_EQ(expected_tab_count, tabs->count()); | 929 EXPECT_EQ(expected_tab_count, tabs->count()); |
| 929 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) { | 930 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) { |
| 930 EXPECT_EQ(GURL(kStartupURLs[i]), | 931 EXPECT_EQ(GURL(kStartupURLs[i]), |
| 931 tabs->GetWebContentsAt(i)->GetVisibleURL()); | 932 tabs->GetWebContentsAt(i)->GetVisibleURL()); |
| 932 } | 933 } |
| 933 | 934 |
| 934 // Verify that the session is not considered to be logged in with a GAIA | 935 // Verify that the session is not considered to be logged in with a GAIA |
| 935 // account. | 936 // account. |
| 936 Profile* profile = GetProfileForTest(); | 937 Profile* profile = GetProfileForTest(); |
| 937 ASSERT_TRUE(profile); | 938 ASSERT_TRUE(profile); |
| 938 EXPECT_FALSE(profile->GetPrefs()->HasPrefPath( | 939 EXPECT_FALSE( |
| 939 prefs::kGoogleServicesUsername)); | 940 SigninManagerFactory::GetForProfile(profile)->IsAuthenticated()); |
| 940 } | 941 } |
| 941 | 942 |
| 942 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, FullscreenDisallowed) { | 943 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, FullscreenDisallowed) { |
| 943 UploadAndInstallDeviceLocalAccountPolicy(); | 944 UploadAndInstallDeviceLocalAccountPolicy(); |
| 944 AddPublicSessionToDevicePolicy(kAccountId1); | 945 AddPublicSessionToDevicePolicy(kAccountId1); |
| 945 | 946 |
| 946 WaitForPolicy(); | 947 WaitForPolicy(); |
| 947 | 948 |
| 948 ASSERT_NO_FATAL_FAILURE(StartLogin(std::string(), std::string())); | 949 ASSERT_NO_FATAL_FAILURE(StartLogin(std::string(), std::string())); |
| 949 WaitForSessionStart(); | 950 WaitForSessionStart(); |
| (...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2196 ASSERT_TRUE(content::ExecuteScript(contents_, | 2197 ASSERT_TRUE(content::ExecuteScript(contents_, |
| 2197 "$('tos-accept-button').click();")); | 2198 "$('tos-accept-button').click();")); |
| 2198 | 2199 |
| 2199 WaitForSessionStart(); | 2200 WaitForSessionStart(); |
| 2200 } | 2201 } |
| 2201 | 2202 |
| 2202 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, | 2203 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, |
| 2203 TermsOfServiceDownloadTest, testing::Bool()); | 2204 TermsOfServiceDownloadTest, testing::Bool()); |
| 2204 | 2205 |
| 2205 } // namespace policy | 2206 } // namespace policy |
| OLD | NEW |