| 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 test_server_.UpdatePolicy(dm_protocol::kChromeDevicePolicyType, std::string(), | 768 test_server_.UpdatePolicy(dm_protocol::kChromeDevicePolicyType, std::string(), |
| 769 policy.SerializeAsString()); | 769 policy.SerializeAsString()); |
| 770 g_browser_process->policy_service()->RefreshPolicies(base::Closure()); | 770 g_browser_process->policy_service()->RefreshPolicies(base::Closure()); |
| 771 | 771 |
| 772 // Make sure the second device-local account disappears. | 772 // Make sure the second device-local account disappears. |
| 773 content::WindowedNotificationObserver(chrome::NOTIFICATION_USER_LIST_CHANGED, | 773 content::WindowedNotificationObserver(chrome::NOTIFICATION_USER_LIST_CHANGED, |
| 774 base::Bind(&IsNotKnownUser, user_id_2_)) | 774 base::Bind(&IsNotKnownUser, user_id_2_)) |
| 775 .Wait(); | 775 .Wait(); |
| 776 } | 776 } |
| 777 | 777 |
| 778 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, StartSession) { | 778 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, DISABLED_StartSession) { |
| 779 // Specify startup pages. | 779 // Specify startup pages. |
| 780 device_local_account_policy_.payload().mutable_restoreonstartup()->set_value( | 780 device_local_account_policy_.payload().mutable_restoreonstartup()->set_value( |
| 781 SessionStartupPref::kPrefValueURLs); | 781 SessionStartupPref::kPrefValueURLs); |
| 782 em::StringListPolicyProto* startup_urls_proto = | 782 em::StringListPolicyProto* startup_urls_proto = |
| 783 device_local_account_policy_.payload().mutable_restoreonstartupurls(); | 783 device_local_account_policy_.payload().mutable_restoreonstartupurls(); |
| 784 for (size_t i = 0; i < arraysize(kStartupURLs); ++i) | 784 for (size_t i = 0; i < arraysize(kStartupURLs); ++i) |
| 785 startup_urls_proto->mutable_value()->add_entries(kStartupURLs[i]); | 785 startup_urls_proto->mutable_value()->add_entries(kStartupURLs[i]); |
| 786 UploadAndInstallDeviceLocalAccountPolicy(); | 786 UploadAndInstallDeviceLocalAccountPolicy(); |
| 787 AddPublicSessionToDevicePolicy(kAccountId1); | 787 AddPublicSessionToDevicePolicy(kAccountId1); |
| 788 | 788 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 808 } | 808 } |
| 809 | 809 |
| 810 // Verify that the session is not considered to be logged in with a GAIA | 810 // Verify that the session is not considered to be logged in with a GAIA |
| 811 // account. | 811 // account. |
| 812 Profile* profile = GetProfileForTest(); | 812 Profile* profile = GetProfileForTest(); |
| 813 ASSERT_TRUE(profile); | 813 ASSERT_TRUE(profile); |
| 814 EXPECT_FALSE(profile->GetPrefs()->HasPrefPath( | 814 EXPECT_FALSE(profile->GetPrefs()->HasPrefPath( |
| 815 prefs::kGoogleServicesUsername)); | 815 prefs::kGoogleServicesUsername)); |
| 816 } | 816 } |
| 817 | 817 |
| 818 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, FullscreenDisallowed) { | 818 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, DISABLED_FullscreenDisallowed) { |
| 819 UploadAndInstallDeviceLocalAccountPolicy(); | 819 UploadAndInstallDeviceLocalAccountPolicy(); |
| 820 AddPublicSessionToDevicePolicy(kAccountId1); | 820 AddPublicSessionToDevicePolicy(kAccountId1); |
| 821 | 821 |
| 822 WaitForPolicy(); | 822 WaitForPolicy(); |
| 823 ASSERT_NO_FATAL_FAILURE(WaitForLoginUI()); | 823 ASSERT_NO_FATAL_FAILURE(WaitForLoginUI()); |
| 824 ASSERT_NO_FATAL_FAILURE(StartLogin(std::string(), std::string())); | 824 ASSERT_NO_FATAL_FAILURE(StartLogin(std::string(), std::string())); |
| 825 WaitForSessionStart(); | 825 WaitForSessionStart(); |
| 826 | 826 |
| 827 BrowserList* browser_list = | 827 BrowserList* browser_list = |
| 828 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH); | 828 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_ASH); |
| 829 EXPECT_EQ(1U, browser_list->size()); | 829 EXPECT_EQ(1U, browser_list->size()); |
| 830 Browser* browser = browser_list->get(0); | 830 Browser* browser = browser_list->get(0); |
| 831 ASSERT_TRUE(browser); | 831 ASSERT_TRUE(browser); |
| 832 BrowserWindow* browser_window = browser->window(); | 832 BrowserWindow* browser_window = browser->window(); |
| 833 ASSERT_TRUE(browser_window); | 833 ASSERT_TRUE(browser_window); |
| 834 | 834 |
| 835 // Verify that an attempt to enter fullscreen mode is denied. | 835 // Verify that an attempt to enter fullscreen mode is denied. |
| 836 EXPECT_FALSE(browser_window->IsFullscreen()); | 836 EXPECT_FALSE(browser_window->IsFullscreen()); |
| 837 chrome::ToggleFullscreenMode(browser); | 837 chrome::ToggleFullscreenMode(browser); |
| 838 EXPECT_FALSE(browser_window->IsFullscreen()); | 838 EXPECT_FALSE(browser_window->IsFullscreen()); |
| 839 } | 839 } |
| 840 | 840 |
| 841 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExtensionsUncached) { | 841 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, DISABLED_ExtensionsUncached) { |
| 842 // Make it possible to force-install a hosted app and an extension. | 842 // Make it possible to force-install a hosted app and an extension. |
| 843 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 843 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 844 TestingUpdateManifestProvider testing_update_manifest_provider( | 844 TestingUpdateManifestProvider testing_update_manifest_provider( |
| 845 kRelativeUpdateURL); | 845 kRelativeUpdateURL); |
| 846 testing_update_manifest_provider.AddUpdate( | 846 testing_update_manifest_provider.AddUpdate( |
| 847 kHostedAppID, | 847 kHostedAppID, |
| 848 kHostedAppVersion, | 848 kHostedAppVersion, |
| 849 embedded_test_server()->GetURL(std::string("/") + kHostedAppCRXPath)); | 849 embedded_test_server()->GetURL(std::string("/") + kHostedAppCRXPath)); |
| 850 testing_update_manifest_provider.AddUpdate( | 850 testing_update_manifest_provider.AddUpdate( |
| 851 kGoodExtensionID, | 851 kGoodExtensionID, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 DeviceLocalAccountPolicyBroker* broker = | 911 DeviceLocalAccountPolicyBroker* broker = |
| 912 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> | 912 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> |
| 913 GetDeviceLocalAccountPolicyService()->GetBrokerForUser(user_id_1_); | 913 GetDeviceLocalAccountPolicyService()->GetBrokerForUser(user_id_1_); |
| 914 ASSERT_TRUE(broker); | 914 ASSERT_TRUE(broker); |
| 915 chromeos::ExternalCache* cache = | 915 chromeos::ExternalCache* cache = |
| 916 broker->extension_loader()->GetExternalCacheForTesting(); | 916 broker->extension_loader()->GetExternalCacheForTesting(); |
| 917 ASSERT_TRUE(cache); | 917 ASSERT_TRUE(cache); |
| 918 EXPECT_FALSE(cache->GetExtension(kGoodExtensionID, NULL, NULL)); | 918 EXPECT_FALSE(cache->GetExtension(kGoodExtensionID, NULL, NULL)); |
| 919 } | 919 } |
| 920 | 920 |
| 921 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExtensionsCached) { | 921 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, DISABLED_ExtensionsCached) { |
| 922 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 922 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 923 | 923 |
| 924 // Pre-populate the device local account's extension cache with a hosted app | 924 // Pre-populate the device local account's extension cache with a hosted app |
| 925 // and an extension. | 925 // and an extension. |
| 926 EXPECT_TRUE(base::CreateDirectory( | 926 EXPECT_TRUE(base::CreateDirectory( |
| 927 GetExtensionCacheDirectoryForAccountID(kAccountId1))); | 927 GetExtensionCacheDirectoryForAccountID(kAccountId1))); |
| 928 base::FilePath test_dir; | 928 base::FilePath test_dir; |
| 929 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); | 929 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); |
| 930 const base::FilePath cached_hosted_app = | 930 const base::FilePath cached_hosted_app = |
| 931 GetCacheCRXFile(kAccountId1, kHostedAppID, kHostedAppVersion); | 931 GetCacheCRXFile(kAccountId1, kHostedAppID, kHostedAppVersion); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 DeviceLocalAccountPolicyBroker* broker = | 985 DeviceLocalAccountPolicyBroker* broker = |
| 986 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> | 986 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> |
| 987 GetDeviceLocalAccountPolicyService()->GetBrokerForUser(user_id_1_); | 987 GetDeviceLocalAccountPolicyService()->GetBrokerForUser(user_id_1_); |
| 988 ASSERT_TRUE(broker); | 988 ASSERT_TRUE(broker); |
| 989 chromeos::ExternalCache* cache = | 989 chromeos::ExternalCache* cache = |
| 990 broker->extension_loader()->GetExternalCacheForTesting(); | 990 broker->extension_loader()->GetExternalCacheForTesting(); |
| 991 ASSERT_TRUE(cache); | 991 ASSERT_TRUE(cache); |
| 992 EXPECT_FALSE(cache->GetExtension(kGoodExtensionID, NULL, NULL)); | 992 EXPECT_FALSE(cache->GetExtension(kGoodExtensionID, NULL, NULL)); |
| 993 } | 993 } |
| 994 | 994 |
| 995 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExternalData) { | 995 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, DISABLED_ExternalData) { |
| 996 // chromeos::UserManager requests an external data fetch whenever | 996 // chromeos::UserManager requests an external data fetch whenever |
| 997 // the key::kUserAvatarImage policy is set. Since this test wants to | 997 // the key::kUserAvatarImage policy is set. Since this test wants to |
| 998 // verify that the underlying policy subsystem will start a fetch | 998 // verify that the underlying policy subsystem will start a fetch |
| 999 // without this request as well, the chromeos::UserManager must be | 999 // without this request as well, the chromeos::UserManager must be |
| 1000 // prevented from seeing the policy change. | 1000 // prevented from seeing the policy change. |
| 1001 reinterpret_cast<chromeos::ChromeUserManager*>(chromeos::UserManager::Get()) | 1001 reinterpret_cast<chromeos::ChromeUserManager*>(chromeos::UserManager::Get()) |
| 1002 ->StopPolicyObserverForTesting(); | 1002 ->StopPolicyObserverForTesting(); |
| 1003 | 1003 |
| 1004 UploadDeviceLocalAccountPolicy(); | 1004 UploadDeviceLocalAccountPolicy(); |
| 1005 AddPublicSessionToDevicePolicy(kAccountId1); | 1005 AddPublicSessionToDevicePolicy(kAccountId1); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 | 1160 |
| 1161 scoped_ptr<gfx::ImageSkia> saved_image = | 1161 scoped_ptr<gfx::ImageSkia> saved_image = |
| 1162 chromeos::test::ImageLoader(saved_image_path).Load(); | 1162 chromeos::test::ImageLoader(saved_image_path).Load(); |
| 1163 ASSERT_TRUE(saved_image); | 1163 ASSERT_TRUE(saved_image); |
| 1164 | 1164 |
| 1165 // Check image dimensions. Images can't be compared since JPEG is lossy. | 1165 // Check image dimensions. Images can't be compared since JPEG is lossy. |
| 1166 EXPECT_EQ(policy_image->width(), saved_image->width()); | 1166 EXPECT_EQ(policy_image->width(), saved_image->width()); |
| 1167 EXPECT_EQ(policy_image->height(), saved_image->height()); | 1167 EXPECT_EQ(policy_image->height(), saved_image->height()); |
| 1168 } | 1168 } |
| 1169 | 1169 |
| 1170 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, LastWindowClosedLogoutReminder) { | 1170 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, |
| 1171 DISABLED_LastWindowClosedLogoutReminder) { |
| 1171 UploadAndInstallDeviceLocalAccountPolicy(); | 1172 UploadAndInstallDeviceLocalAccountPolicy(); |
| 1172 AddPublicSessionToDevicePolicy(kAccountId1); | 1173 AddPublicSessionToDevicePolicy(kAccountId1); |
| 1173 | 1174 |
| 1174 WaitForPolicy(); | 1175 WaitForPolicy(); |
| 1175 ASSERT_NO_FATAL_FAILURE(WaitForLoginUI()); | 1176 ASSERT_NO_FATAL_FAILURE(WaitForLoginUI()); |
| 1176 ASSERT_NO_FATAL_FAILURE(StartLogin(std::string(), std::string())); | 1177 ASSERT_NO_FATAL_FAILURE(StartLogin(std::string(), std::string())); |
| 1177 WaitForSessionStart(); | 1178 WaitForSessionStart(); |
| 1178 | 1179 |
| 1179 Profile* profile = GetProfileForTest(); | 1180 Profile* profile = GetProfileForTest(); |
| 1180 ASSERT_TRUE(profile); | 1181 ASSERT_TRUE(profile); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 ASSERT_TRUE(dialog); | 1315 ASSERT_TRUE(dialog); |
| 1315 | 1316 |
| 1316 // Deny the logout. | 1317 // Deny the logout. |
| 1317 dialog->GetWidget()->Close(); | 1318 dialog->GetWidget()->Close(); |
| 1318 dialog = NULL; | 1319 dialog = NULL; |
| 1319 base::RunLoop().RunUntilIdle(); | 1320 base::RunLoop().RunUntilIdle(); |
| 1320 | 1321 |
| 1321 app_window_registry->RemoveObserver(this); | 1322 app_window_registry->RemoveObserver(this); |
| 1322 }; | 1323 }; |
| 1323 | 1324 |
| 1324 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, DoNotSelectLanguageAndKeyboard) { | 1325 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, |
| 1326 DISABLED_DoNotSelectLanguageAndKeyboard) { |
| 1325 chromeos::input_method::InputMethodManager* input_method_manager = | 1327 chromeos::input_method::InputMethodManager* input_method_manager = |
| 1326 chromeos::input_method::InputMethodManager::Get(); | 1328 chromeos::input_method::InputMethodManager::Get(); |
| 1327 const std::string initial_locale = g_browser_process->GetApplicationLocale(); | 1329 const std::string initial_locale = g_browser_process->GetApplicationLocale(); |
| 1328 const std::string initial_input_method = | 1330 const std::string initial_input_method = |
| 1329 input_method_manager->GetCurrentInputMethod().id(); | 1331 input_method_manager->GetCurrentInputMethod().id(); |
| 1330 | 1332 |
| 1331 UploadAndInstallDeviceLocalAccountPolicy(); | 1333 UploadAndInstallDeviceLocalAccountPolicy(); |
| 1332 AddPublicSessionToDevicePolicy(kAccountId1); | 1334 AddPublicSessionToDevicePolicy(kAccountId1); |
| 1333 | 1335 |
| 1334 WaitForPolicy(); | 1336 WaitForPolicy(); |
| 1335 ASSERT_NO_FATAL_FAILURE(WaitForLoginUI()); | 1337 ASSERT_NO_FATAL_FAILURE(WaitForLoginUI()); |
| 1336 ASSERT_NO_FATAL_FAILURE(StartLogin(std::string(), std::string())); | 1338 ASSERT_NO_FATAL_FAILURE(StartLogin(std::string(), std::string())); |
| 1337 WaitForSessionStart(); | 1339 WaitForSessionStart(); |
| 1338 | 1340 |
| 1339 EXPECT_EQ(initial_locale, g_browser_process->GetApplicationLocale()); | 1341 EXPECT_EQ(initial_locale, g_browser_process->GetApplicationLocale()); |
| 1340 EXPECT_EQ(initial_input_method, | 1342 EXPECT_EQ(initial_input_method, |
| 1341 input_method_manager->GetCurrentInputMethod().id()); | 1343 input_method_manager->GetCurrentInputMethod().id()); |
| 1342 } | 1344 } |
| 1343 | 1345 |
| 1344 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, SelectLanguageAndKeyboard) { | 1346 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, |
| 1347 DISABLED_SelectLanguageAndKeyboard) { |
| 1345 // Specify startup pages. | 1348 // Specify startup pages. |
| 1346 device_local_account_policy_.payload().mutable_restoreonstartup()->set_value( | 1349 device_local_account_policy_.payload().mutable_restoreonstartup()->set_value( |
| 1347 SessionStartupPref::kPrefValueURLs); | 1350 SessionStartupPref::kPrefValueURLs); |
| 1348 em::StringListPolicyProto* startup_urls_proto = | 1351 em::StringListPolicyProto* startup_urls_proto = |
| 1349 device_local_account_policy_.payload().mutable_restoreonstartupurls(); | 1352 device_local_account_policy_.payload().mutable_restoreonstartupurls(); |
| 1350 for (size_t i = 0; i < arraysize(kStartupURLs); ++i) | 1353 for (size_t i = 0; i < arraysize(kStartupURLs); ++i) |
| 1351 startup_urls_proto->mutable_value()->add_entries(kStartupURLs[i]); | 1354 startup_urls_proto->mutable_value()->add_entries(kStartupURLs[i]); |
| 1352 UploadAndInstallDeviceLocalAccountPolicy(); | 1355 UploadAndInstallDeviceLocalAccountPolicy(); |
| 1353 AddPublicSessionToDevicePolicy(kAccountId1); | 1356 AddPublicSessionToDevicePolicy(kAccountId1); |
| 1354 | 1357 |
| 1355 // Log in to the device-local account with a specific locale and keyboard | 1358 // Log in to the device-local account with a specific locale and keyboard |
| 1356 // layout. | 1359 // layout. |
| 1357 WaitForPolicy(); | 1360 WaitForPolicy(); |
| 1358 ASSERT_NO_FATAL_FAILURE(WaitForLoginUI()); | 1361 ASSERT_NO_FATAL_FAILURE(WaitForLoginUI()); |
| 1359 ASSERT_NO_FATAL_FAILURE( | 1362 ASSERT_NO_FATAL_FAILURE( |
| 1360 StartLogin(kPublicSessionLocale, public_session_input_method_id_)); | 1363 StartLogin(kPublicSessionLocale, public_session_input_method_id_)); |
| 1361 WaitForSessionStart(); | 1364 WaitForSessionStart(); |
| 1362 | 1365 |
| 1363 // Verify that the locale and keyboard layout have been applied. | 1366 // Verify that the locale and keyboard layout have been applied. |
| 1364 EXPECT_EQ(kPublicSessionLocale, g_browser_process->GetApplicationLocale()); | 1367 EXPECT_EQ(kPublicSessionLocale, g_browser_process->GetApplicationLocale()); |
| 1365 EXPECT_EQ(public_session_input_method_id_, | 1368 EXPECT_EQ(public_session_input_method_id_, |
| 1366 chromeos::input_method::InputMethodManager::Get()-> | 1369 chromeos::input_method::InputMethodManager::Get()-> |
| 1367 GetCurrentInputMethod().id()); | 1370 GetCurrentInputMethod().id()); |
| 1368 } | 1371 } |
| 1369 | 1372 |
| 1370 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, | 1373 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, |
| 1371 SelectLanguageAndKeyboardWithTermsOfService) { | 1374 DISABLED_SelectLanguageAndKeyboardWithTermsOfService) { |
| 1372 // Specify Terms of Service URL. | 1375 // Specify Terms of Service URL. |
| 1373 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 1376 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 1374 device_local_account_policy_.payload().mutable_termsofserviceurl()->set_value( | 1377 device_local_account_policy_.payload().mutable_termsofserviceurl()->set_value( |
| 1375 embedded_test_server()->GetURL( | 1378 embedded_test_server()->GetURL( |
| 1376 std::string("/") + kExistentTermsOfServicePath).spec()); | 1379 std::string("/") + kExistentTermsOfServicePath).spec()); |
| 1377 UploadAndInstallDeviceLocalAccountPolicy(); | 1380 UploadAndInstallDeviceLocalAccountPolicy(); |
| 1378 AddPublicSessionToDevicePolicy(kAccountId1); | 1381 AddPublicSessionToDevicePolicy(kAccountId1); |
| 1379 | 1382 |
| 1380 // Log in to the device-local account with a specific locale and keyboard | 1383 // Log in to the device-local account with a specific locale and keyboard |
| 1381 // layout. | 1384 // layout. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 EXPECT_EQ(kPublicSessionLocale, g_browser_process->GetApplicationLocale()); | 1446 EXPECT_EQ(kPublicSessionLocale, g_browser_process->GetApplicationLocale()); |
| 1444 EXPECT_EQ(public_session_input_method_id_, | 1447 EXPECT_EQ(public_session_input_method_id_, |
| 1445 chromeos::input_method::InputMethodManager::Get()-> | 1448 chromeos::input_method::InputMethodManager::Get()-> |
| 1446 GetCurrentInputMethod().id()); | 1449 GetCurrentInputMethod().id()); |
| 1447 } | 1450 } |
| 1448 | 1451 |
| 1449 class TermsOfServiceDownloadTest : public DeviceLocalAccountTest, | 1452 class TermsOfServiceDownloadTest : public DeviceLocalAccountTest, |
| 1450 public testing::WithParamInterface<bool> { | 1453 public testing::WithParamInterface<bool> { |
| 1451 }; | 1454 }; |
| 1452 | 1455 |
| 1453 IN_PROC_BROWSER_TEST_P(TermsOfServiceDownloadTest, TermsOfServiceScreen) { | 1456 IN_PROC_BROWSER_TEST_P(TermsOfServiceDownloadTest, |
| 1457 DISABLED_TermsOfServiceScreen) { |
| 1454 // Specify Terms of Service URL. | 1458 // Specify Terms of Service URL. |
| 1455 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 1459 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 1456 device_local_account_policy_.payload().mutable_termsofserviceurl()->set_value( | 1460 device_local_account_policy_.payload().mutable_termsofserviceurl()->set_value( |
| 1457 embedded_test_server()->GetURL( | 1461 embedded_test_server()->GetURL( |
| 1458 std::string("/") + | 1462 std::string("/") + |
| 1459 (GetParam() ? kExistentTermsOfServicePath | 1463 (GetParam() ? kExistentTermsOfServicePath |
| 1460 : kNonexistentTermsOfServicePath)).spec()); | 1464 : kNonexistentTermsOfServicePath)).spec()); |
| 1461 UploadAndInstallDeviceLocalAccountPolicy(); | 1465 UploadAndInstallDeviceLocalAccountPolicy(); |
| 1462 AddPublicSessionToDevicePolicy(kAccountId1); | 1466 AddPublicSessionToDevicePolicy(kAccountId1); |
| 1463 | 1467 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1573 ASSERT_TRUE(content::ExecuteScript(contents, | 1577 ASSERT_TRUE(content::ExecuteScript(contents, |
| 1574 "$('tos-accept-button').click();")); | 1578 "$('tos-accept-button').click();")); |
| 1575 | 1579 |
| 1576 WaitForSessionStart(); | 1580 WaitForSessionStart(); |
| 1577 } | 1581 } |
| 1578 | 1582 |
| 1579 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, | 1583 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, |
| 1580 TermsOfServiceDownloadTest, testing::Bool()); | 1584 TermsOfServiceDownloadTest, testing::Bool()); |
| 1581 | 1585 |
| 1582 } // namespace policy | 1586 } // namespace policy |
| OLD | NEW |