|
|
Created:
4 years ago by joostouwerling Modified:
4 years ago CC:
chromium-reviews, blink-reviews Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdd 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
Committed: https://crrev.com/378e8f3d4729d64eacd3ea24bd05f4d1e11502f6
Cr-Commit-Position: refs/heads/master@{#436435}
Patch Set 1 #Patch Set 2 : Modify comments for tests #
Total comments: 8
Patch Set 3 : Improve progressive PNG decoding tests. #
Total comments: 7
Patch Set 4 : Remove testProgressiveDecodingChangesFrameBuffer and make const-correct. #
Messages
Total messages: 24 (12 generated)
Description was changed from ========== 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 the frame buffer contents change when image data is progressively provided. - 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 decoded completely. Fully receiving the frame data is not enough to be considered complete. The image that is being tested is a simple 111 by 29 pixels image created by myself. ========== to ========== 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 the frame buffer content changes when image data is progressively provided. - 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 decoded completely. Fully receiving the frame data is not enough to be considered complete. The image that is being tested is a simple 111 by 29 pixels image created by myself. ==========
Description was changed from ========== 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 the frame buffer content changes when image data is progressively provided. - 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 decoded completely. Fully receiving the frame data is not enough to be considered complete. The image that is being tested is a simple 111 by 29 pixels image created by myself. ========== to ========== 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 the frame buffer content changes when image data is progressively provided. - 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 frame data is not enough to be considered complete. The image that is being tested is a simple 111 by 29 pixels image created by myself. ==========
Description was changed from ========== 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 the frame buffer content changes when image data is progressively provided. - 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 frame data is not enough to be considered complete. The image that is being tested is a simple 111 by 29 pixels image created by myself. ========== to ========== 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 the frame buffer content changes when image data is progressively provided. - 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. ==========
joostouwerling@google.com changed reviewers: + scroggo@chromium.org
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.
On 2016/12/02 21:48:52, joostouwerling wrote: > 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. I don't have a strong preference, but I would lean towards just including this with the APNG CL, or separating the changes that only make sense with APNG and landing them with APNG. If you want to land this by itself, perhaps add this (and bug number for APNG) to the commit message? https://codereview.chromium.org/2548863002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp (right): https://codereview.chromium.org/2548863002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:76: EXPECT_NE(hashFull, hashPartial); It might be more interesting to verify that hashFull equals the hash of decoding when all the data is provided up front. https://codereview.chromium.org/2548863002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:83: void testProgressiveDecodingChangesFrameBuffer(const char* pngFile, This seems like a similar test to the one above. Do we need two separate tests? https://codereview.chromium.org/2548863002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:103: if (newHash != lastHash) { The first time through the loop, lastHash will be uninitialized. https://codereview.chromium.org/2548863002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:105: numTimesBufferChanged++; After we hit this the second time, do we really need to keep running the test? We will not do any checks that will turn out differently after that.
Description was changed from ========== 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 the frame buffer content changes when image data is progressively provided. - 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. ========== to ========== 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 the frame buffer content changes when image data is progressively provided. - 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. ==========
Description was changed from ========== 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 the frame buffer content changes when image data is progressively provided. - 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. ========== to ========== 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 the frame buffer content changes when image data is progressively provided. - 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 ==========
https://codereview.chromium.org/2548863002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp (right): https://codereview.chromium.org/2548863002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:76: EXPECT_NE(hashFull, hashPartial); On 2016/12/05 14:40:17, scroggo_chromium wrote: > It might be more interesting to verify that hashFull equals the hash of decoding > when all the data is provided up front. Done. https://codereview.chromium.org/2548863002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:83: void testProgressiveDecodingChangesFrameBuffer(const char* pngFile, On 2016/12/05 14:40:17, scroggo_chromium wrote: > This seems like a similar test to the one above. Do we need two separate tests? They're somewhat similar, but especially with the new changes, I'd opt to keep it there. It now verifies that the frame bitmap changes for every row, which is what you'd expect when decoding it pixel by pixel. https://codereview.chromium.org/2548863002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:103: if (newHash != lastHash) { On 2016/12/05 14:40:17, scroggo_chromium wrote: > The first time through the loop, lastHash will be uninitialized. Done. https://codereview.chromium.org/2548863002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:105: numTimesBufferChanged++; On 2016/12/05 14:40:17, scroggo_chromium wrote: > After we hit this the second time, do we really need to keep running the test? > We will not do any checks that will turn out differently after that. I changed it to check whether it changes for every row.
joostouwerling@google.com changed reviewers: + thakis@chromium.org
Adding thakis@ for BUILD.gn
https://codereview.chromium.org/2548863002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp (right): https://codereview.chromium.org/2548863002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:104: size_t frameRectRows = frame->originalFrameRect().height(); nit: could be const. https://codereview.chromium.org/2548863002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:122: // This makes sure we don't count going from "nothing" to an empty frame. I don't think that the concern is that we count it. The concern is that we compare to an uninitialized variable. https://codereview.chromium.org/2548863002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:135: EXPECT_EQ(numTimesBufferChanged, frameRectRows); This is probably true in a lot of cases (e.g. the simple PNG you run the test on), but it's not guaranteed to be true for all PNGs. Depending on how well a PNG compresses, a single byte might correspond to more than one row. (From [1]: """ the maximum zlib compression is 1:1032, so 1 byte can expand to 1032 bytes. The shortest PNG encoded (but not compressed) row is 2 bytes, so you could see another 515 complete rows after a call to png_process_data_pause, at up to 64 bytes per (transformed) row. (The byte count gets worse for longer rows; you might see an additional 65920 bytes of output row data in the limiting case of a 8240 pixel wide monochome image!) """ [1] https://sourceforge.net/p/png-mng/mailman/message/35047667/ )
https://codereview.chromium.org/2548863002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp (right): https://codereview.chromium.org/2548863002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:104: size_t frameRectRows = frame->originalFrameRect().height(); On 2016/12/05 18:41:29, scroggo_chromium wrote: > nit: could be const. Done. (and some others). https://codereview.chromium.org/2548863002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:122: // This makes sure we don't count going from "nothing" to an empty frame. On 2016/12/05 18:41:29, scroggo_chromium wrote: > I don't think that the concern is that we count it. The concern is that we > compare to an uninitialized variable. Hmm, maybe as well, but doesn't comment about uninitialized values only makes sense when you've seen the other patch? Making sure that we did not have an off by one error is important for the semantics of this test method. https://codereview.chromium.org/2548863002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:135: EXPECT_EQ(numTimesBufferChanged, frameRectRows); On 2016/12/05 18:41:29, scroggo_chromium wrote: > This is probably true in a lot of cases (e.g. the simple PNG you run the test > on), but it's not guaranteed to be true for all PNGs. Depending on how well a > PNG compresses, a single byte might correspond to more than one row. (From [1]: > > """ > the maximum zlib compression is > 1:1032, so 1 byte can expand to 1032 bytes. The shortest PNG encoded (but > not compressed) row is 2 bytes, so you could see another 515 complete rows > after a call to png_process_data_pause, at up to 64 bytes per (transformed) > row. (The byte count gets worse for longer rows; you might see an > additional 65920 bytes of output row data in the limiting case of a 8240 > pixel wide monochome image!) > """ > > [1] https://sourceforge.net/p/png-mng/mailman/message/35047667/ > ) Ah, yeah, so we can either make it a precondition that the provided image has at most one row per byte, or we omit this test. The latter is probably fine, since it is similar to testProgressiveDecodingContinuesAfterFullData, like you said. Done this in the new patch.
Description was changed from ========== 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 the frame buffer content changes when image data is progressively provided. - 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 ========== to ========== 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 ==========
lgtm https://codereview.chromium.org/2548863002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp (right): https://codereview.chromium.org/2548863002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp:122: // This makes sure we don't count going from "nothing" to an empty frame. On 2016/12/05 19:05:01, joostouwerling wrote: > On 2016/12/05 18:41:29, scroggo_chromium wrote: > > I don't think that the concern is that we count it. The concern is that we > > compare to an uninitialized variable. > > Hmm, maybe as well, but doesn't comment about uninitialized values only makes > sense when you've seen the other patch? I don't think so. It explains why the variable frameSeen exists at all. > Making sure that we did not have an off > by one error is important for the semantics of this test method.
build.gn lgtm
The CQ bit was checked by joostouwerling@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1480969658248150, "parent_rev": "9ca5889adebde4f81a454b6c63132ae1c7a4d1fe", "commit_rev": "2b8fc5ff0adf97b35f0174365461bbf0be81b30f"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 Committed: https://crrev.com/378e8f3d4729d64eacd3ea24bd05f4d1e11502f6 Cr-Commit-Position: refs/heads/master@{#436435} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/378e8f3d4729d64eacd3ea24bd05f4d1e11502f6 Cr-Commit-Position: refs/heads/master@{#436435} |