| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| 11 #include "base/base_paths.h" | 11 #include "base/base_paths.h" |
| 12 #include "base/big_endian.h" | 12 #include "base/big_endian.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 15 #include "base/files/scoped_temp_dir.h" | 15 #include "base/files/scoped_temp_dir.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted_memory.h" | 18 #include "base/memory/ref_counted_memory.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
| 21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 23 #include "third_party/skia/include/core/SkBitmap.h" | 23 #include "third_party/skia/include/core/SkBitmap.h" |
| 24 #include "ui/base/layout.h" | 24 #include "ui/base/layout.h" |
| 25 #include "ui/base/resource/data_pack.h" | 25 #include "ui/base/resource/data_pack.h" |
| 26 #include "ui/gfx/codec/png_codec.h" | 26 #include "ui/gfx/codec/png_codec.h" |
| 27 #include "ui/gfx/font_list.h" | 27 #include "ui/gfx/font_list.h" |
| 28 #include "ui/gfx/image/image_skia.h" | 28 #include "ui/gfx/image/image_skia.h" |
| 29 #include "ui/resources/grit/ui_resources.h" | |
| 30 #include "ui/strings/grit/app_locale_settings.h" | |
| 31 | 29 |
| 32 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
| 33 #include "ui/display/win/dpi.h" | 31 #include "ui/display/win/dpi.h" |
| 34 #endif | 32 #endif |
| 35 | 33 |
| 36 using ::testing::_; | 34 using ::testing::_; |
| 37 using ::testing::Between; | 35 using ::testing::Between; |
| 38 using ::testing::Property; | 36 using ::testing::Property; |
| 39 using ::testing::Return; | 37 using ::testing::Return; |
| 40 using ::testing::ReturnArg; | 38 using ::testing::ReturnArg; |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE); | 593 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE); |
| 596 | 594 |
| 597 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); | 595 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); |
| 598 EXPECT_EQ(1u, image_skia->image_reps().size()); | 596 EXPECT_EQ(1u, image_skia->image_reps().size()); |
| 599 EXPECT_TRUE(image_skia->image_reps()[0].unscaled()); | 597 EXPECT_TRUE(image_skia->image_reps()[0].unscaled()); |
| 600 EXPECT_EQ(ui::SCALE_FACTOR_100P, | 598 EXPECT_EQ(ui::SCALE_FACTOR_100P, |
| 601 GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); | 599 GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); |
| 602 } | 600 } |
| 603 | 601 |
| 604 } // namespace ui | 602 } // namespace ui |
| OLD | NEW |