Fixing stripe test

I originally thought that there was no harm in reading or skipping
zero lines after we have already reached the end of the image.

However, once we reach the end of the image, onFinish() is
automatically called.  Performing a read or a skip after
the call to onFinish() is invalid and will cause onFinish()
to be called a second time (which is also invalid).

Seems like the code requires good behavior and the test is
wrong.

BUG=skia:

Review URL: https://codereview.chromium.org/1179213002
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index c89ffd1..4598a48 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -331,15 +331,16 @@
                 }
 
                 // Skip a stripe
-                const int linesToSkip = SkTMax(0, SkTMin(stripeHeight,
-                        height - (i + 1) * stripeHeight));
-                result = decoder->skipScanlines(linesToSkip);
-                switch (result) {
-                    case SkImageGenerator::kSuccess:
-                    case SkImageGenerator::kIncompleteInput:
-                        break;
-                    default:
-                        return SkStringPrintf("Cannot skip scanlines for %s.", fPath.c_str());
+                const int linesToSkip = SkTMin(stripeHeight, height - (i + 1) * stripeHeight);
+                if (linesToSkip > 0) {
+                    result = decoder->skipScanlines(linesToSkip);
+                    switch (result) {
+                        case SkImageGenerator::kSuccess:
+                        case SkImageGenerator::kIncompleteInput:
+                            break;
+                        default:
+                            return SkStringPrintf("Cannot skip scanlines for %s.", fPath.c_str());
+                    }
                 }
             }
             canvas->drawBitmap(bitmap, 0, 0);