| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 } | 509 } |
| 510 | 510 |
| 511 IN_PROC_BROWSER_TEST_F(UserImageManagerTest, | 511 IN_PROC_BROWSER_TEST_F(UserImageManagerTest, |
| 512 PRE_SaveUserImageFromProfileImage) { | 512 PRE_SaveUserImageFromProfileImage) { |
| 513 RegisterUser(kTestUser1); | 513 RegisterUser(kTestUser1); |
| 514 chromeos::StartupUtils::MarkOobeCompleted(); | 514 chromeos::StartupUtils::MarkOobeCompleted(); |
| 515 } | 515 } |
| 516 | 516 |
| 517 // Verifies that SaveUserImageFromProfileImage() correctly downloads, sets and | 517 // Verifies that SaveUserImageFromProfileImage() correctly downloads, sets and |
| 518 // persists the chosen user image. | 518 // persists the chosen user image. |
| 519 // Disabled for timeouts. https://crbug.com/423015 | 519 IN_PROC_BROWSER_TEST_F(UserImageManagerTest, SaveUserImageFromProfileImage) { |
| 520 IN_PROC_BROWSER_TEST_F(UserImageManagerTest, | |
| 521 DISABLED_SaveUserImageFromProfileImage) { | |
| 522 const user_manager::User* user = | 520 const user_manager::User* user = |
| 523 user_manager::UserManager::Get()->FindUser(kTestUser1); | 521 user_manager::UserManager::Get()->FindUser(kTestUser1); |
| 524 ASSERT_TRUE(user); | 522 ASSERT_TRUE(user); |
| 525 | 523 |
| 526 UserImageManagerImpl::IgnoreProfileDataDownloadDelayForTesting(); | 524 UserImageManagerImpl::IgnoreProfileDataDownloadDelayForTesting(); |
| 527 LoginUser(kTestUser1); | 525 LoginUser(kTestUser1); |
| 528 | 526 |
| 529 run_loop_.reset(new base::RunLoop); | 527 run_loop_.reset(new base::RunLoop); |
| 530 UserImageManager* user_image_manager = | 528 UserImageManager* user_image_manager = |
| 531 ChromeUserManager::Get()->GetUserImageManager(kTestUser1); | 529 ChromeUserManager::Get()->GetUserImageManager(kTestUser1); |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 | 885 |
| 888 saved_image = test::ImageLoader(GetUserImagePath(kTestUser1, "jpg")).Load(); | 886 saved_image = test::ImageLoader(GetUserImagePath(kTestUser1, "jpg")).Load(); |
| 889 ASSERT_TRUE(saved_image); | 887 ASSERT_TRUE(saved_image); |
| 890 | 888 |
| 891 // Check image dimensions. Images can't be compared since JPEG is lossy. | 889 // Check image dimensions. Images can't be compared since JPEG is lossy. |
| 892 EXPECT_EQ(policy_image_->width(), saved_image->width()); | 890 EXPECT_EQ(policy_image_->width(), saved_image->width()); |
| 893 EXPECT_EQ(policy_image_->height(), saved_image->height()); | 891 EXPECT_EQ(policy_image_->height(), saved_image->height()); |
| 894 } | 892 } |
| 895 | 893 |
| 896 } // namespace chromeos | 894 } // namespace chromeos |
| OLD | NEW |