Enable FPDFAnnotEmbedderTest.RenderMultilineMarkupAnnotWithoutAP for Skia. When rendering annotation_markup_multiline_no_ap.pdf, Skia's rendering result is different from AGG's due to Skia and AGG handle anti-aliasing on drawing paths differently. Once anti-aliasing is turned off, Skia and AGG have almost the same rendering results (At scale 1, Skia is more consistent on rendering the wavy underlines. And at larger scale, Skia's result matches AGG's perfectly.). Since skia's rendering result for this embedder test is acceptable, this CL adds the expected result for Skia so that this test can be enabled. Bug: pdfium:1500 Change-Id: If5cb72eef8ba2a38932adc899a56474c07478db9 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/70914 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Hui Yingst <nigi@chromium.org>
diff --git a/fpdfsdk/fpdf_annot_embeddertest.cpp b/fpdfsdk/fpdf_annot_embeddertest.cpp index c1917a6..7d1301a 100644 --- a/fpdfsdk/fpdf_annot_embeddertest.cpp +++ b/fpdfsdk/fpdf_annot_embeddertest.cpp
@@ -403,23 +403,19 @@ UnloadPage(page); } -// TODO(crbug.com/pdfium/11): Fix this test and enable. +TEST_F(FPDFAnnotEmbedderTest, RenderMultilineMarkupAnnotWithoutAP) { #if defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_) -#define MAYBE_RenderMultilineMarkupAnnotWithoutAP \ - DISABLED_RenderMultilineMarkupAnnotWithoutAP + static const char kChecksum[] = "ec1f4ccbd0aecfdea6d53893387a0101"; #else -#define MAYBE_RenderMultilineMarkupAnnotWithoutAP \ - RenderMultilineMarkupAnnotWithoutAP + static const char kChecksum[] = "76512832d88017668d9acc7aacd13dae"; #endif -TEST_F(FPDFAnnotEmbedderTest, MAYBE_RenderMultilineMarkupAnnotWithoutAP) { - static const char kMd5[] = "76512832d88017668d9acc7aacd13dae"; // Open a file with multiline markup annotations. ASSERT_TRUE(OpenDocument("annotation_markup_multiline_no_ap.pdf")); FPDF_PAGE page = LoadPage(0); ASSERT_TRUE(page); ScopedFPDFBitmap bitmap = RenderLoadedPageWithFlags(page, FPDF_ANNOT); - CompareBitmap(bitmap.get(), 595, 842, kMd5); + CompareBitmap(bitmap.get(), 595, 842, kChecksum); UnloadPage(page); }