Skip to content

Commit 45c2a1e

Browse files
Kate IvanovaiText-CI
authored andcommitted
Move tests from FT repository
DEVSIX-3038
1 parent eabaeef commit 45c2a1e

File tree

7 files changed

+695
-0
lines changed

7 files changed

+695
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,21 @@ public void marginBoxRunningQuotes04() throws IOException, InterruptedException
502502
runTest("marginBoxRunningQuotes04");
503503
}
504504

505+
@Test
506+
public void checkMarginBoxFixDimension() throws IOException, InterruptedException {
507+
runTest("checkMarginBoxFixDimension");
508+
}
509+
510+
@Test
511+
public void checkMarginBoxMaxMinDimension() throws IOException, InterruptedException {
512+
runTest("checkMarginBoxMaxMinDimension");
513+
}
514+
515+
@Test
516+
public void checkMarginBoxMarginPaddings() throws IOException, InterruptedException {
517+
runTest("checkMarginBoxMarginPaddings");
518+
}
519+
505520
@Test
506521
public void mediaAppliedToRunningElementsProperties() throws IOException, InterruptedException {
507522
MediaDeviceDescription printMediaDevice = new MediaDeviceDescription("print");
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Page Margin Box Tests: fix dimension</title>
6+
<style type="text/css">
7+
@page
8+
{
9+
size: A4;
10+
border: dashed 1pt brown;
11+
12+
@top-left-corner {
13+
content:'top-left-corner';
14+
background: #dfe;
15+
border: 1pt blue;
16+
}
17+
18+
@bottom-left-corner {
19+
content:'bottom-left-corner';
20+
background: green;
21+
border: 1pt blue;
22+
}
23+
24+
@left-bottom {
25+
content: 'left-bottom';
26+
background:#cff;
27+
}
28+
29+
@left-middle {
30+
content: 'left-middle';
31+
background:#ccf;
32+
height: 33%;
33+
}
34+
@left-top {
35+
content: 'left-top';
36+
background-color: rgba(0, 255, 0, 0.3);
37+
height: 33%;
38+
}
39+
40+
@right-bottom {
41+
content: 'right-bottom';
42+
background:#cff;
43+
}
44+
45+
@right-middle {
46+
content: 'right-middle';
47+
background:#ccf;
48+
height: 200px;
49+
}
50+
@right-top {
51+
content: 'right-top';
52+
background:#fcc;
53+
height: 200px;
54+
}
55+
@bottom-left {
56+
content: 'bottom-left';
57+
background:#f0c;
58+
width: 350px;
59+
}
60+
@bottom-center {
61+
content: 'bottom-center';
62+
background:#fc0;
63+
width: 350px;
64+
}
65+
@bottom-right {
66+
content: 'bottom-right';
67+
background:#f01;
68+
width: 350px;
69+
}
70+
@top-left {
71+
content: 'top-left';
72+
background-color: rgba(255, 0, 0, 0.3);
73+
opacity: 0.4;
74+
width: 33%;
75+
}
76+
@top-center {
77+
content: 'top-center';
78+
background:#fc0;
79+
width: 33%;
80+
}
81+
@top-right {
82+
content: 'top-right';
83+
background:#f01;
84+
width: 33%;
85+
}
86+
}
87+
88+
</style>
89+
</head>
90+
<body>
91+
<h1>Fix Dimensions for Margin Box</h1>
92+
<ul>
93+
<li>@page
94+
{
95+
size: A4;
96+
border: dashed 1pt brown;
97+
</li>
98+
<li>
99+
@top-left-corner {
100+
content:'top-left-corner';
101+
background-color: rgba(255, 0, 0, 0.3);
102+
border: solid blue;
103+
}
104+
</li>
105+
<li>
106+
@bottom-left-corner {
107+
content:'bottom-left-corner';
108+
background: green;
109+
border: solid 1pt blue;
110+
}
111+
</li>
112+
<li>
113+
@left-bottom {
114+
content: 'left-bottom';
115+
background:#cff;
116+
}
117+
</li>
118+
<li>
119+
@left-middle {
120+
content: 'left-middle';
121+
background:#ccf;
122+
height: 33%;
123+
}
124+
</li>
125+
<li>
126+
@left-top {
127+
content: 'left-top';
128+
background-color: rgba(0, 255, 0, 0.3);
129+
height: 33%;
130+
}
131+
</li>
132+
<li>
133+
@right-bottom {
134+
content: 'right-bottom';
135+
background:#cff;
136+
}
137+
</li>
138+
<li>
139+
@right-middle {
140+
content: 'right-middle';
141+
background:#ccf;
142+
height: 200px;
143+
}
144+
</li>
145+
<li>
146+
@right-top {
147+
content: 'right-top';
148+
background:#fcc;
149+
height: 200px;
150+
}
151+
</li>
152+
<li>
153+
@bottom-left {
154+
content: 'bottom-left';
155+
background:#f0c;
156+
width: 350px;
157+
}
158+
</li>
159+
<li>
160+
@bottom-center {
161+
content: 'bottom-center';
162+
background:#fc0;
163+
width: 350px;
164+
}
165+
</li>
166+
<li>
167+
@bottom-right {
168+
content: 'bottom-right';
169+
background:#f01;
170+
width: 350px;
171+
}
172+
</li>
173+
<li>
174+
@top-left {
175+
content: 'top-left';
176+
background:#f0c;
177+
width: 33%;
178+
}
179+
</li>
180+
<li>
181+
@top-center {
182+
content: 'top-center';
183+
background:#fc0;
184+
width: 33%;
185+
}
186+
</li>
187+
<li>
188+
@top-right {
189+
content: 'top-right';
190+
background:#f01;
191+
width: 33%;
192+
}
193+
}
194+
</li>
195+
</ul>
196+
</body>
197+
</html>

0 commit comments

Comments
 (0)