| Index: tests/AnnotationTest.cpp
|
| diff --git a/tests/AnnotationTest.cpp b/tests/AnnotationTest.cpp
|
| index 274d53ea4ff86ef1529a206c37d4a008b4692866..0ba3af9e9b84c9f4b2d150b1ccbaf4d6944d2f5f 100644
|
| --- a/tests/AnnotationTest.cpp
|
| +++ b/tests/AnnotationTest.cpp
|
| @@ -39,11 +39,6 @@ DEF_TEST(Annotation_NoDraw, reporter) {
|
| REPORTER_ASSERT(reporter, 0 == *bm.getAddr32(0, 0));
|
| }
|
|
|
| -struct testCase {
|
| - SkPDFDocument::Flags flags;
|
| - bool expectAnnotations;
|
| -};
|
| -
|
| DEF_TEST(Annotation_PdfLink, reporter) {
|
| SkISize size = SkISize::Make(612, 792);
|
| SkMatrix initialTransform;
|
| @@ -56,20 +51,14 @@ DEF_TEST(Annotation_PdfLink, reporter) {
|
| SkAutoDataUnref data(SkData::NewWithCString("http://www.gooogle.com"));
|
| SkAnnotateRectWithURL(&canvas, r, data.get());
|
|
|
| - testCase tests[] = {{(SkPDFDocument::Flags)0, true},
|
| - {SkPDFDocument::kNoLinks_Flags, false}};
|
| - for (size_t testNum = 0; testNum < SK_ARRAY_COUNT(tests); testNum++) {
|
| - SkPDFDocument doc(tests[testNum].flags);
|
| - doc.appendPage(&device);
|
| - SkDynamicMemoryWStream outStream;
|
| - doc.emitPDF(&outStream);
|
| - SkAutoDataUnref out(outStream.copyToData());
|
| - const char* rawOutput = (const char*)out->data();
|
| + SkPDFDocument doc;
|
| + doc.appendPage(&device);
|
| + SkDynamicMemoryWStream outStream;
|
| + doc.emitPDF(&outStream);
|
| + SkAutoDataUnref out(outStream.copyToData());
|
| + const char* rawOutput = (const char*)out->data();
|
|
|
| - REPORTER_ASSERT(reporter,
|
| - ContainsString(rawOutput, out->size(), "/Annots ")
|
| - == tests[testNum].expectAnnotations);
|
| - }
|
| + REPORTER_ASSERT(reporter, ContainsString(rawOutput, out->size(), "/Annots "));
|
| }
|
|
|
| DEF_TEST(Annotation_NamedDestination, reporter) {
|
|
|