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

Unified Diff: tests/Test.h

Issue 1278403006: SkPDF: clean up overuse of SK_SUPPORT_PDF (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-11 (Tuesday) 16:25:36 EDT Created 5 years, 4 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/PDFPrimitivesTest.cpp ('k') | tests/ToUnicodeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Test.h
diff --git a/tests/Test.h b/tests/Test.h
index ed5de0f8607201e818c2abdca6d436164359e787..c1e0c528fb5a0384af7677c860c42e8322f18163 100644
--- a/tests/Test.h
+++ b/tests/Test.h
@@ -102,4 +102,16 @@ typedef SkTRegistry<Test> TestRegistry;
skiatest::Test(#name, true, test_##name)); \
void test_##name(skiatest::Reporter* reporter, GrContextFactory* factory)
+#define REQUIRE_PDF_DOCUMENT(TEST_NAME, REPORTER) \
+ do { \
+ SkDynamicMemoryWStream testStream; \
+ SkAutoTUnref<SkDocument> testDoc(SkDocument::CreatePDF(&testStream)); \
+ if (!testDoc) { \
+ if ((REPORTER) && (REPORTER)->verbose()) { \
+ SkDebugf("PDF disabled; %s test skipped.", #TEST_NAME); \
+ } \
+ return; \
+ } \
+ } while (false)
+
#endif
« no previous file with comments | « tests/PDFPrimitivesTest.cpp ('k') | tests/ToUnicodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698