aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PDFPrimitivesTest.cpp
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-02-17 14:43:06 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-17 14:43:06 -0800
commit91d1d621de03faa41528ba2581d172f3a41104ff (patch)
treeba66b74a2625ff3765e747dfaf9e7cb59b519434 /tests/PDFPrimitivesTest.cpp
parent82079fb7aaf000591300e0662301594901d56d06 (diff)
zlib/pdf: remove HaveFlate(), depend on preprocessor defines
Diffstat (limited to 'tests/PDFPrimitivesTest.cpp')
-rw-r--r--tests/PDFPrimitivesTest.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 7cc010f7c1..8dbde65b3c 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -153,7 +153,8 @@ static void TestPDFStream(skiatest::Reporter* reporter) {
"<</Length 12\n/Attribute 42\n>> stream\n"
"Test\nFoo\tBar\nendstream");
- if (SkFlate::HaveFlate()) {
+#ifndef SK_NO_FLATE
+ {
char streamBytes2[] = "This is a longer string, so that compression "
"can do something with it. With shorter strings, "
"the short circuit logic cuts in and we end up "
@@ -187,6 +188,7 @@ static void TestPDFStream(skiatest::Reporter* reporter) {
(const char*) expectedResultData2->data(),
expectedResultData2->size(), true, true);
}
+#endif // SK_NO_FLATE
}
static void TestCatalog(skiatest::Reporter* reporter) {
@@ -283,9 +285,7 @@ static void TestUncompressed(skiatest::Reporter* reporter) {
}
static void TestFlateDecode(skiatest::Reporter* reporter) {
- if (!SkFlate::HaveFlate()) {
- return;
- }
+#ifndef SK_NO_FLATE
SkBitmap bitmap;
setup_bitmap(&bitmap, 10, 10);
TestImage(reporter, bitmap,
@@ -298,6 +298,7 @@ static void TestFlateDecode(skiatest::Reporter* reporter) {
"/Length 13\n"
">> stream",
false);
+#endif // SK_NO_FLATE
}
static void TestDCTDecode(skiatest::Reporter* reporter) {