Skip to content

Commit a6cbff3

Browse files
JonPReillyiText-CI
authored andcommitted
Add test. DEVSIX-2335
Autoported commit. Original commit hash: [35ad6c02]
1 parent 6d834ec commit a6cbff3

File tree

4 files changed

+79
-1
lines changed

4 files changed

+79
-1
lines changed

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/FloatTest.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,14 @@ public virtual void NestedFloat01Test() {
624624
RunTest("nestedFloat01Test", "diffNested01_");
625625
}
626626

627+
/// <exception cref="System.IO.IOException"/>
628+
/// <exception cref="System.Exception"/>
629+
[NUnit.Framework.Test]
630+
public virtual void FloatingDivBottomBorderTest() {
631+
//This test should fail after the fix in DEVSIX-2335
632+
RunTest("floatingDivBottomBorderTest", "diff_BottomBorderTest_");
633+
}
634+
627635
/// <exception cref="System.IO.IOException"/>
628636
/// <exception cref="System.Exception"/>
629637
private void RunTest(String testName, String diff) {
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style>
5+
.clear {
6+
clear: both;
7+
}
8+
9+
div.label {
10+
float: left;
11+
width: 40%;
12+
margin: 0 20pt 5pt 0;
13+
}
14+
15+
div.field {
16+
float: left;
17+
margin: 0 20pt 5pt 0;
18+
color: #00a850;
19+
}
20+
21+
div.block_bad {
22+
margin-top: 10pt;
23+
background: lightblue;
24+
border: 1pt solid black;
25+
}
26+
27+
div.block_good {
28+
margin-top: 10pt;
29+
background: lightblue;
30+
border-top: 1pt solid black;
31+
border-left: 1pt solid black;
32+
border-right: 1pt solid black;
33+
}
34+
</style>
35+
</head>
36+
<body>
37+
<div class="block_bad">
38+
<h1>Both blocks should have equal height, only difference is the bottom border</h1>
39+
<div>Lorem Ipsum</div>
40+
<div>Lorem Ipsum</div>
41+
<div>Lorem Ipsum</div>
42+
<div>Lorem Ipsum</div>
43+
<div class="label">Lorem Ipsum</div><div class="field">Lorem Ipsum</div>
44+
<div class="clear"></div>
45+
<div class="label">Lorem Ipsum</div><div class="field">Lorem Ipsum</div>
46+
<div class="clear"></div>
47+
<div class="label">Lorem Ipsum</div><div class="field">Lorem Ipsum</div>
48+
<div class="clear"></div>
49+
<div class="label">Lorem Ipsum</div><div class="field">Lorem Ipsum</div>
50+
<div class="clear"></div>
51+
</div>
52+
53+
<div class="block_good">
54+
<h1>Both blocks should have equal height, only difference is the bottom border</h1>
55+
<div>Lorem Ipsum</div>
56+
<div>Lorem Ipsum</div>
57+
<div>Lorem Ipsum</div>
58+
<div>Lorem Ipsum</div>
59+
<div class="label">Lorem Ipsum</div><div class="field">Lorem Ipsum</div>
60+
<div class="clear"></div>
61+
<div class="label">Lorem Ipsum</div><div class="field">Lorem Ipsum</div>
62+
<div class="clear"></div>
63+
<div class="label">Lorem Ipsum</div><div class="field">Lorem Ipsum</div>
64+
<div class="clear"></div>
65+
<div class="label">Lorem Ipsum</div><div class="field">Lorem Ipsum</div>
66+
<div class="clear"></div>
67+
</div>
68+
69+
</body>
70+
</html>

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
eca375cd50b3e563e0abc8c7fef5b7d78429974a
1+
35ad6c02b605f08b2c7c4f3a06078fc32fe522c6

0 commit comments

Comments
 (0)