From cabc08c4296e1ce6c6d9d84cf702361cf439c1bc Mon Sep 17 00:00:00 2001 From: mtklein Date: Thu, 19 Feb 2015 08:29:24 -0800 Subject: PDF: why do we have flags no one uses (or can use)? BUG=skia: Review URL: https://codereview.chromium.org/936403002 --- tests/AnnotationTest.cpp | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'tests/AnnotationTest.cpp') diff --git a/tests/AnnotationTest.cpp b/tests/AnnotationTest.cpp index 274d53ea4f..0ba3af9e9b 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) { -- cgit v1.2.3