| OLD | NEW | 
|---|
| 1 #include "Test.h" | 1 #include "Test.h" | 
| 2 #include "TestClassDef.h" | 2 #include "TestClassDef.h" | 
| 3 | 3 | 
| 4 #include "SkCanvas.h" | 4 #include "SkCanvas.h" | 
| 5 #include "SkDocument.h" | 5 #include "SkDocument.h" | 
| 6 #include "SkOSFile.h" | 6 #include "SkOSFile.h" | 
| 7 #include "SkStream.h" | 7 #include "SkStream.h" | 
| 8 | 8 | 
| 9 static void test_empty(skiatest::Reporter* reporter) { | 9 static void test_empty(skiatest::Reporter* reporter) { | 
| 10     SkDynamicMemoryWStream stream; | 10     SkDynamicMemoryWStream stream; | 
| 11 | 11 | 
| 12     SkDocument* doc = SkDocument::CreatePDF(&stream); | 12     SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&stream)); | 
| 13 | 13 | 
| 14     doc->close(); | 14     doc->close(); | 
| 15 | 15 | 
| 16     REPORTER_ASSERT(reporter, stream.bytesWritten() == 0); | 16     REPORTER_ASSERT(reporter, stream.bytesWritten() == 0); | 
| 17 } | 17 } | 
| 18 | 18 | 
| 19 static void test_abort(skiatest::Reporter* reporter) { | 19 static void test_abort(skiatest::Reporter* reporter) { | 
| 20     SkDynamicMemoryWStream stream; | 20     SkDynamicMemoryWStream stream; | 
| 21     SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&stream)); | 21     SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&stream)); | 
| 22 | 22 | 
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 97     REPORTER_ASSERT(reporter, stream.bytesWritten() != 0); | 97     REPORTER_ASSERT(reporter, stream.bytesWritten() != 0); | 
| 98 } | 98 } | 
| 99 | 99 | 
| 100 DEF_TEST(document_tests, reporter) { | 100 DEF_TEST(document_tests, reporter) { | 
| 101     test_empty(reporter); | 101     test_empty(reporter); | 
| 102     test_abort(reporter); | 102     test_abort(reporter); | 
| 103     test_abortWithFile(reporter); | 103     test_abortWithFile(reporter); | 
| 104     test_file(reporter); | 104     test_file(reporter); | 
| 105     test_close(reporter); | 105     test_close(reporter); | 
| 106 } | 106 } | 
| OLD | NEW | 
|---|