[Skia] Enable 2 embedder tests.
Skia can render
annotation_highlight_square_with_ap.pdf correctly after change [1].
This allows us to enable more embedder tests which are using this PDF
file.
The Skia and AGG rendering results for these 2 embedder tests are
uploaded at [2] and [3].
[1] https://pdfium-review.googlesource.com/95252
[2] https://crbug.com/pdfium/1500#c105
[3] https://crbug.com/pdfium/1500#c106
Bug: pdfium:1500
Change-Id: I82c09ff94b472a40d8b3b05c570b0d517a26b5b2
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/95311
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nigi <nigi@chromium.org>
diff --git a/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp b/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp
index ca98f85..053cb9d 100644
--- a/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp
+++ b/core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp
@@ -365,22 +365,16 @@
kRectanglesChecksum);
}
-// TODO(crbug.com/pdfium/1500): When Skia is enabled, the hightlighted area is
-// not rendered. Fix this issue and enable the test.
-#if defined(_SKIA_SUPPORT_)
-#define MAYBE_RenderHighlightWithColorScheme \
- DISABLED_RenderHighlightWithColorScheme
-#else
-#define MAYBE_RenderHighlightWithColorScheme RenderHighlightWithColorScheme
-#endif
-TEST_F(FPDFProgressiveRenderEmbedderTest,
- MAYBE_RenderHighlightWithColorScheme) {
+TEST_F(FPDFProgressiveRenderEmbedderTest, RenderHighlightWithColorScheme) {
// Test rendering of highlight with forced color scheme on.
//
// Note: The fill color rendered for highlight is different from the normal
// path since highlights have Multiply blend mode, while the other path has
// Normal blend mode.
-#if defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
+#if defined(_SKIA_SUPPORT_)
+ static constexpr char kContentWithHighlightFillChecksum[] =
+ "9b6273fdbc9db780c49f7540756209f8";
+#elif defined(_SKIA_SUPPORT_PATHS_)
static constexpr char kContentWithHighlightFillChecksum[] =
"1ad601278736432e2f82ea37ab6a28ba";
#else
@@ -391,7 +385,7 @@
static constexpr char kContentWithHighlightFillChecksum[] =
"a08a0639f89446f66f3689ee8e08b9fe";
#endif // BUILDFLAG(IS_APPLE)
-#endif // defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
+#endif
ASSERT_TRUE(OpenDocument("annotation_highlight_square_with_ap.pdf"));
diff --git a/fpdfsdk/fpdf_annot_embeddertest.cpp b/fpdfsdk/fpdf_annot_embeddertest.cpp
index d138185..6e8c157 100644
--- a/fpdfsdk/fpdf_annot_embeddertest.cpp
+++ b/fpdfsdk/fpdf_annot_embeddertest.cpp
@@ -883,14 +883,13 @@
UnloadPage(page);
}
-// TODO(crbug.com/pdfium/1569): Fix this issue and enable the test for Skia.
+TEST_F(FPDFAnnotEmbedderTest, ModifyRectQuadpointsWithAP) {
#if defined(_SKIA_SUPPORT_)
-#define MAYBE_ModifyRectQuadpointsWithAP DISABLED_ModifyRectQuadpointsWithAP
-#else
-#define MAYBE_ModifyRectQuadpointsWithAP ModifyRectQuadpointsWithAP
-#endif
-TEST_F(FPDFAnnotEmbedderTest, MAYBE_ModifyRectQuadpointsWithAP) {
-#if defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
+ static const char kMd5Original[] = "0dd4c099b93d24eed9926a948ac5101c";
+ static const char kMd5ModifiedHighlight[] =
+ "92dfe7960d248635a694f43c66db7a4d";
+ static const char kMd5ModifiedSquare[] = "eb16eae7904705fa24f4ec9c1acf90c7";
+#elif defined(_SKIA_SUPPORT_PATHS_)
static const char kMd5Original[] = "127c2d3b4452555e3317827b0dbbb6a0";
static const char kMd5ModifiedHighlight[] =
"6ffe732be6f80540b60921c4803b590a";
@@ -907,7 +906,7 @@
"66f3caef3a7d488a4fa1ad37fc06310e";
static const char kMd5ModifiedSquare[] = "a456dad0bc6801ee2d6408a4394af563";
#endif // BUILDFLAG(IS_APPLE)
-#endif // defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
+#endif
// Open a file with four annotations and load its first page.
ASSERT_TRUE(OpenDocument("annotation_highlight_square_with_ap.pdf"));