diff options
author | halcanary <halcanary@google.com> | 2015-08-11 13:35:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-11 13:35:12 -0700 |
commit | 2ccdb636e8618db77be8e05cdacd82c249c6898c (patch) | |
tree | 2cf6f3fc1e2dc9cdc15645415a415cf7481244cd /tests/AnnotationTest.cpp | |
parent | fcaaadee711a93d601ccc9f0b47d744e22c35205 (diff) |
SkPDF: clean up overuse of SK_SUPPORT_PDF
When possible use run-time checks (via SkDocument::CreatePDF)
When PDF is disabled, do not compile tests/PDF*.cpp
Review URL: https://codereview.chromium.org/1278403006
Diffstat (limited to 'tests/AnnotationTest.cpp')
-rw-r--r-- | tests/AnnotationTest.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/AnnotationTest.cpp b/tests/AnnotationTest.cpp index a40a5f427b..4f904bdc42 100644 --- a/tests/AnnotationTest.cpp +++ b/tests/AnnotationTest.cpp @@ -12,8 +12,6 @@ #include "SkStream.h" #include "Test.h" -#if SK_SUPPORT_PDF - /** Returns true if data (may contain null characters) contains needle (null * terminated). */ static bool ContainsString(const char* data, size_t dataSize, const char* needle) { @@ -42,6 +40,7 @@ DEF_TEST(Annotation_NoDraw, reporter) { } DEF_TEST(Annotation_PdfLink, reporter) { + REQUIRE_PDF_DOCUMENT(Annotation_PdfLink, reporter); SkDynamicMemoryWStream outStream; SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&outStream)); SkCanvas* canvas = doc->beginPage(612.0f, 792.0f); @@ -60,6 +59,7 @@ DEF_TEST(Annotation_PdfLink, reporter) { } DEF_TEST(Annotation_NamedDestination, reporter) { + REQUIRE_PDF_DOCUMENT(Annotation_NamedDestination, reporter); SkDynamicMemoryWStream outStream; SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&outStream)); SkCanvas* canvas = doc->beginPage(612.0f, 792.0f); @@ -76,4 +76,3 @@ DEF_TEST(Annotation_NamedDestination, reporter) { REPORTER_ASSERT(reporter, ContainsString(rawOutput, out->size(), "/example ")); } -#endif // SK_SUPPORT_PDF |