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 |