Skip to content

Commit e6c02df

Browse files
Add test into DisplayTest class
DEVSIX-6122
1 parent 55565f1 commit e6c02df

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ public void displayBlockInsideParagraphTest() throws IOException, InterruptedExc
177177
convertToPdfAndCompare("displayBlockInsideParagraph", SOURCE_FOLDER, DESTINATION_FOLDER);
178178
}
179179

180+
@Test
181+
//TODO DEVSIX-6163 Image is converted in outPdf as inline element when display: block is set
182+
public void displayBlockInsideImageTest() throws IOException, InterruptedException {
183+
convertToPdfAndCompare("displayBlockInsideImage", SOURCE_FOLDER, DESTINATION_FOLDER);
184+
}
185+
180186
@Test
181187
public void displayInline01Test() throws IOException, InterruptedException {
182188
convertToPdfAndCompare("display_inline01", SOURCE_FOLDER, DESTINATION_FOLDER);
293 Bytes
Loading
Binary file not shown.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style>
5+
img {
6+
display: block;
7+
}
8+
9+
a {
10+
background-color: red;
11+
}
12+
13+
div {
14+
background-color: yellow;
15+
}
16+
</style>
17+
</head>
18+
<body>
19+
<p>There is a block with inline-block, in which there is a block. The whole outer block is clickable.</p>
20+
<div>
21+
<a href="https://itextpdf.com/en"><img src="100x100placeholder.png"></a>
22+
</div>
23+
<p>There is a block with inline-block, in which there is an inline-block. Only the outer inline-block is clickable.</p>
24+
<div>
25+
<a href="https://itextpdf.com/en"><img style="display: inline-block;" src="100x100placeholder.png"></a>
26+
</div>
27+
</body>
28+
</html>

0 commit comments

Comments
 (0)