Skip to content

Commit a09e167

Browse files
committed
Add test on conversion to a tagged doc with acroform
DEVSIX-4601 Autoported commit. Original commit hash: [61935ad1]
1 parent a452b40 commit a09e167

File tree

11 files changed

+28
-5
lines changed

11 files changed

+28
-5
lines changed

itext.tests/itext.html2pdf.tests/itext/html2pdf/element/TaggedPdfFormTest.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ source product.
4444
using System.IO;
4545
using iText.Forms;
4646
using iText.Html2pdf;
47+
using iText.Kernel;
4748
using iText.Kernel.Pdf;
4849
using iText.Kernel.Utils;
4950
using iText.Test;
@@ -112,13 +113,24 @@ public virtual void SimpleRadioFormTagged() {
112113

113114
[NUnit.Framework.Test]
114115
[NUnit.Framework.Ignore("DEVSIX-980. DefaultHtmlProcessor ERROR No worker found for tag datalist")]
115-
public virtual void DatalistFormTagged() {
116-
RunTest("datalistFormTagged");
116+
public virtual void DataListFormTagged() {
117+
RunTest("dataListFormTagged");
117118
}
118119

119120
[NUnit.Framework.Test]
120-
public virtual void FieldsetFormTagged() {
121-
RunTest("fieldsetFormTagged");
121+
public virtual void FieldSetFormTagged() {
122+
RunTest("fieldSetFormTagged");
123+
}
124+
125+
[NUnit.Framework.Test]
126+
public virtual void InputFormPrematureFlush() {
127+
NUnit.Framework.Assert.That(() => {
128+
// TODO DEVSIX-4601
129+
// exception is thrown on "convert tagged PDF with acroform" stage
130+
RunTest("inputFormPrematureFlush");
131+
}
132+
, NUnit.Framework.Throws.InstanceOf<PdfException>().With.Message.EqualTo(PdfException.TagStructureFlushingFailedItMightBeCorrupted))
133+
;
122134
}
123135

124136
private void RunTest(String name) {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
</head>
5+
<body>
6+
<form>
7+
<input type="text" value="value">
8+
<div style="page-break-before: always; font-size: 250px">Many words to result in many pages. Huge font to result in many pages.</div>
9+
</form>
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)