| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/profiles/profile_info_util.h" | 5 #include "chrome/browser/profiles/profile_info_util.h" |
| 6 | 6 |
| 7 #include "grit/generated_resources.h" | 7 #include "grit/generated_resources.h" |
| 8 #include "grit/theme_resources_standard.h" | 8 #include "grit/theme_resources.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| 11 #include "ui/gfx/image/image_unittest_util.h" | 11 #include "ui/gfx/image/image_unittest_util.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 TEST(ProfileInfoUtilTest, MenuIcon) { | 15 TEST(ProfileInfoUtilTest, MenuIcon) { |
| 16 // Test that an avatar icon isn't changed. | 16 // Test that an avatar icon isn't changed. |
| 17 const gfx::Image& profile_image( | 17 const gfx::Image& profile_image( |
| 18 ResourceBundle::GetSharedInstance().GetImageNamed(IDR_PROFILE_AVATAR_0)); | 18 ResourceBundle::GetSharedInstance().GetImageNamed(IDR_PROFILE_AVATAR_0)); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 // Test that a GAIA picture is changed. | 54 // Test that a GAIA picture is changed. |
| 55 gfx::Image gaia_picture(gfx::test::CreateImage()); | 55 gfx::Image gaia_picture(gfx::test::CreateImage()); |
| 56 gfx::Image result2 = profiles::GetAvatarIconForTitleBar( | 56 gfx::Image result2 = profiles::GetAvatarIconForTitleBar( |
| 57 gaia_picture, true, 100, 40); | 57 gaia_picture, true, 100, 40); |
| 58 EXPECT_FALSE(gfx::test::IsEmpty(result2)); | 58 EXPECT_FALSE(gfx::test::IsEmpty(result2)); |
| 59 EXPECT_FALSE(gfx::test::IsEqual(gaia_picture, result2)); | 59 EXPECT_FALSE(gfx::test::IsEqual(gaia_picture, result2)); |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace | 62 } // namespace |
| OLD | NEW |