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

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

Issue 2588713002: Upstream Chrome on iOS source code [4/11]. (Closed)
Patch Set: Created 4 years 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "ios/chrome/browser/ui/collection_view/cells/test_utils.h"
6
7 namespace ios_internal {
8
9 UIImage* CollectionViewTestImage() {
10 CGRect rect = CGRectMake(0.0, 0.0, 1.0, 1.0);
11 UIGraphicsBeginImageContext(rect.size);
12 CGContextRef context = UIGraphicsGetCurrentContext();
13
14 CGContextSetFillColorWithColor(context, [UIColor blueColor].CGColor);
15 CGContextFillRect(context, rect);
16
17 UIImage* image = UIGraphicsGetImageFromCurrentImageContext();
18 UIGraphicsEndImageContext();
19
20 return image;
21 }
22
23 } // namespace ios_internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698