68 CreateAndInitializeFormPDF(
"xfa/email_recommended.pdf");
69 FORM_OnLButtonDown(form_handle(), page(), 0, 115, 58);
70 for (size_t i = 0; i < 10; ++i)
71 FORM_OnChar(form_handle(), page(),
'a' + i, 0);
74 FORM_OnLButtonDown(form_handle(), page(), 0, 128, 58);
78 ASSERT_EQ(12U, FORM_GetSelectedText(form_handle(), page(),
nullptr, 0));
82 FORM_GetSelectedText(form_handle(), page(), &buf,
sizeof(buf)));
83 EXPECT_EQ(
"defgh", GetPlatformString(buf));
92 CreateAndInitializeFormPDF(
"xfa/email_recommended.pdf");
93 FORM_OnLButtonDown(form_handle(), page(), 0, 115, 58);
94 for (size_t i = 0; i < 10; ++i)
95 FORM_OnChar(form_handle(), page(),
'a' + i, 0);
98 FORM_OnLButtonDown(form_handle(), page(), 0, 128, 58);
102 ASSERT_EQ(12U, FORM_GetSelectedText(form_handle(), page(),
nullptr, 0));
106 FORM_GetSelectedText(form_handle(), page(), &buf,
sizeof(buf)));
107 EXPECT_EQ(
"defgh", GetPlatformString(buf));
110 const char kDraggedMD5[] =
"f131526c8edd04e44de17b2647ec54c8";
112 ScopedFPDFBitmap page_bitmap =
113 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
114 CompareBitmap(page_bitmap.get(), 612, 792, kDraggedMD5);
124 CreateAndInitializeFormPDF(
"xfa/email_recommended.pdf");
125 const char kBlankMD5[] =
"8dda78a3afaf9f7b5210eb81cacc4600";
127 ScopedFPDFBitmap page_bitmap =
128 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
129 CompareBitmap(page_bitmap.get(), 612, 792, kBlankMD5);
132 FORM_OnLButtonDown(form_handle(), page(), 0, 115, 58);
133 for (size_t i = 0; i < 10; ++i)
134 FORM_OnChar(form_handle(), page(),
'a' + i, 0);
137 ScopedFPDFBitmap page_bitmap =
138 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
139 CompareBitmap(page_bitmap.get(), 612, 792, kEmailRecommendedFilledChecksum);
149 CreateAndInitializeFormPDF(
"xfa/email_recommended.pdf");
150 FORM_OnLButtonDown(form_handle(), page(), 0, 115, 58);
151 for (size_t i = 0; i < 5; ++i)
152 FORM_OnChar(form_handle(), page(),
'a' + i, 0);
153 FORM_OnChar(form_handle(), page(),
'\r', 0);
154 for (size_t i = 5; i < 10; ++i)
155 FORM_OnChar(form_handle(), page(),
'a' + i, 0);
158 ScopedFPDFBitmap page_bitmap =
159 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
160 CompareBitmap(page_bitmap.get(), 612, 792, kEmailRecommendedFilledChecksum);
166 CreateAndInitializeFormPDF(
"xfa/xfa_multiline_textfield.pdf");
167 FORM_OnLButtonDown(form_handle(), page(), 0, 115, 58);
169 for (size_t i = 0; i < 5; ++i)
170 FORM_OnChar(form_handle(), page(),
'a' + i, 0);
171 FORM_OnChar(form_handle(), page(),
'\r', 0);
172 for (size_t i = 5; i < 10; ++i)
173 FORM_OnChar(form_handle(), page(),
'a' + i, 0);
179#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
180 const char kFilledMultilineMD5[] =
"fc1f4d5fdb2c5755005fc525b0a60ec9";
182 const char kFilledMultilineMD5[] =
"a5654e027d8b1667c20f3b86d1918003";
184 ScopedFPDFBitmap page_bitmap =
185 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
186 CompareBitmap(page_bitmap.get(), 612, 792, kFilledMultilineMD5);
189 for (size_t i = 0; i < 4; ++i)
198 for (size_t i = 0; i < 2; ++i)
199 FORM_OnChar(form_handle(), page(),
'\b', 0);
204#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
205 const char kMultilineBackspaceMD5[] =
"8bb62a8100ff1e1cc113d4033e0d824e";
207 const char kMultilineBackspaceMD5[] =
"a2f1dcab92bb1fb7c2f9ccc70100c989";
209 ScopedFPDFBitmap page_bitmap =
210 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
211 CompareBitmap(page_bitmap.get(), 612, 792, kMultilineBackspaceMD5);
221 CreateAndInitializeFormPDF(
"xfa/xfa_date_time_edit.pdf");
224 FORM_OnLButtonDown(form_handle(), page(), 0, 115, 58);
225 FORM_OnLButtonUp(form_handle(), page(), 0, 115, 58);
226 const char kSelectedMD5[] =
"1036b8837a9dba75c6bd8f9347ae2eb2";
228 ScopedFPDFBitmap page_bitmap =
229 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
230 CompareBitmap(page_bitmap.get(), 612, 792, kSelectedMD5);
234 FORM_OnLButtonDown(form_handle(), page(), 0, 446, 54);
235 FORM_OnLButtonUp(form_handle(), page(), 0, 446, 54);
237 ScopedFPDFBitmap page_bitmap =
238 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
246 FORM_OnLButtonDown(form_handle(), page(), 0, 100, 162);
247 FORM_OnLButtonUp(form_handle(), page(), 0, 100, 162);
249 ScopedFPDFBitmap page_bitmap =
250 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
259 CreateAndInitializeFormPDF(
"xfa/xfa_image_edit.pdf");
260 FORM_OnLButtonDown(form_handle(), page(), 0, 115, 58);
261 const char* filled_checksum = []() {
263 return "23658ed124114f05518372d41c80e41b";
265 return "101cf6223fa2403fba4c413a8310ab02";
267 ScopedFPDFBitmap page_bitmap = RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
268 CompareBitmap(page_bitmap.get(), 612, 792, filled_checksum);
272 CreateAndInitializeFormPDF(
"xfa/xfa_combobox.pdf");
275 FORM_OnLButtonDown(form_handle(), page(), 0, 115, 58);
276 FORM_OnLButtonUp(form_handle(), page(), 0, 115, 58);
278 const char* filled_checksum = []() {
280 return "8c555487e09ee4acf3ace77db5929bdc";
282 return "dad642ae8a5afce2591ffbcabbfc58dd";
284 ScopedFPDFBitmap page_bitmap =
285 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
286 CompareBitmap(page_bitmap.get(), 612, 792, filled_checksum);
290 FORM_OnLButtonDown(form_handle(), page(), 0, 438, 53);
291 FORM_OnLButtonUp(form_handle(), page(), 0, 438, 53);
293 ScopedFPDFBitmap page_bitmap =
294 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
301 FORM_OnMouseMove(form_handle(), page(), 0, 253, 107);
303 ScopedFPDFBitmap page_bitmap =
304 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);
311 FORM_OnLButtonDown(form_handle(), page(), 0, 253, 107);
312 FORM_OnLButtonUp(form_handle(), page(), 0, 253, 107);
314 ScopedFPDFBitmap page_bitmap =
315 RenderLoadedPageWithFlags(page(),
FPDF_ANNOT);