Skip to content

Commit d652676

Browse files
committed
Add test for bug when floating element is not included in the div
DEVSIX-5291
1 parent 34a9d38 commit d652676

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

src/test/java/com/itextpdf/html2pdf/css/FloatTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,12 @@ public void plainTextIndentAfterBlockAndFloatTest() throws IOException, Interrup
707707
runTest("plainTextIndentAfterBlockAndFloat", "diff_plainTextIndentAfterBlockAndFloat_");
708708
}
709709

710+
@Test
711+
//TODO DEVSIX-5291 change cmp file
712+
public void floatElementInDivTest() throws IOException, InterruptedException {
713+
runTest("floatElementInDiv", "diff_floatElementInDiv_");
714+
}
715+
710716
private void runTest(String testName, String diff) throws IOException, InterruptedException {
711717
String htmlName = sourceFolder + testName + ".html";
712718
String outFileName = destinationFolder + testName + ".pdf";
Binary file not shown.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style>
5+
#container {
6+
background-color: red;
7+
}
8+
</style>
9+
</head>
10+
<body>
11+
<div id="container">
12+
<p style="float:right;">neglected</p>
13+
<p style="float:left;">Unpleasing</p>
14+
<div style="clear:both"></div>
15+
Man request adapted spirits set pressed. Up to denoting subjects sensible feelings it indulged directly. We dwelling
16+
elegance do shutters appetite yourself diverted. Our next drew much you with rank. Tore many held age hold rose than
17+
our. She literature sentiments any contrasted. Set aware joy sense young now tears china shy.
18+
</div>
19+
</body>
20+
</html>

0 commit comments

Comments
 (0)