Skip to content

Commit ccb25f9

Browse files
committed
Review all form field text drawing tests
DEVSIX-7433
1 parent e241d8d commit ccb25f9

34 files changed

+25
-4
lines changed

src/test/java/com/itextpdf/html2pdf/element/FormTest.java

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ This file is part of the iText (R) project.
2222
*/
2323
package com.itextpdf.html2pdf.element;
2424

25+
import com.itextpdf.commons.utils.ExperimentalFeatures;
2526
import com.itextpdf.forms.PdfAcroForm;
2627
import com.itextpdf.forms.logs.FormsLogMessageConstants;
2728
import com.itextpdf.html2pdf.ConverterProperties;
2829
import com.itextpdf.html2pdf.HtmlConverter;
2930
import com.itextpdf.io.util.UrlUtil;
30-
import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant;
3131
import com.itextpdf.kernel.pdf.PdfDocument;
3232
import com.itextpdf.kernel.pdf.PdfReader;
3333
import com.itextpdf.kernel.pdf.PdfWriter;
@@ -94,12 +94,26 @@ public void simpleButtonTest() throws IOException, InterruptedException {
9494

9595
@Test
9696
public void fieldsetTest() throws IOException, InterruptedException {
97-
runTest("fieldset");
97+
// TODO: DEVSIX-7423 - remove flag
98+
final boolean experimentalRenderingPreviousValue = ExperimentalFeatures.ENABLE_EXPERIMENTAL_TEXT_FORM_RENDERING;
99+
ExperimentalFeatures.ENABLE_EXPERIMENTAL_TEXT_FORM_RENDERING = false;
100+
try {
101+
runTest("fieldset");
102+
} finally {
103+
ExperimentalFeatures.ENABLE_EXPERIMENTAL_TEXT_FORM_RENDERING = experimentalRenderingPreviousValue;
104+
}
98105
}
99106

100107
@Test
101108
public void fieldsetLegendTest() throws IOException, InterruptedException {
102-
runTest("fieldsetLegend");
109+
// TODO: DEVSIX-7423 - remove flag
110+
final boolean experimentalRenderingPreviousValue = ExperimentalFeatures.ENABLE_EXPERIMENTAL_TEXT_FORM_RENDERING;
111+
ExperimentalFeatures.ENABLE_EXPERIMENTAL_TEXT_FORM_RENDERING = false;
112+
try {
113+
runTest("fieldsetLegend");
114+
} finally {
115+
ExperimentalFeatures.ENABLE_EXPERIMENTAL_TEXT_FORM_RENDERING = experimentalRenderingPreviousValue;
116+
}
103117
}
104118

105119
@Test
@@ -115,7 +129,14 @@ public void fieldInTablePercent() throws IOException, InterruptedException {
115129

116130
@Test
117131
public void inputDisplayTest() throws IOException, InterruptedException {
118-
runTest("inputDisplay");
132+
// TODO: DEVSIX-7423 - remove flag
133+
final boolean experimentalRenderingPreviousValue = ExperimentalFeatures.ENABLE_EXPERIMENTAL_TEXT_FORM_RENDERING;
134+
ExperimentalFeatures.ENABLE_EXPERIMENTAL_TEXT_FORM_RENDERING = false;
135+
try {
136+
runTest("inputDisplay");
137+
} finally {
138+
ExperimentalFeatures.ENABLE_EXPERIMENTAL_TEXT_FORM_RENDERING = experimentalRenderingPreviousValue;
139+
}
119140
}
120141

121142
@Test
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)