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

Unified Diff: tests/CanvasTest.cpp

Issue 1279123007: SkPDF: allow PDF module to be disabled in DM and SampleApp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-11 (Tuesday) 10:04:57 EDT : #if SK_SUPPORT_PDF 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
Index: tests/CanvasTest.cpp
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index 970a37074f4124ebdda500fee94a20986bd33343..78253ac900166f590bc28aa0087af40738813ebb 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -568,6 +568,8 @@ static void TestPdfDevice(skiatest::Reporter* reporter,
CanvasTestStep* testStep) {
SkDynamicMemoryWStream outStream;
SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&outStream));
+#if SK_SUPPORT_PDF
+ REPORTER_ASSERT(reporter, doc);
SkCanvas* canvas = doc->beginPage(SkIntToScalar(d.fWidth),
SkIntToScalar(d.fHeight));
REPORTER_ASSERT(reporter, canvas);
@@ -575,6 +577,9 @@ static void TestPdfDevice(skiatest::Reporter* reporter,
testStep->draw(canvas, d, reporter);
REPORTER_ASSERT(reporter, doc->close());
+#else
+ REPORTER_ASSERT(reporter, !doc);
+#endif // SK_SUPPORT_PDF
}
// The following class groups static functions that need to access

Powered by Google App Engine
This is Rietveld 408576698