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

Side by Side Diff: tests/DocumentTest.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 unified diff | Download patch
OLDNEW
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
1 #include "Test.h" 7 #include "Test.h"
2 8
3 #include "SkCanvas.h" 9 #include "SkCanvas.h"
4 #include "SkDocument.h" 10 #include "SkDocument.h"
5 #include "SkOSFile.h" 11 #include "SkOSFile.h"
6 #include "SkStream.h" 12 #include "SkStream.h"
13 #if SK_SUPPORT_PDF
7 14
8 static void test_empty(skiatest::Reporter* reporter) { 15 static void test_empty(skiatest::Reporter* reporter) {
9 SkDynamicMemoryWStream stream; 16 SkDynamicMemoryWStream stream;
10 17
11 SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&stream)); 18 SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&stream));
12 19
13 doc->close(); 20 doc->close();
14 21
15 REPORTER_ASSERT(reporter, stream.bytesWritten() == 0); 22 REPORTER_ASSERT(reporter, stream.bytesWritten() == 0);
16 } 23 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 REPORTER_ASSERT(reporter, stream.bytesWritten() != 0); 103 REPORTER_ASSERT(reporter, stream.bytesWritten() != 0);
97 } 104 }
98 105
99 DEF_TEST(document_tests, reporter) { 106 DEF_TEST(document_tests, reporter) {
100 test_empty(reporter); 107 test_empty(reporter);
101 test_abort(reporter); 108 test_abort(reporter);
102 test_abortWithFile(reporter); 109 test_abortWithFile(reporter);
103 test_file(reporter); 110 test_file(reporter);
104 test_close(reporter); 111 test_close(reporter);
105 } 112 }
113 #endif // SK_SUPPORT_PDF
OLDNEW
« samplecode/SampleApp.cpp ('K') | « tests/DeflateWStream.cpp ('k') | tests/FlateTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698