Chromium Code Reviews| Index: third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoderTest.cpp |
| diff --git a/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoderTest.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..625bdf7962ac43429f5ef2d7fe335060e15c3e6a |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoderTest.cpp |
| @@ -0,0 +1,30 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "platform/image-decoders/ico/ICOImageDecoder.h" |
| + |
| +#include "platform/image-decoders/ImageDecoderTestHelpers.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace blink { |
| + |
| +namespace { |
| + |
| +PassOwnPtr<ImageDecoder> createDecoder() |
| +{ |
| + return adoptPtr(new ICOImageDecoder(ImageDecoder::AlphaNotPremultiplied, ImageDecoder::GammaAndColorProfileApplied, ImageDecoder::noDecodedImageByteLimit)); |
| +} |
| + |
| +} // anonymous namespace |
|
Peter Kasting
2016/06/08 23:16:13
Nit: I'd just remove this comment since the namesp
aleksandar.stojiljkovic
2016/06/09 20:34:07
Done.
|
| + |
| +TEST(ICOImageDecoderTests, parseAndDecodeByteByByte) |
| +{ |
| + testByteByByteDecode(&createDecoder, "/LayoutTests/fast/images/resources/2entries.ico", 2u, cAnimationNone); |
| + testByteByByteDecode(&createDecoder, "/LayoutTests/fast/events/resources/greenbox-3frames.cur", 3u, cAnimationNone); |
| + testByteByByteDecode(&createDecoder, "/LayoutTests/http/tests/favicon.ico", 1u, cAnimationNone); |
| + testByteByByteDecode(&createDecoder, "/LayoutTests/fast/images/resources/icon-without-and-bitmap.ico", 1u, cAnimationNone); |
| + testByteByByteDecode(&createDecoder, "/LayoutTests/fast/images/resources/1bit.ico", 1u, cAnimationNone); |
| +} |
| + |
| +} // namespace blink |