Skip to content

Commit 87dd718

Browse files
author
Veronika Lisovskaya
committed
Add tests for border radius
DEVSIX-2018, DEVSIX-2019, DEVSIX-1191
1 parent 822b4d7 commit 87dd718

File tree

6 files changed

+113
-0
lines changed

6 files changed

+113
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,15 @@ public void borderRadiusInlineElementTest01() throws IOException, InterruptedExc
166166
convertToPdfAndCompare("borderRadiusInlineElementTest01", sourceFolder, destinationFolder);
167167
}
168168

169+
@Test
170+
public void borderRadiusInlineSpanElementTest01() throws IOException, InterruptedException {
171+
//TODO: update after DEVSIX-2018, DEVSIX-1191 closing
172+
convertToPdfAndCompare("borderRadiusInlineSpanElementTest01", sourceFolder, destinationFolder);
173+
}
174+
175+
@Test
176+
public void borderRadiusInlineDivElementTest01() throws IOException, InterruptedException {
177+
//TODO: update after DEVSIX-2018, DEVSIX-1191 closing
178+
convertToPdfAndCompare("borderRadiusInlineDivElementTest01", sourceFolder, destinationFolder);
179+
}
169180
}
Binary file not shown.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style type="text/css">
5+
@font-face {
6+
font-family: 'NotoSans';
7+
src: url('NotoSansCJKsc-Light.otf');
8+
}
9+
div {
10+
border-radius: 10px 30px 50px;
11+
color: white;
12+
}
13+
</style>
14+
</head>
15+
<body>
16+
17+
<div style="background-color: #CCC; padding: 1px; font-family: NotoSans; border-radius: 0px">
18+
19+
20+
<div style="border: solid 1px black;">
21+
Simple div text with solid border 1 px black, radius from css span style (border-radius: 10px 30px 50px;)
22+
</div>
23+
24+
25+
26+
<div style="background-color: #085a9f;">
27+
Simple div text with background. No border, radius from css span style. Test div borders here
28+
</div>
29+
30+
31+
32+
<div style="border: solid 1px; background-color: #085a9f; color: white; border-radius: 5px">
33+
Simple div text with background and border. With border-radius: 5px. Test div borders here. Test div borders here
34+
</div>
35+
36+
37+
38+
<div style="border: solid 2px; background-color: green; color: white; border-radius: 20px; border-style: dashed;">
39+
Simple div text with background and border. With border-radius: 10px; border-style: dashed;. Test div borders here. Test div borders here
40+
</div>
41+
42+
43+
44+
<div style="border: solid 1px; background-color: red; color: white; border-radius: 30px; border-style: dotted;">
45+
Simple div text with background and border. With border-radius: 15px; border-style: dotted;. Test div borders here. Test div borders here
46+
</div>
47+
48+
</div>
49+
50+
</body>
51+
</html>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style type="text/css">
5+
@font-face {
6+
font-family: 'NotoSans';
7+
src: url('NotoSansCJKsc-Light.otf');
8+
}
9+
span {
10+
border-radius: 10px 30px 50px;
11+
color: white;
12+
}
13+
</style>
14+
</head>
15+
<body>
16+
17+
<div style="background-color: #CCC; padding: 1px; font-family: NotoSans;">
18+
19+
<p>
20+
<span style="border: solid 1px black;">
21+
Simple inline text with solid border 1 px black, radius from css span style (border-radius: 10px 30px 50px;)
22+
</span>
23+
</p>
24+
25+
<p>
26+
<span style="background-color: #085a9f;">
27+
Simple inline text with background. No border, radius from css span style. Test behaviour for SPAN elements
28+
</span>
29+
</p>
30+
31+
<p>
32+
<span style="border: solid 1px; background-color: #085a9f; color: white; border-radius: 5px">
33+
Simple inline text with background and border. With border-radius: 5px. Test behaviour for SPAN elements
34+
</span>
35+
</p>
36+
37+
<p>
38+
<span style="border: solid 2px; background-color: green; color: white; border-radius: 20px; border-style: dashed;">
39+
Simple inline text with background and border. With border-radius: 10px; border-style: dashed;
40+
</span>
41+
</p>
42+
43+
44+
<span style="border: solid 1px; background-color: red; color: white; border-radius: 30px; border-style: dotted;">
45+
Simple inline text with background and border. With border-radius: 15px; border-style: dotted;. Test behaviour for SPAN elements
46+
</span>
47+
48+
</div>
49+
50+
</body>
51+
</html>

0 commit comments

Comments
 (0)