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

Side by Side Diff: ios/chrome/browser/ui/collection_view/cells/test_utils.mm

Issue 2742783002: [ObjC ARC] Converts ios/chrome/browser/ui/collection_view/cells:test_support to ARC. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/collection_view/cells/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/ui/collection_view/cells/test_utils.h" 5 #import "ios/chrome/browser/ui/collection_view/cells/test_utils.h"
6 6
7 #if !defined(__has_feature) || !__has_feature(objc_arc)
8 #error "This file requires ARC support."
9 #endif
10
7 namespace ios_internal { 11 namespace ios_internal {
8 12
9 UIImage* CollectionViewTestImage() { 13 UIImage* CollectionViewTestImage() {
10 CGRect rect = CGRectMake(0.0, 0.0, 1.0, 1.0); 14 CGRect rect = CGRectMake(0.0, 0.0, 1.0, 1.0);
11 UIGraphicsBeginImageContext(rect.size); 15 UIGraphicsBeginImageContext(rect.size);
12 CGContextRef context = UIGraphicsGetCurrentContext(); 16 CGContextRef context = UIGraphicsGetCurrentContext();
13 17
14 CGContextSetFillColorWithColor(context, [UIColor blueColor].CGColor); 18 CGContextSetFillColorWithColor(context, [UIColor blueColor].CGColor);
15 CGContextFillRect(context, rect); 19 CGContextFillRect(context, rect);
16 20
17 UIImage* image = UIGraphicsGetImageFromCurrentImageContext(); 21 UIImage* image = UIGraphicsGetImageFromCurrentImageContext();
18 UIGraphicsEndImageContext(); 22 UIGraphicsEndImageContext();
19 23
20 return image; 24 return image;
21 } 25 }
22 26
23 } // namespace ios_internal 27 } // namespace ios_internal
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/collection_view/cells/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698