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

Side by Side Diff: tests/PDFPrimitivesTest.cpp

Issue 12754004: Update flag to reflect actual meaning. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/pdf/SkPDFStream.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 The Android Open Source Project 3 * Copyright 2010 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "Test.h" 10 #include "Test.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return false; 44 return false;
45 } 45 }
46 return memcmp(data->bytes() + offset, buffer, len) == 0; 46 return memcmp(data->bytes() + offset, buffer, len) == 0;
47 } 47 }
48 48
49 static void CheckObjectOutput(skiatest::Reporter* reporter, SkPDFObject* obj, 49 static void CheckObjectOutput(skiatest::Reporter* reporter, SkPDFObject* obj,
50 const char* expectedData, size_t expectedSize, 50 const char* expectedData, size_t expectedSize,
51 bool indirect, bool compression) { 51 bool indirect, bool compression) {
52 SkPDFDocument::Flags docFlags = (SkPDFDocument::Flags) 0; 52 SkPDFDocument::Flags docFlags = (SkPDFDocument::Flags) 0;
53 if (!compression) { 53 if (!compression) {
54 docFlags = SkTBitOr(docFlags, SkPDFDocument::kNoCompression_Flags); 54 docFlags = SkTBitOr(docFlags, SkPDFDocument::kFavorSpeedOverSize_Flags);
55 } 55 }
56 SkPDFCatalog catalog(docFlags); 56 SkPDFCatalog catalog(docFlags);
57 size_t directSize = obj->getOutputSize(&catalog, false); 57 size_t directSize = obj->getOutputSize(&catalog, false);
58 REPORTER_ASSERT(reporter, directSize == expectedSize); 58 REPORTER_ASSERT(reporter, directSize == expectedSize);
59 59
60 SkDynamicMemoryWStream buffer; 60 SkDynamicMemoryWStream buffer;
61 obj->emit(&buffer, &catalog, false); 61 obj->emit(&buffer, &catalog, false);
62 REPORTER_ASSERT(reporter, directSize == buffer.getOffset()); 62 REPORTER_ASSERT(reporter, directSize == buffer.getOffset());
63 REPORTER_ASSERT(reporter, stream_equals(buffer, 0, expectedData, 63 REPORTER_ASSERT(reporter, stream_equals(buffer, 0, expectedData,
64 directSize)); 64 directSize));
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 TestObjectRef(reporter); 322 TestObjectRef(reporter);
323 323
324 TestSubstitute(reporter); 324 TestSubstitute(reporter);
325 325
326 test_issue1083(); 326 test_issue1083();
327 } 327 }
328 328
329 #include "TestClassDef.h" 329 #include "TestClassDef.h"
330 DEFINE_TESTCLASS("PDFPrimitives", PDFPrimitivesTestClass, TestPDFPrimitives) 330 DEFINE_TESTCLASS("PDFPrimitives", PDFPrimitivesTestClass, TestPDFPrimitives)
OLDNEW
« no previous file with comments | « src/pdf/SkPDFStream.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698