Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Unified Diff: skia/ext/skia_utils_mac_unittest.mm

Issue 1398013003: mac: Make gfx_unittests and skia_unittests build with the 10.11 SDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/range/range_mac_unittest.mm » ('j') | ui/gfx/range/range_mac_unittest.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]));
« no previous file with comments | « no previous file | ui/gfx/range/range_mac_unittest.mm » ('j') | ui/gfx/range/range_mac_unittest.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698