| 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 <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "apps/app_window_registry.h" | 8 #include "apps/app_window_registry.h" |
| 9 #include "apps/ui/native_app_window.h" | 9 #include "apps/ui/native_app_window.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 #include "chromeos/dbus/fake_session_manager_client.h" | 84 #include "chromeos/dbus/fake_session_manager_client.h" |
| 85 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 85 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 86 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 86 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
| 87 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 87 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
| 88 #include "components/policy/core/common/cloud/policy_builder.h" | 88 #include "components/policy/core/common/cloud/policy_builder.h" |
| 89 #include "components/policy/core/common/external_data_fetcher.h" | 89 #include "components/policy/core/common/external_data_fetcher.h" |
| 90 #include "components/policy/core/common/policy_map.h" | 90 #include "components/policy/core/common/policy_map.h" |
| 91 #include "components/policy/core/common/policy_namespace.h" | 91 #include "components/policy/core/common/policy_namespace.h" |
| 92 #include "components/policy/core/common/policy_service.h" | 92 #include "components/policy/core/common/policy_service.h" |
| 93 #include "components/policy/core/common/policy_switches.h" | 93 #include "components/policy/core/common/policy_switches.h" |
| 94 #include "components/signin/core/common/signin_pref_names.h" |
| 94 #include "content/public/browser/notification_details.h" | 95 #include "content/public/browser/notification_details.h" |
| 95 #include "content/public/browser/notification_service.h" | 96 #include "content/public/browser/notification_service.h" |
| 96 #include "content/public/browser/notification_source.h" | 97 #include "content/public/browser/notification_source.h" |
| 97 #include "content/public/browser/web_contents.h" | 98 #include "content/public/browser/web_contents.h" |
| 98 #include "content/public/browser/web_ui.h" | 99 #include "content/public/browser/web_ui.h" |
| 99 #include "content/public/test/browser_test_utils.h" | 100 #include "content/public/test/browser_test_utils.h" |
| 100 #include "content/public/test/test_utils.h" | 101 #include "content/public/test/test_utils.h" |
| 101 #include "crypto/rsa_private_key.h" | 102 #include "crypto/rsa_private_key.h" |
| 102 #include "extensions/browser/extension_system.h" | 103 #include "extensions/browser/extension_system.h" |
| 103 #include "extensions/browser/management_policy.h" | 104 #include "extensions/browser/management_policy.h" |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 ASSERT_TRUE(browser); | 615 ASSERT_TRUE(browser); |
| 615 | 616 |
| 616 TabStripModel* tabs = browser->tab_strip_model(); | 617 TabStripModel* tabs = browser->tab_strip_model(); |
| 617 ASSERT_TRUE(tabs); | 618 ASSERT_TRUE(tabs); |
| 618 int expected_tab_count = static_cast<int>(arraysize(kStartupURLs)); | 619 int expected_tab_count = static_cast<int>(arraysize(kStartupURLs)); |
| 619 EXPECT_EQ(expected_tab_count, tabs->count()); | 620 EXPECT_EQ(expected_tab_count, tabs->count()); |
| 620 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) { | 621 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) { |
| 621 EXPECT_EQ(GURL(kStartupURLs[i]), | 622 EXPECT_EQ(GURL(kStartupURLs[i]), |
| 622 tabs->GetWebContentsAt(i)->GetVisibleURL()); | 623 tabs->GetWebContentsAt(i)->GetVisibleURL()); |
| 623 } | 624 } |
| 625 |
| 626 // Verify that the session is not considered to be logged in with a GAIA |
| 627 // account. |
| 628 Profile* profile = GetProfileForTest(); |
| 629 ASSERT_TRUE(profile); |
| 630 EXPECT_FALSE(profile->GetPrefs()->HasPrefPath( |
| 631 prefs::kGoogleServicesUsername)); |
| 624 } | 632 } |
| 625 | 633 |
| 626 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, FullscreenDisallowed) { | 634 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, FullscreenDisallowed) { |
| 627 UploadAndInstallDeviceLocalAccountPolicy(); | 635 UploadAndInstallDeviceLocalAccountPolicy(); |
| 628 AddPublicSessionToDevicePolicy(kAccountId1); | 636 AddPublicSessionToDevicePolicy(kAccountId1); |
| 629 | 637 |
| 630 // This observes the display name becoming available as this indicates | 638 // This observes the display name becoming available as this indicates |
| 631 // device-local account policy is fully loaded, which is a prerequisite for | 639 // device-local account policy is fully loaded, which is a prerequisite for |
| 632 // successful login. | 640 // successful login. |
| 633 content::WindowedNotificationObserver( | 641 content::WindowedNotificationObserver( |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 if (!IsSessionStarted()) { | 1396 if (!IsSessionStarted()) { |
| 1389 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, | 1397 content::WindowedNotificationObserver(chrome::NOTIFICATION_SESSION_STARTED, |
| 1390 base::Bind(IsSessionStarted)).Wait(); | 1398 base::Bind(IsSessionStarted)).Wait(); |
| 1391 } | 1399 } |
| 1392 } | 1400 } |
| 1393 | 1401 |
| 1394 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance, | 1402 INSTANTIATE_TEST_CASE_P(TermsOfServiceTestInstance, |
| 1395 TermsOfServiceTest, testing::Bool()); | 1403 TermsOfServiceTest, testing::Bool()); |
| 1396 | 1404 |
| 1397 } // namespace policy | 1405 } // namespace policy |
| OLD | NEW |