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

Unified Diff: tests/PDFDocumentTest.cpp

Issue 2333713002: change SkStreams to work with sk_sp<SkData> instead of SkData* (Closed)
Patch Set: fix xpsdevice Created 4 years, 3 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
« no previous file with comments | « tests/CodecTest.cpp ('k') | tests/PDFGlyphsToUnicodeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PDFDocumentTest.cpp
diff --git a/tests/PDFDocumentTest.cpp b/tests/PDFDocumentTest.cpp
index c871375117cc13f5df2d289aeea0f3d8835b401f..afc05e49b885d5d91a7cac7c15d305cbeda7985e 100644
--- a/tests/PDFDocumentTest.cpp
+++ b/tests/PDFDocumentTest.cpp
@@ -193,8 +193,8 @@ DEF_TEST(SkPDF_pdfa_document, r) {
pdfMetadata, nullptr, /* pdfa = */ true);
doc->beginPage(64, 64)->drawColor(SK_ColorRED);
doc->close();
- sk_sp<SkData> data(buffer.copyToData());
- buffer.reset();
+ sk_sp<SkData> data(buffer.detachAsData());
+
static const char* expectations[] = {
"sRGB IEC61966-2.1",
"<dc:title><rdf:Alt><rdf:li xml:lang=\"x-default\">test document",
@@ -212,8 +212,7 @@ DEF_TEST(SkPDF_pdfa_document, r) {
pdfMetadata, nullptr, /* pdfa = */ true);
doc->beginPage(64, 64)->drawColor(SK_ColorRED);
doc->close();
- data.reset(buffer.copyToData());
- buffer.reset();
+ data = buffer.detachAsData();
static const char* moreExpectations[] = {
"/Producer (phoney library)",
« no previous file with comments | « tests/CodecTest.cpp ('k') | tests/PDFGlyphsToUnicodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698