Chromium Code Reviews| Index: skia/ext/skia_utils_mac_unittest.mm |
| diff --git a/skia/ext/skia_utils_mac_unittest.mm b/skia/ext/skia_utils_mac_unittest.mm |
| index ad505c71af8c4cfb3759fed9655ca38fe63b8271..1fdf774b4fc8c4151ec356ecad5f804dcb8f9d9b 100644 |
| --- a/skia/ext/skia_utils_mac_unittest.mm |
| +++ b/skia/ext/skia_utils_mac_unittest.mm |
| @@ -6,6 +6,7 @@ |
| #import <AppKit/AppKit.h> |
| +#include "base/mac/foundation_util.h" |
| #include "base/mac/scoped_nsobject.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| #include "third_party/skia/include/core/SkCanvas.h" |
| @@ -189,7 +190,9 @@ void SkiaUtilsMacTest::ShapeHelper(int width, int height, |
| EXPECT_TRUE([[image representations] count] == 1); |
| EXPECT_TRUE([[[image representations] lastObject] |
| isKindOfClass:[NSBitmapImageRep class]]); |
| - TestImageRep([[image representations] lastObject], isred); |
|
Nico
2015/10/09 17:42:04
here the compiler now realizes that the last repre
|
| + TestImageRep(base::mac::ObjCCastStrict<NSBitmapImageRep>( |
| + [[image representations] lastObject]), |
| + isred); |
| } |
| TEST_F(SkiaUtilsMacTest, BitmapToNSImage_RedSquare64x64) { |
| @@ -222,7 +225,8 @@ TEST_F(SkiaUtilsMacTest, NSImageRepToSkBitmap) { |
| NSImage* image = CreateNSImage(width, height); |
| EXPECT_EQ(1u, [[image representations] count]); |
| - NSBitmapImageRep* imageRep = [[image representations] lastObject]; |
| + NSBitmapImageRep* imageRep = base::mac::ObjCCastStrict<NSBitmapImageRep>( |
| + [[image representations] lastObject]); |
| NSColorSpace* colorSpace = [NSColorSpace genericRGBColorSpace]; |
| SkBitmap bitmap(gfx::NSImageRepToSkBitmapWithColorSpace( |
| imageRep, [image size], false, [colorSpace CGColorSpace])); |