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

Unified Diff: ui/base/test/ios/ui_image_test_utils.h

Issue 2645653003: Expose thumbnails of pages to iOS share extensions. (Closed)
Patch Set: Addressed comments. Created 3 years, 11 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
Index: ui/base/test/ios/ui_image_test_utils.h
diff --git a/ui/base/test/ios/ui_image_test_utils.h b/ui/base/test/ios/ui_image_test_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..042a2e98362fce064fa516f1c01cd25db32edd92
--- /dev/null
+++ b/ui/base/test/ios/ui_image_test_utils.h
@@ -0,0 +1,28 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_TEST_IOS_UI_IMAGE_TEST_UTILS_H_
+#define UI_BASE_TEST_IOS_UI_IMAGE_TEST_UTILS_H_
+
+#import <UIKit/UIKit.h>
+
+namespace ui {
+namespace test {
+namespace uiimage_utils {
+
+// Returns a new UIImage of size |size| with a solid color of |color|.
+UIImage* UIImageWithSizeAndSolidColor(CGSize const& size, UIColor* color);
+
+// Returns whether the pixels in |image1| are equal to the pixels in |image2|.
+// This is unlike UIImage's |isEqual:| method which only returns YES if the
+// memory backing the images is the same.
+// Limitation in the current implementation of this function: both UIImages must
+// be backed by a CGImage.
+bool UIImagesAreEqual(UIImage* image1, UIImage* image2);
+
+} // namespace uiimage_utils
+} // test
sdefresne 2017/01/26 14:50:40 // namespace test
jif 2017/01/27 11:56:11 Done.
+} // namespace ui
+
+#endif // UI_BASE_TEST_IOS_UI_IMAGE_TEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698