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

Unified Diff: tests/PDFPrimitivesTest.cpp

Issue 1298243002: SkPDF/Deflate: clean up old SkFlate code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-18 (Tuesday) 16:19:01 EDT 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/PDFPrimitivesTest.cpp
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index b0b776527fca2ca10b53a5893b2b1528a8747b26..1d35c08cbb94d7a01580cc1636a55ecc919e1dec 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -99,12 +99,14 @@ static void TestPDFStream(skiatest::Reporter* reporter) {
SkAutoTUnref<SkPDFStream> stream(new SkPDFStream(streamData2.get()));
SkDynamicMemoryWStream compressedByteStream;
- SkFlate::Deflate(streamData2.get(), &compressedByteStream);
- SkAutoDataUnref compressedData(compressedByteStream.copyToData());
+ SkDeflateWStream deflateWStream(&compressedByteStream);
+ deflateWStream.write(streamBytes2, strlen(streamBytes2));
+ deflateWStream.finalize();
SkDynamicMemoryWStream expected;
expected.writeText("<</Filter /FlateDecode\n/Length 116>> stream\n");
- expected.write(compressedData->data(), compressedData->size());
+ compressedByteStream.writeToStream(&expected);
+ compressedByteStream.reset();
expected.writeText("\nendstream");
SkAutoDataUnref expectedResultData2(expected.copyToData());
SkString result = emit_to_string(*stream);
« no previous file with comments | « tests/PDFFlateTest.cpp ('k') | tests/StreamTest.cpp » ('j') | tests/StreamTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698