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" | |
10 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.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 "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
19 #include "ui/base/layout.h" | 19 #include "ui/base/layout.h" |
20 #include "ui/base/resource/data_pack.h" | 20 #include "ui/base/resource/data_pack.h" |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE); | 621 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE); |
622 | 622 |
623 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); | 623 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); |
624 EXPECT_EQ(1u, image_skia->image_reps().size()); | 624 EXPECT_EQ(1u, image_skia->image_reps().size()); |
625 EXPECT_TRUE(image_skia->image_reps()[0].unscaled()); | 625 EXPECT_TRUE(image_skia->image_reps()[0].unscaled()); |
626 EXPECT_EQ(ui::SCALE_FACTOR_100P, | 626 EXPECT_EQ(ui::SCALE_FACTOR_100P, |
627 GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); | 627 GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); |
628 } | 628 } |
629 | 629 |
630 } // namespace ui | 630 } // namespace ui |
OLD | NEW |