Add a basic test suite for PNGImageDecoder.

Add the following tests for PNGImageDecoder:
- Verify that the repetition count is cAnimationNone.
- Verify that the image size is decoded correctly.
- Verify that the decoded frame count is 1, and that the frame duration
  is 0.
- Verify that progressively providing the image data yields the same
  frame buffer hashes as when the data is provided in a truncated form.
- Verify that progressive decoding can completely decode the image when
  at first half of the image data is provided and the image is partially
  decoded, and then the rest of the image data is provided. It verifies
  that the content of the intermediate and final frame are different.
- Verify that the decoder is invalidated when invalid image data is
  provided.
- Verify that frameIsCompleteAtIndex() returns true if and only if the
  frame is completely decoded. Fully receiving the image data is not
  enough to be considered complete for static PNGs.

The image that is being tested is a simple 111 by 29 pixels image
created by myself.

As an additional note here - some of these tests are a little awkward when this
CL is viewed in isolation, with e.g. separate functions for tests which allow
more configuration than necessary. This is done so they can be reused for APNG
tests, which is currently in development in crrev.com/2386453003.

BUG=437662

Review-Url: https://codereview.chromium.org/2548863002
Cr-Commit-Position: refs/heads/master@{#436435}
3 files changed