Add unit test for ImageView to take null uri in source

Summary:
This is a follow up action item from S295231 and T136039462 where we want to make sure null uri in image source is handled properly. This diff adds an unit test to make sure we are using transparent image when uri is null.

Changelog:
[Android][Internal] - Add unit test to ImageView for null uri in source

Reviewed By: javache

Differential Revision: D40732791

fbshipit-source-id: fd468bfe7c33a4f3f8913ead3e84a1770d7c907f
This commit is contained in:
Xin Chen authored and Facebook GitHub Bot committed 2022-11-01 12:11:10 -07:00
1 parent 6b8e13f53c
commit 58a1cd2367
3 files changed
+43

No files matched your search

@@ -540,6 +540,11 @@ public class ReactImageView extends GenericDraweeView {
maybeUpdateView();
}
// VisibleForTesting
public @Nullable ImageSource getImageSource() {
return mImageSource;
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);