Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: tests/PDFPrimitivesTest.cpp

Issue 933523007: zlib/pdf: remove HaveFlate(), depend on preprocessor defines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-02-17 (Tuesday) 17:35:15 EST Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/FlateTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PDFPrimitivesTest.cpp
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 7cc010f7c1532e2d386892a4f57407ec52cd5652..8dbde65b3cc801d69123003b34d7a21cbcf2a05b 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) {
« no previous file with comments | « tests/FlateTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698