| 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..9e061ecc56dfac03249011e6dbc2981377ef2ae4
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoderTest.cpp
|
| @@ -0,0 +1,29 @@
|
| +// 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));
|
| +}
|
| +
|
| +}
|
| +
|
| +TEST(ICOImageDecoderTests, parseAndDecodeByteByByte)
|
| +{
|
| + testByteByByteDecode(&createDecoder, "/LayoutTests/fast/images/resources/2entries.ico", 2u, cAnimationNone);
|
| + testByteByByteDecode(&createDecoder, "/LayoutTests/fast/images/resources/greenbox-3frames.cur", 3u, 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
|
|
|