OLD | NEW |
(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 |
OLD | NEW |