| 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 "apps/app_window_registry.h" | 10 #include "apps/app_window_registry.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "chrome/browser/chromeos/extensions/external_cache.h" | 44 #include "chrome/browser/chromeos/extensions/external_cache.h" |
| 45 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 45 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 46 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 46 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 47 #include "chrome/browser/chromeos/login/screens/wizard_screen.h" | 47 #include "chrome/browser/chromeos/login/screens/wizard_screen.h" |
| 48 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 48 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 49 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 49 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 50 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 50 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
| 51 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h" | 51 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h" |
| 52 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" | 52 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" |
| 53 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_test_uti
l.h" | 53 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_test_uti
l.h" |
| 54 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 54 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" |
| 55 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
| 56 #include "chrome/browser/chromeos/login/wizard_controller.h" | 55 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 57 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 56 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 58 #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_u
til.h" | 57 #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_u
til.h" |
| 59 #include "chrome/browser/chromeos/policy/device_local_account.h" | 58 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 60 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" | 59 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" |
| 61 #include "chrome/browser/chromeos/policy/device_policy_builder.h" | 60 #include "chrome/browser/chromeos/policy/device_policy_builder.h" |
| 62 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" | 61 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" |
| 63 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 62 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
| 64 #include "chrome/browser/extensions/crx_installer.h" | 63 #include "chrome/browser/extensions/crx_installer.h" |
| 65 #include "chrome/browser/extensions/extension_service.h" | 64 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 96 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
| 98 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 97 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
| 99 #include "components/policy/core/common/cloud/policy_builder.h" | 98 #include "components/policy/core/common/cloud/policy_builder.h" |
| 100 #include "components/policy/core/common/external_data_fetcher.h" | 99 #include "components/policy/core/common/external_data_fetcher.h" |
| 101 #include "components/policy/core/common/policy_map.h" | 100 #include "components/policy/core/common/policy_map.h" |
| 102 #include "components/policy/core/common/policy_namespace.h" | 101 #include "components/policy/core/common/policy_namespace.h" |
| 103 #include "components/policy/core/common/policy_service.h" | 102 #include "components/policy/core/common/policy_service.h" |
| 104 #include "components/policy/core/common/policy_switches.h" | 103 #include "components/policy/core/common/policy_switches.h" |
| 105 #include "components/signin/core/common/signin_pref_names.h" | 104 #include "components/signin/core/common/signin_pref_names.h" |
| 106 #include "components/user_manager/user.h" | 105 #include "components/user_manager/user.h" |
| 106 #include "components/user_manager/user_manager.h" |
| 107 #include "components/user_manager/user_type.h" | 107 #include "components/user_manager/user_type.h" |
| 108 #include "content/public/browser/browser_thread.h" | 108 #include "content/public/browser/browser_thread.h" |
| 109 #include "content/public/browser/notification_details.h" | 109 #include "content/public/browser/notification_details.h" |
| 110 #include "content/public/browser/notification_service.h" | 110 #include "content/public/browser/notification_service.h" |
| 111 #include "content/public/browser/notification_source.h" | 111 #include "content/public/browser/notification_source.h" |
| 112 #include "content/public/browser/web_contents.h" | 112 #include "content/public/browser/web_contents.h" |
| 113 #include "content/public/browser/web_ui.h" | 113 #include "content/public/browser/web_ui.h" |
| 114 #include "content/public/test/browser_test_utils.h" | 114 #include "content/public/test/browser_test_utils.h" |
| 115 #include "content/public/test/test_utils.h" | 115 #include "content/public/test/test_utils.h" |
| 116 #include "crypto/rsa_private_key.h" | 116 #include "crypto/rsa_private_key.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 net::URLFetcherDelegate* delegate, | 367 net::URLFetcherDelegate* delegate, |
| 368 const std::string& response_data, | 368 const std::string& response_data, |
| 369 net::HttpStatusCode response_code, | 369 net::HttpStatusCode response_code, |
| 370 net::URLRequestStatus::Status status) { | 370 net::URLRequestStatus::Status status) { |
| 371 task_runner->PostTask(FROM_HERE, callback); | 371 task_runner->PostTask(FROM_HERE, callback); |
| 372 return make_scoped_ptr(new net::FakeURLFetcher( | 372 return make_scoped_ptr(new net::FakeURLFetcher( |
| 373 url, delegate, response_data, response_code, status)); | 373 url, delegate, response_data, response_code, status)); |
| 374 } | 374 } |
| 375 | 375 |
| 376 bool IsSessionStarted() { | 376 bool IsSessionStarted() { |
| 377 return chromeos::UserManager::Get()->IsSessionStarted(); | 377 return user_manager::UserManager::Get()->IsSessionStarted(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 // GetKeyboardLayoutsForLocale() posts a task to a background task runner. This | 380 // GetKeyboardLayoutsForLocale() posts a task to a background task runner. This |
| 381 // method flushes that task runner and the current thread's message loop to | 381 // method flushes that task runner and the current thread's message loop to |
| 382 // ensure that GetKeyboardLayoutsForLocale() is finished. | 382 // ensure that GetKeyboardLayoutsForLocale() is finished. |
| 383 void WaitForGetKeyboardLayoutsForLocaleToFinish() { | 383 void WaitForGetKeyboardLayoutsForLocaleToFinish() { |
| 384 base::SequencedWorkerPool* worker_pool = | 384 base::SequencedWorkerPool* worker_pool = |
| 385 content::BrowserThread::GetBlockingPool(); | 385 content::BrowserThread::GetBlockingPool(); |
| 386 scoped_refptr<base::SequencedTaskRunner> background_task_runner = | 386 scoped_refptr<base::SequencedTaskRunner> background_task_runner = |
| 387 worker_pool->GetSequencedTaskRunner( | 387 worker_pool->GetSequencedTaskRunner( |
| 388 worker_pool->GetNamedSequenceToken(kSequenceToken)); | 388 worker_pool->GetNamedSequenceToken(kSequenceToken)); |
| 389 base::RunLoop run_loop; | 389 base::RunLoop run_loop; |
| 390 background_task_runner->PostTaskAndReply(FROM_HERE, | 390 background_task_runner->PostTaskAndReply(FROM_HERE, |
| 391 base::Bind(&base::DoNothing), | 391 base::Bind(&base::DoNothing), |
| 392 run_loop.QuitClosure()); | 392 run_loop.QuitClosure()); |
| 393 run_loop.Run(); | 393 run_loop.Run(); |
| 394 base::RunLoop().RunUntilIdle(); | 394 base::RunLoop().RunUntilIdle(); |
| 395 } | 395 } |
| 396 | 396 |
| 397 } // namespace | 397 } // namespace |
| 398 | 398 |
| 399 class DeviceLocalAccountTest : public DevicePolicyCrosBrowserTest, | 399 class DeviceLocalAccountTest : public DevicePolicyCrosBrowserTest, |
| 400 public chromeos::UserManager::Observer, | 400 public user_manager::UserManager::Observer, |
| 401 public chrome::BrowserListObserver, | 401 public chrome::BrowserListObserver, |
| 402 public apps::AppWindowRegistry::Observer { | 402 public apps::AppWindowRegistry::Observer { |
| 403 protected: | 403 protected: |
| 404 DeviceLocalAccountTest() | 404 DeviceLocalAccountTest() |
| 405 : user_id_1_(GenerateDeviceLocalAccountUserId( | 405 : user_id_1_(GenerateDeviceLocalAccountUserId( |
| 406 kAccountId1, DeviceLocalAccount::TYPE_PUBLIC_SESSION)), | 406 kAccountId1, DeviceLocalAccount::TYPE_PUBLIC_SESSION)), |
| 407 user_id_2_(GenerateDeviceLocalAccountUserId( | 407 user_id_2_(GenerateDeviceLocalAccountUserId( |
| 408 kAccountId2, DeviceLocalAccount::TYPE_PUBLIC_SESSION)), | 408 kAccountId2, DeviceLocalAccount::TYPE_PUBLIC_SESSION)), |
| 409 public_session_input_method_id_(base::StringPrintf( | 409 public_session_input_method_id_(base::StringPrintf( |
| 410 kPublicSessionInputMethodIDTemplate, | 410 kPublicSessionInputMethodIDTemplate, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 | 512 |
| 513 virtual void TearDownOnMainThread() OVERRIDE { | 513 virtual void TearDownOnMainThread() OVERRIDE { |
| 514 BrowserList::RemoveObserver(this); | 514 BrowserList::RemoveObserver(this); |
| 515 | 515 |
| 516 // This shuts down the login UI. | 516 // This shuts down the login UI. |
| 517 base::MessageLoop::current()->PostTask(FROM_HERE, | 517 base::MessageLoop::current()->PostTask(FROM_HERE, |
| 518 base::Bind(&chrome::AttemptExit)); | 518 base::Bind(&chrome::AttemptExit)); |
| 519 base::RunLoop().RunUntilIdle(); | 519 base::RunLoop().RunUntilIdle(); |
| 520 } | 520 } |
| 521 | 521 |
| 522 virtual void LocalStateChanged(chromeos::UserManager* user_manager) OVERRIDE { | 522 virtual void LocalStateChanged( |
| 523 user_manager::UserManager* user_manager) OVERRIDE { |
| 523 if (run_loop_) | 524 if (run_loop_) |
| 524 run_loop_->Quit(); | 525 run_loop_->Quit(); |
| 525 } | 526 } |
| 526 | 527 |
| 527 virtual void OnBrowserRemoved(Browser* browser) OVERRIDE { | 528 virtual void OnBrowserRemoved(Browser* browser) OVERRIDE { |
| 528 if (run_loop_) | 529 if (run_loop_) |
| 529 run_loop_->Quit(); | 530 run_loop_->Quit(); |
| 530 } | 531 } |
| 531 | 532 |
| 532 virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE { | 533 virtual void OnAppWindowAdded(apps::AppWindow* app_window) OVERRIDE { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 em::DeviceLocalAccountsProto* device_local_accounts = | 603 em::DeviceLocalAccountsProto* device_local_accounts = |
| 603 proto.mutable_device_local_accounts(); | 604 proto.mutable_device_local_accounts(); |
| 604 device_local_accounts->set_auto_login_id(kAccountId1); | 605 device_local_accounts->set_auto_login_id(kAccountId1); |
| 605 device_local_accounts->set_auto_login_delay(0); | 606 device_local_accounts->set_auto_login_delay(0); |
| 606 RefreshDevicePolicy(); | 607 RefreshDevicePolicy(); |
| 607 test_server_.UpdatePolicy(dm_protocol::kChromeDevicePolicyType, | 608 test_server_.UpdatePolicy(dm_protocol::kChromeDevicePolicyType, |
| 608 std::string(), proto.SerializeAsString()); | 609 std::string(), proto.SerializeAsString()); |
| 609 } | 610 } |
| 610 | 611 |
| 611 void CheckPublicSessionPresent(const std::string& id) { | 612 void CheckPublicSessionPresent(const std::string& id) { |
| 612 const user_manager::User* user = chromeos::UserManager::Get()->FindUser(id); | 613 const user_manager::User* user = |
| 614 user_manager::UserManager::Get()->FindUser(id); |
| 613 ASSERT_TRUE(user); | 615 ASSERT_TRUE(user); |
| 614 EXPECT_EQ(id, user->email()); | 616 EXPECT_EQ(id, user->email()); |
| 615 EXPECT_EQ(user_manager::USER_TYPE_PUBLIC_ACCOUNT, user->GetType()); | 617 EXPECT_EQ(user_manager::USER_TYPE_PUBLIC_ACCOUNT, user->GetType()); |
| 616 } | 618 } |
| 617 | 619 |
| 618 base::FilePath GetExtensionCacheDirectoryForAccountID( | 620 base::FilePath GetExtensionCacheDirectoryForAccountID( |
| 619 const std::string& account_id) { | 621 const std::string& account_id) { |
| 620 base::FilePath extension_cache_root_dir; | 622 base::FilePath extension_cache_root_dir; |
| 621 if (!PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, | 623 if (!PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, |
| 622 &extension_cache_root_dir)) { | 624 &extension_cache_root_dir)) { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 UserPolicyBuilder device_local_account_policy_; | 704 UserPolicyBuilder device_local_account_policy_; |
| 703 LocalPolicyTestServer test_server_; | 705 LocalPolicyTestServer test_server_; |
| 704 | 706 |
| 705 content::WebContents* contents_; | 707 content::WebContents* contents_; |
| 706 | 708 |
| 707 private: | 709 private: |
| 708 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountTest); | 710 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountTest); |
| 709 }; | 711 }; |
| 710 | 712 |
| 711 static bool IsKnownUser(const std::string& account_id) { | 713 static bool IsKnownUser(const std::string& account_id) { |
| 712 return chromeos::UserManager::Get()->IsKnownUser(account_id); | 714 return user_manager::UserManager::Get()->IsKnownUser(account_id); |
| 713 } | 715 } |
| 714 | 716 |
| 715 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, LoginScreen) { | 717 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, LoginScreen) { |
| 716 AddPublicSessionToDevicePolicy(kAccountId1); | 718 AddPublicSessionToDevicePolicy(kAccountId1); |
| 717 AddPublicSessionToDevicePolicy(kAccountId2); | 719 AddPublicSessionToDevicePolicy(kAccountId2); |
| 718 | 720 |
| 719 content::WindowedNotificationObserver(chrome::NOTIFICATION_USER_LIST_CHANGED, | 721 content::WindowedNotificationObserver(chrome::NOTIFICATION_USER_LIST_CHANGED, |
| 720 base::Bind(&IsKnownUser, user_id_1_)) | 722 base::Bind(&IsKnownUser, user_id_1_)) |
| 721 .Wait(); | 723 .Wait(); |
| 722 EXPECT_TRUE(IsKnownUser(user_id_2_)); | 724 EXPECT_TRUE(IsKnownUser(user_id_2_)); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> | 1060 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> |
| 1059 GetDeviceLocalAccountPolicyService()->GetBrokerForUser(user_id_1_); | 1061 GetDeviceLocalAccountPolicyService()->GetBrokerForUser(user_id_1_); |
| 1060 ASSERT_TRUE(broker); | 1062 ASSERT_TRUE(broker); |
| 1061 chromeos::ExternalCache* cache = | 1063 chromeos::ExternalCache* cache = |
| 1062 broker->extension_loader()->GetExternalCacheForTesting(); | 1064 broker->extension_loader()->GetExternalCacheForTesting(); |
| 1063 ASSERT_TRUE(cache); | 1065 ASSERT_TRUE(cache); |
| 1064 EXPECT_FALSE(cache->GetExtension(kGoodExtensionID, NULL, NULL)); | 1066 EXPECT_FALSE(cache->GetExtension(kGoodExtensionID, NULL, NULL)); |
| 1065 } | 1067 } |
| 1066 | 1068 |
| 1067 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExternalData) { | 1069 IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExternalData) { |
| 1068 // chromeos::UserManager requests an external data fetch whenever | 1070 // user_manager::UserManager requests an external data fetch whenever |
| 1069 // the key::kUserAvatarImage policy is set. Since this test wants to | 1071 // the key::kUserAvatarImage policy is set. Since this test wants to |
| 1070 // verify that the underlying policy subsystem will start a fetch | 1072 // verify that the underlying policy subsystem will start a fetch |
| 1071 // without this request as well, the chromeos::UserManager must be | 1073 // without this request as well, the user_manager::UserManager must be |
| 1072 // prevented from seeing the policy change. | 1074 // prevented from seeing the policy change. |
| 1073 reinterpret_cast<chromeos::ChromeUserManager*>(chromeos::UserManager::Get()) | 1075 reinterpret_cast<chromeos::ChromeUserManagerImpl*>( |
| 1074 ->StopPolicyObserverForTesting(); | 1076 user_manager::UserManager::Get())->StopPolicyObserverForTesting(); |
| 1075 | 1077 |
| 1076 UploadDeviceLocalAccountPolicy(); | 1078 UploadDeviceLocalAccountPolicy(); |
| 1077 AddPublicSessionToDevicePolicy(kAccountId1); | 1079 AddPublicSessionToDevicePolicy(kAccountId1); |
| 1078 | 1080 |
| 1079 WaitForPolicy(); | 1081 WaitForPolicy(); |
| 1080 | 1082 |
| 1081 // Start serving external data at |kExternalDataURL|. | 1083 // Start serving external data at |kExternalDataURL|. |
| 1082 scoped_ptr<base::RunLoop> run_loop(new base::RunLoop); | 1084 scoped_ptr<base::RunLoop> run_loop(new base::RunLoop); |
| 1083 scoped_ptr<net::FakeURLFetcherFactory> fetcher_factory( | 1085 scoped_ptr<net::FakeURLFetcherFactory> fetcher_factory( |
| 1084 new net::FakeURLFetcherFactory( | 1086 new net::FakeURLFetcherFactory( |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 policy); | 1189 policy); |
| 1188 UploadAndInstallDeviceLocalAccountPolicy(); | 1190 UploadAndInstallDeviceLocalAccountPolicy(); |
| 1189 policy::BrowserPolicyConnectorChromeOS* connector = | 1191 policy::BrowserPolicyConnectorChromeOS* connector = |
| 1190 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 1192 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 1191 DeviceLocalAccountPolicyBroker* broker = | 1193 DeviceLocalAccountPolicyBroker* broker = |
| 1192 connector->GetDeviceLocalAccountPolicyService()->GetBrokerForUser( | 1194 connector->GetDeviceLocalAccountPolicyService()->GetBrokerForUser( |
| 1193 user_id_1_); | 1195 user_id_1_); |
| 1194 ASSERT_TRUE(broker); | 1196 ASSERT_TRUE(broker); |
| 1195 | 1197 |
| 1196 run_loop_.reset(new base::RunLoop); | 1198 run_loop_.reset(new base::RunLoop); |
| 1197 chromeos::UserManager::Get()->AddObserver(this); | 1199 user_manager::UserManager::Get()->AddObserver(this); |
| 1198 broker->core()->store()->Load(); | 1200 broker->core()->store()->Load(); |
| 1199 run_loop_->Run(); | 1201 run_loop_->Run(); |
| 1200 chromeos::UserManager::Get()->RemoveObserver(this); | 1202 user_manager::UserManager::Get()->RemoveObserver(this); |
| 1201 | 1203 |
| 1202 scoped_ptr<gfx::ImageSkia> policy_image = chromeos::test::ImageLoader( | 1204 scoped_ptr<gfx::ImageSkia> policy_image = chromeos::test::ImageLoader( |
| 1203 test_dir.Append(chromeos::test::kUserAvatarImage1RelativePath)).Load(); | 1205 test_dir.Append(chromeos::test::kUserAvatarImage1RelativePath)).Load(); |
| 1204 ASSERT_TRUE(policy_image); | 1206 ASSERT_TRUE(policy_image); |
| 1205 | 1207 |
| 1206 const user_manager::User* user = | 1208 const user_manager::User* user = |
| 1207 chromeos::UserManager::Get()->FindUser(user_id_1_); | 1209 user_manager::UserManager::Get()->FindUser(user_id_1_); |
| 1208 ASSERT_TRUE(user); | 1210 ASSERT_TRUE(user); |
| 1209 | 1211 |
| 1210 base::FilePath user_data_dir; | 1212 base::FilePath user_data_dir; |
| 1211 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); | 1213 ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); |
| 1212 const base::FilePath saved_image_path = | 1214 const base::FilePath saved_image_path = |
| 1213 user_data_dir.Append(user_id_1_).AddExtension("jpg"); | 1215 user_data_dir.Append(user_id_1_).AddExtension("jpg"); |
| 1214 | 1216 |
| 1215 EXPECT_FALSE(user->HasDefaultImage()); | 1217 EXPECT_FALSE(user->HasDefaultImage()); |
| 1216 EXPECT_EQ(user_manager::User::USER_IMAGE_EXTERNAL, user->image_index()); | 1218 EXPECT_EQ(user_manager::User::USER_IMAGE_EXTERNAL, user->image_index()); |
| 1217 EXPECT_TRUE(chromeos::test::AreImagesEqual(*policy_image, user->GetImage())); | 1219 EXPECT_TRUE(chromeos::test::AreImagesEqual(*policy_image, user->GetImage())); |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2012 ASSERT_TRUE(content::ExecuteScript(contents_, | 2014 ASSERT_TRUE(content::ExecuteScript(contents_, |
| 2013 "$('tos-accept-button').click();")); | 2015 "$('tos-accept-button').click();")); |
| 2014 | 2016 |
| 2015 WaitForSessionStart(); | 2017 WaitForSessionStart(); |
| 2016 } | 2018 } |
| 2017 | 2019 |
| 2018 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, | 2020 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, |
| 2019 TermsOfServiceDownloadTest, testing::Bool()); | 2021 TermsOfServiceDownloadTest, testing::Bool()); |
| 2020 | 2022 |
| 2021 } // namespace policy | 2023 } // namespace policy |
| OLD | NEW |