OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 #import <QuartzCore/QuartzCore.h> | 5 #import <QuartzCore/QuartzCore.h> |
| 6 #include <stddef.h> |
6 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
7 | 8 |
8 #include "base/logging.h" | 9 #include "base/logging.h" |
9 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
| 11 #include "base/macros.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "ui/gfx/image/image.h" | 13 #include "ui/gfx/image/image.h" |
12 #include "ui/gfx/image/image_skia.h" | 14 #include "ui/gfx/image/image_skia.h" |
13 | 15 |
14 namespace { | 16 namespace { |
15 | 17 |
16 // Helper function to return a UIImage with the given size and scale. | 18 // Helper function to return a UIImage with the given size and scale. |
17 UIImage* UIImageWithSizeAndScale(CGFloat width, CGFloat height, CGFloat scale) { | 19 UIImage* UIImageWithSizeAndScale(CGFloat width, CGFloat height, CGFloat scale) { |
18 CGSize target_size = CGSizeMake(width * scale, height * scale); | 20 CGSize target_size = CGSizeMake(width * scale, height * scale); |
19 | 21 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 EXPECT_EQ(kWidth, imageskia->width()); | 102 EXPECT_EQ(kWidth, imageskia->width()); |
101 EXPECT_EQ(kHeight, imageskia->height()); | 103 EXPECT_EQ(kHeight, imageskia->height()); |
102 | 104 |
103 // TODO(rohitrao): Convert from ImageSkia back to UIImage. This should | 105 // TODO(rohitrao): Convert from ImageSkia back to UIImage. This should |
104 // scale the image based on the current set of supported scales. | 106 // scale the image based on the current set of supported scales. |
105 } | 107 } |
106 } | 108 } |
107 } | 109 } |
108 | 110 |
109 } // namespace | 111 } // namespace |
OLD | NEW |