43 const char* checkbox_checksum = []() {
45#if BUILDFLAG(IS_APPLE)
46 return "84a527f16649880525a1a8edc6c24c16";
48 return "95fdaa000e81c80892b8d370f77be970";
51#if BUILDFLAG(IS_APPLE)
52 return "6aafcb2d98da222964bcdbf5aa1f4f1f";
54 return "594265790b81df2d93120d33b72a6ada";
58 ASSERT_TRUE(OpenDocument(
"bug_861842.pdf"));
59 FPDF_PAGE page = LoadPage(0);
62 ScopedFPDFBitmap bitmap = RenderLoadedPageWithFlags(page,
FPDF_ANNOT);
63 CompareBitmap(bitmap.get(), 100, 120, checkbox_checksum);
66 EXPECT_TRUE(FPDF_SaveAsCopy(document(),
this, 0));
71 static constexpr char kBlankPageHash[] =
"48400809c3862dae64b0cd00d51057a4";
72 VerifySavedDocument(100, 120, kBlankPageHash);
76 const char* page_checksum = []() {
79 return "1d83328d2d1ca12b9c9ea5faa62ac515";
80#elif BUILDFLAG(IS_APPLE)
81 return "3b6f937deec2d27029cbce02111dc065";
83 return "de7119d99f42deab2f4215017bdb16af";
86#if BUILDFLAG(IS_APPLE)
87 return "049ed3f1e21fc72f929af3410c64bc8f";
89 return "3db87245e3f4e37f4cb18654bbe22d97";
92 const char* flattened_page_checksum = []() {
95 return "07deccbd4a42aaf6bf45a525f0be388e";
96#elif BUILDFLAG(IS_APPLE)
97 return "f1bbe115355a2ad6d8ac34c7ff14ba75";
99 return "7978c7b3d643a5f0ac0f03ce759c55fe";
102#if BUILDFLAG(IS_APPLE)
103 return "41debc60cf2a8f74c710ec6082d77b18";
105 return "0832157462ea70fbbf053e14b1d6457f";
109 ASSERT_TRUE(OpenDocument(
"bug_889099.pdf"));
110 FPDF_PAGE page = LoadPage(0);
114 ScopedFPDFBitmap bitmap = RenderLoadedPageWithFlags(page,
FPDF_ANNOT);
115 CompareBitmap(bitmap.get(), 300, 400, page_checksum);
118 EXPECT_TRUE(FPDF_SaveAsCopy(document(),
this, 0));
122 VerifySavedDocument(300, 400, flattened_page_checksum);
126 const char* checksum = []() {
128 return "793689536cf64fe792c2f241888c0cf3";
130 return "6c674642154408e877d88c6c082d67e9";
132 ASSERT_TRUE(OpenDocument(
"bug_890322.pdf"));
133 FPDF_PAGE page = LoadPage(0);
136 ScopedFPDFBitmap bitmap = RenderLoadedPageWithFlags(page,
FPDF_ANNOT);
137 CompareBitmap(bitmap.get(), 200, 200, checksum);
140 EXPECT_TRUE(FPDF_SaveAsCopy(document(),
this, 0));
144 VerifySavedDocument(200, 200, checksum);
148 const char* checksum = []() {
150 return "c3cccfadc4c5249e6aa0675e511fa4c3";
152 return "f71ab085c52c8445ae785eca3ec858b1";
154 ASSERT_TRUE(OpenDocument(
"bug_896366.pdf"));
155 FPDF_PAGE page = LoadPage(0);
158 ScopedFPDFBitmap bitmap = RenderLoadedPageWithFlags(page,
FPDF_ANNOT);
159 CompareBitmap(bitmap.get(), 612, 792, checksum);
162 EXPECT_TRUE(FPDF_SaveAsCopy(document(),
this, 0));
166 VerifySavedDocument(612, 792, checksum);