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" |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 | 572 |
573 // Create the pak files. | 573 // Create the pak files. |
574 CreateDataPackWithSingleBitmap(data_default_path, 10, base::StringPiece()); | 574 CreateDataPackWithSingleBitmap(data_default_path, 10, base::StringPiece()); |
575 | 575 |
576 // Load the regular pak files only. | 576 // Load the regular pak files only. |
577 ResourceBundle* resource_bundle = CreateResourceBundleWithEmptyLocalePak(); | 577 ResourceBundle* resource_bundle = CreateResourceBundleWithEmptyLocalePak(); |
578 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE); | 578 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE); |
579 | 579 |
580 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); | 580 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3); |
581 EXPECT_EQ(1u, image_skia->image_reps().size()); | 581 EXPECT_EQ(1u, image_skia->image_reps().size()); |
| 582 EXPECT_TRUE(image_skia->image_reps()[0].unscaled()); |
582 EXPECT_EQ(ui::SCALE_FACTOR_100P, | 583 EXPECT_EQ(ui::SCALE_FACTOR_100P, |
583 GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); | 584 GetSupportedScaleFactor(image_skia->image_reps()[0].scale())); |
584 } | 585 } |
585 | 586 |
586 } // namespace ui | 587 } // namespace ui |
OLD | NEW |