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

Unified Diff: tests/AnnotationTest.cpp

Issue 2206633004: Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Gotta catch 'em all. Created 4 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/AnnotationTest.cpp
diff --git a/tests/AnnotationTest.cpp b/tests/AnnotationTest.cpp
index 400d4887bdfef056d32ac5fc8eabf9f1d7a7d448..a4109c5e54927cbce0af8dfa738d541d05d370f8 100644
--- a/tests/AnnotationTest.cpp
+++ b/tests/AnnotationTest.cpp
@@ -31,7 +31,7 @@ DEF_TEST(Annotation_NoDraw, reporter) {
SkCanvas canvas(bm);
SkRect r = SkRect::MakeWH(SkIntToScalar(10), SkIntToScalar(10));
- SkAutoDataUnref data(SkData::NewWithCString("http://www.gooogle.com"));
+ sk_sp<SkData> data(SkData::MakeWithCString("http://www.gooogle.com"));
REPORTER_ASSERT(reporter, 0 == *bm.getAddr32(0, 0));
SkAnnotateRectWithURL(&canvas, r, data.get());
@@ -47,11 +47,11 @@ DEF_TEST(Annotation_PdfLink, reporter) {
SkRect r = SkRect::MakeXYWH(SkIntToScalar(72), SkIntToScalar(72),
SkIntToScalar(288), SkIntToScalar(72));
- SkAutoDataUnref data(SkData::NewWithCString("http://www.gooogle.com"));
+ sk_sp<SkData> data(SkData::MakeWithCString("http://www.gooogle.com"));
SkAnnotateRectWithURL(canvas, r, data.get());
REPORTER_ASSERT(reporter, doc->close());
- SkAutoDataUnref out(outStream.copyToData());
+ sk_sp<SkData> out(outStream.copyToData());
const char* rawOutput = (const char*)out->data();
REPORTER_ASSERT(reporter, ContainsString(rawOutput, out->size(), "/Annots "));
@@ -65,11 +65,11 @@ DEF_TEST(Annotation_NamedDestination, reporter) {
REPORTER_ASSERT(reporter, canvas);
SkPoint p = SkPoint::Make(SkIntToScalar(72), SkIntToScalar(72));
- SkAutoDataUnref data(SkData::NewWithCString("example"));
+ sk_sp<SkData> data(SkData::MakeWithCString("example"));
SkAnnotateNamedDestination(canvas, p, data.get());
REPORTER_ASSERT(reporter, doc->close());
- SkAutoDataUnref out(outStream.copyToData());
+ sk_sp<SkData> out(outStream.copyToData());
const char* rawOutput = (const char*)out->data();
REPORTER_ASSERT(reporter,

Powered by Google App Engine
This is Rietveld 408576698