| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/base/resource/resource_bundle.h" | 5 #include "ui/base/resource/resource_bundle.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/big_endian.h" | 8 #include "base/big_endian.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/ref_counted_memory.h" | 13 #include "base/memory/ref_counted_memory.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "grit/ui_resources.h" | |
| 17 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 19 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
| 20 #include "ui/base/layout.h" | 19 #include "ui/base/layout.h" |
| 21 #include "ui/base/resource/data_pack.h" | 20 #include "ui/base/resource/data_pack.h" |
| 22 #include "ui/gfx/codec/png_codec.h" | 21 #include "ui/gfx/codec/png_codec.h" |
| 23 #include "ui/gfx/image/image_skia.h" | 22 #include "ui/gfx/image/image_skia.h" |
| 23 #include "ui/resources/grit/ui_resources.h" |
| 24 |
| 24 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
| 25 #include "ui/gfx/win/dpi.h" | 26 #include "ui/gfx/win/dpi.h" |
| 26 #endif | 27 #endif |
| 27 | 28 |
| 28 using ::testing::_; | 29 using ::testing::_; |
| 29 using ::testing::Between; | 30 using ::testing::Between; |
| 30 using ::testing::Property; | 31 using ::testing::Property; |
| 31 using ::testing::Return; | 32 using ::testing::Return; |
| 32 using ::testing::ReturnArg; | 33 using ::testing::ReturnArg; |
| 33 | 34 |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE); | 621 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE); |
| 621 | 622 |
| 622 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); | 623 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); |
| 623 EXPECT_EQ(1u, image_skia->image_reps().size()); | 624 EXPECT_EQ(1u, image_skia->image_reps().size()); |
| 624 EXPECT_TRUE(image_skia->image_reps()[0].unscaled()); | 625 EXPECT_TRUE(image_skia->image_reps()[0].unscaled()); |
| 625 EXPECT_EQ(ui::SCALE_FACTOR_100P, | 626 EXPECT_EQ(ui::SCALE_FACTOR_100P, |
| 626 GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); | 627 GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); |
| 627 } | 628 } |
| 628 | 629 |
| 629 } // namespace ui | 630 } // namespace ui |
| OLD | NEW |