| 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 }; | 664 }; |
| 665 | 665 |
| 666 IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, PRE_SetAndClear) { | 666 IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, PRE_SetAndClear) { |
| 667 RegisterUser(kTestUser1); | 667 RegisterUser(kTestUser1); |
| 668 chromeos::StartupUtils::MarkOobeCompleted(); | 668 chromeos::StartupUtils::MarkOobeCompleted(); |
| 669 } | 669 } |
| 670 | 670 |
| 671 // Verifies that the user image can be set through policy. Also verifies that | 671 // Verifies that the user image can be set through policy. Also verifies that |
| 672 // after the policy has been cleared, the user is able to choose a different | 672 // after the policy has been cleared, the user is able to choose a different |
| 673 // image. | 673 // image. |
| 674 IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, SetAndClear) { | 674 // http://crbug.com/396352 |
| 675 IN_PROC_BROWSER_TEST_F(UserImageManagerPolicyTest, DISABLED_SetAndClear) { |
| 675 const User* user = UserManager::Get()->FindUser(kTestUser1); | 676 const User* user = UserManager::Get()->FindUser(kTestUser1); |
| 676 ASSERT_TRUE(user); | 677 ASSERT_TRUE(user); |
| 677 | 678 |
| 678 LoginUser(kTestUser1); | 679 LoginUser(kTestUser1); |
| 679 base::RunLoop().RunUntilIdle(); | 680 base::RunLoop().RunUntilIdle(); |
| 680 | 681 |
| 681 policy::CloudPolicyStore* store = GetStoreForUser(user); | 682 policy::CloudPolicyStore* store = GetStoreForUser(user); |
| 682 ASSERT_TRUE(store); | 683 ASSERT_TRUE(store); |
| 683 | 684 |
| 684 // Set policy. Verify that the policy-provided user image is downloaded, set | 685 // Set policy. Verify that the policy-provided user image is downloaded, set |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 | 873 |
| 873 saved_image = test::ImageLoader(GetUserImagePath(kTestUser1, "jpg")).Load(); | 874 saved_image = test::ImageLoader(GetUserImagePath(kTestUser1, "jpg")).Load(); |
| 874 ASSERT_TRUE(saved_image); | 875 ASSERT_TRUE(saved_image); |
| 875 | 876 |
| 876 // Check image dimensions. Images can't be compared since JPEG is lossy. | 877 // Check image dimensions. Images can't be compared since JPEG is lossy. |
| 877 EXPECT_EQ(policy_image_->width(), saved_image->width()); | 878 EXPECT_EQ(policy_image_->width(), saved_image->width()); |
| 878 EXPECT_EQ(policy_image_->height(), saved_image->height()); | 879 EXPECT_EQ(policy_image_->height(), saved_image->height()); |
| 879 } | 880 } |
| 880 | 881 |
| 881 } // namespace chromeos | 882 } // namespace chromeos |
| OLD | NEW |