viewpager/src/androidTest/java/android/support/v4/testutils/TestUtils.java
public static void assertAllPixelsOfColor(String failMessagePrefix, @NonNull Drawable drawable,
            @ColorInt int color) {
        int drawableWidth = drawable.getIntrinsicWidth();
        int drawableHeight = drawable.getIntrinsicHeight();

        if ((drawableWidth <= 0) || (drawableHeight <= 0)) {
            throw new IllegalArgumentException("Drawable must be configured to have non-zero size");
        }

        assertAllPixelsOfColor(failMessagePrefix, drawable, drawableWidth, drawableHeight, color,
                false);
    }
/**
     * Checks whether all the pixels in the specified drawable are of the same specified color.
     * If the passed <code>Drawable</code> does not have positive intrinsic dimensions set, this
     * method will throw an <code>IllegalArgumentException</code>. If there is a color mismatch,
     * this method will call <code>Assert.fail</code> with detailed description of the mismatch.
     */
Checks whether all the pixels in the specified drawable are of the same specified color.
If the passed Drawable does not have positive intrinsic dimensions set, this
method will throw an IllegalArgumentException. If there is a color mismatch,
this method will call Assert.fail with detailed description of the mismatch.
Checks whether all the pixels in the specified drawable are of the same specified color . If the passed Drawable does not have positive intrinsic dimensions set this method will throw an IllegalArgumentException . If there is a color mismatch this method will call Assert . fail with detailed description of the mismatch .
public static void assertAllPixelsOfColor(String failMessagePrefix, @NonNull Drawable drawable,
            @ColorInt int color) {
        int drawableWidth = drawable.getIntrinsicWidth();
        int drawableHeight = drawable.getIntrinsicHeight();
        if ((drawableWidth <= 0) || (drawableHeight <= 0)) {
            throw new IllegalArgumentException("Drawable must be configured to have non-zero size");
        }
        assertAllPixelsOfColor(failMessagePrefix, drawable, drawableWidth, drawableHeight, color,
                false);
    }
public static void assertAllPixelsOfColor ( String failMessagePrefix , @ NonNull Drawable drawable , @ ColorInt int color ) { int drawableWidth = drawable . getIntrinsicWidth ( ) ; int drawableHeight = drawable . getIntrinsicHeight ( ) ; if ( ( drawableWidth <= 0 ) || ( drawableHeight <= 0 ) ) { throw new IllegalArgumentException ( "Drawable must be configured to have non-zero size" ) ; } assertAllPixelsOfColor ( failMessagePrefix , drawable , drawableWidth , drawableHeight , color , false ) ; }
Checks whether all the pixels in the specified drawable are of the same specified color.
Checks whether all the pixels in the specified drawable are of the same specified color .