aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2016-12-30 13:09:03 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-03 14:25:12 +0000
commit43fb7a014b785960e5892cadd0bd30c10328ae8a (patch)
tree56e8e92beff152ee7c93761ad9540845c5933c6d /tests
parent34194690328b612557f06ecec99b232d41888d4b (diff)
BUILD.gn: skia_enable_pdf
BUG=skia: Change-Id: Icf616bec73e81aad97815b519566ff5b9db611e3 Reviewed-on: https://skia-review.googlesource.com/6495 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/PDFDeflateWStreamTest.cpp7
-rw-r--r--tests/PDFGlyphsToUnicodeTest.cpp7
-rw-r--r--tests/PDFJpegEmbedTest.cpp6
-rw-r--r--tests/PDFPrimitivesTest.cpp6
4 files changed, 22 insertions, 4 deletions
diff --git a/tests/PDFDeflateWStreamTest.cpp b/tests/PDFDeflateWStreamTest.cpp
index 11d237059a..dcb7547495 100644
--- a/tests/PDFDeflateWStreamTest.cpp
+++ b/tests/PDFDeflateWStreamTest.cpp
@@ -5,9 +5,12 @@
* found in the LICENSE file.
*/
+#include "Test.h"
+
+#ifdef SK_SUPPORT_PDF
+
#include "SkDeflate.h"
#include "SkRandom.h"
-#include "Test.h"
namespace {
@@ -162,3 +165,5 @@ DEF_TEST(SkPDF_DeflateWStream, r) {
SkDeflateWStream emptyDeflateWStream(nullptr);
REPORTER_ASSERT(r, !emptyDeflateWStream.writeText("FOO"));
}
+
+#endif
diff --git a/tests/PDFGlyphsToUnicodeTest.cpp b/tests/PDFGlyphsToUnicodeTest.cpp
index 0d87cd7df2..332520bfb0 100644
--- a/tests/PDFGlyphsToUnicodeTest.cpp
+++ b/tests/PDFGlyphsToUnicodeTest.cpp
@@ -5,11 +5,14 @@
* found in the LICENSE file.
*/
+#include "Test.h"
+
+#ifdef SK_SUPPORT_PDF
+
#include "SkBitSet.h"
#include "SkData.h"
#include "SkPDFMakeToUnicodeCmap.h"
#include "SkStream.h"
-#include "Test.h"
static const int kMaximumGlyphCount = SK_MaxU16 + 1;
@@ -178,3 +181,5 @@ endbfrange\n";
REPORTER_ASSERT(reporter, stream_equals(buffer2, 0, expectedResult2,
buffer2.bytesWritten()));
}
+
+#endif
diff --git a/tests/PDFJpegEmbedTest.cpp b/tests/PDFJpegEmbedTest.cpp
index 17dbac8cfa..100c9b3f11 100644
--- a/tests/PDFJpegEmbedTest.cpp
+++ b/tests/PDFJpegEmbedTest.cpp
@@ -9,7 +9,6 @@
#include "SkData.h"
#include "SkDocument.h"
#include "SkImageGenerator.h"
-#include "SkJpegInfo.h"
#include "SkStream.h"
#include "Resources.h"
@@ -80,6 +79,10 @@ DEF_TEST(SkPDF_JpegEmbedTest, r) {
REPORTER_ASSERT(r, !is_subset_of(cmykData.get(), pdfData.get()));
}
+#ifdef SK_SUPPORT_PDF
+
+#include "SkJpegInfo.h"
+
DEF_TEST(SkPDF_JpegIdentification, r) {
static struct {
const char* path;
@@ -208,3 +211,4 @@ DEF_TEST(SkPDF_JpegIdentification, r) {
REPORTER_ASSERT(r, !SkIsJFIF(data.get(), &info));
}
}
+#endif
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 81b33ba3b7..de9af07d2f 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -5,6 +5,10 @@
* found in the LICENSE file.
*/
+#include "Test.h"
+
+#ifdef SK_SUPPORT_PDF
+
#include "Resources.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
@@ -24,7 +28,6 @@
#include "SkSpecialImage.h"
#include "SkStream.h"
#include "SkTypes.h"
-#include "Test.h"
#include "sk_tool_utils.h"
#include <cstdlib>
@@ -486,3 +489,4 @@ DEF_TEST(SkPDF_Primitives_Color, reporter) {
REPORTER_ASSERT(reporter, roundTrip == i);
}
}
+#endif