Fix FPDFAnnotEmbedderTest.AddAndModifyText for Skia.
When Skia/SkiaPaths is enabled, the rendering results have acceptable
small discrepancies on the edge of texts, which is caused by Skia uses
different font face rendering methods compared to AGG (See
http://crbug.com/pdfium/1500#c7).
This CL updates Skia/SkiaPaths expected results so that this embedder
test can pass.
Bug: pdfium:1500
Change-Id: I76ab955167fc635edce886fd6af5afbe4bf941f5
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/69850
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 1869e34..261a177 100644
--- a/fpdfsdk/fpdf_annot_embeddertest.cpp
+++ b/fpdfsdk/fpdf_annot_embeddertest.cpp
@@ -1082,23 +1082,27 @@
VerifySavedDocument(595, 842, kMd5ModifiedImage);
}
-// TODO(crbug.com/pdfium/11): Fix this test and enable.
+TEST_F(FPDFAnnotEmbedderTest, AddAndModifyText) {
#if defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
-#define MAYBE_AddAndModifyText DISABLED_AddAndModifyText
+#if defined(OS_LINUX)
+ static const char kMd5NewText[] = "c9d853a5fb6bca31e9696ccc4462c74a";
+ static const char kMd5ModifiedText[] = "bc681fa9174223983c5e4357e919d36c";
#else
-#define MAYBE_AddAndModifyText AddAndModifyText
-#endif
-TEST_F(FPDFAnnotEmbedderTest, MAYBE_AddAndModifyText) {
-#if defined(OS_MACOSX)
- static const char kMd5NewText[] = "e657266260b88c964938efe6c9b292da";
- static const char kMd5ModifiedText[] = "7accdf2bac64463101783221f53d3188";
-#elif defined(OS_WIN)
+ static const char kMd5NewText[] = "4aaa34e9df2e41d621dbd81b1d535c48";
+ static const char kMd5ModifiedText[] = "d6ea20beb7834ef4b6d370581ce425fc";
+#endif // defined(OS_LINUX)
+#else
+#if defined(OS_WIN)
static const char kMd5NewText[] = "204cc01749a70b8afc246a4ca33c7eb6";
static const char kMd5ModifiedText[] = "641261a45e8dfd68c89b80bfd237660d";
+#elif defined(OS_MACOSX)
+ static const char kMd5NewText[] = "e657266260b88c964938efe6c9b292da";
+ static const char kMd5ModifiedText[] = "7accdf2bac64463101783221f53d3188";
#else
static const char kMd5NewText[] = "00197ad6206f763febad5719e5935306";
static const char kMd5ModifiedText[] = "85853bc0aaa5a4e3af04e58b9cbfff23";
#endif
+#endif // defined(_SKIA_SUPPORT_) || defined(_SKIA_SUPPORT_PATHS_)
// Open a file with two annotations and load its first page.
ASSERT_TRUE(OpenDocument("annotation_stamp_with_ap.pdf"));