Skip to content

Commit 62d9ee4

Browse files
ars18wrwLodrKumquat
authored andcommitted
Add a new test related to plain text processing
DEVSIX-2092
1 parent a770502 commit 62d9ee4

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public void br03Test() throws IOException, InterruptedException {
9393
}
9494

9595
@Test
96+
// TODO DEVSIX-2092
9697
public void brInsideDifferentTagsTest01() throws IOException, InterruptedException {
9798
HtmlConverter.convertToPdf(new File(sourceFolder + "brInsideDifferentTagsTest01.html"), new File(destinationFolder + "brInsideDifferentTagsTest01.pdf"));
9899
Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "brInsideDifferentTagsTest01.pdf", sourceFolder + "cmp_brInsideDifferentTagsTest01.pdf", destinationFolder, "diff04_"));

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,12 @@ public void thScopeNotTaggedDifferentTablesTest() throws IOException, Interrupte
364364
runConvertToElements("thTagScopeNotTaggedDifferentTables", false);
365365
}
366366

367+
@Test
368+
// TODO DEVSIX-2092
369+
public void plainTextTest() throws IOException, InterruptedException {
370+
runConvertToElements("plainTextTest", false);
371+
}
372+
367373
private void runTest(String testName) throws IOException, InterruptedException {
368374
runTest(testName, false);
369375
}
Binary file not shown.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<html>
2+
<head>
3+
<style>
4+
td {
5+
background-color: red;
6+
}
7+
table {
8+
background-color: orange;
9+
}
10+
</style>
11+
</head>
12+
<body>
13+
<table>
14+
<tr>
15+
<td>Three brs<br><br><br>inside a th</td>
16+
<span>Two brs, a paragraph and a br<br><br><p style="background-color: red">Paragraph</p><br>inside a span inside a tr</span>
17+
<td>Three brs<br><br><br>inside a th</td>
18+
</tr>
19+
Two brs, a paragraph and a br<br><br><span style="background-color: green">Span</span><br>inside a table
20+
<tr>
21+
<td>Three brs<br><br><br>inside a td</td>
22+
Two brs, a div and a br<br><br><div style="background-color: blue">Div</div><br>inside a tr
23+
<td>Three brs<br><br><br>inside a td</td>
24+
</tr>
25+
</table>
26+
</body>
27+
</html>
28+

0 commit comments

Comments
 (0)