aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/AnnotationTest.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-02-19 08:29:24 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-19 08:29:24 -0800
commitcabc08c4296e1ce6c6d9d84cf702361cf439c1bc (patch)
tree33ae47172729313ea784951a11cebe1541c4bf3a /tests/AnnotationTest.cpp
parentce07afb8fad3dd29f6d253ce83744853c10069c7 (diff)
PDF: why do we have flags no one uses (or can use)?
Diffstat (limited to 'tests/AnnotationTest.cpp')
-rw-r--r--tests/AnnotationTest.cpp25
1 files changed, 7 insertions, 18 deletions
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) {