aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/InvalidIndexedPngTest.cpp
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-03-01 12:12:27 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-01 12:12:27 -0800
commit7f7ec206de39fde8dc490e9feb0f65322af1b989 (patch)
tree03bcf8f57a63d0c1039b853679e65cdbad613507 /tests/InvalidIndexedPngTest.cpp
parent4a98cdb7612493a062358cebd1141c9bcaa37ab1 (diff)
Fix bug in SkGifCodec / Switch SkImageDec tests to use Codec
SkImageDecoder is still used throughout tests, tools, gms etc. Deleting it from tests is an easy first step. Bonus is that we add tests of SkCodec. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1733863003 Review URL: https://codereview.chromium.org/1733863003
Diffstat (limited to 'tests/InvalidIndexedPngTest.cpp')
-rw-r--r--tests/InvalidIndexedPngTest.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/InvalidIndexedPngTest.cpp b/tests/InvalidIndexedPngTest.cpp
index 7ae99fd03c..5d9632d184 100644
--- a/tests/InvalidIndexedPngTest.cpp
+++ b/tests/InvalidIndexedPngTest.cpp
@@ -5,9 +5,8 @@
* found in the LICENSE file.
*/
+#include "CodecPriv.h"
#include "SkBitmap.h"
-#include "SkForceLinking.h"
-#include "SkImageDecoder.h"
#include "Test.h"
// A valid 1x1 indexed PNG.
@@ -30,9 +29,8 @@ unsigned char gPngData[] = {
// As a result, we do not have any REPORTER_ASSERT statements
DEF_TEST(InvalidIndexedPng, reporter) {
SkBitmap image;
- SkForceLinking(false);
// Make our PNG invalid by changing a byte.
gPngData[sizeof(gPngData) - 1] = 1;
- SkImageDecoder::DecodeMemory(gPngData, sizeof(gPngData), &image);
+ decode_memory(gPngData, sizeof(gPngData), &image);
}