Skip to content

Commit

Permalink
Add initial set of ouput tests
Browse files Browse the repository at this point in the history
The reference files have to be updated once the different bugs have been
fixed.
  • Loading branch information
Mellthas committed Aug 3, 2021
1 parent b187934 commit f02ea5c
Show file tree
Hide file tree
Showing 83 changed files with 890 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/OutputTest/float/float-width.html
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The bold text should start in a new line after 'Lorem' and span the
entire available width">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
letter-spacing: 0.8pt;
border: 1pt solid black;
}

b {
display: block;
float: right;
}
</style>
</head>

<body>
<p>Lorem <b>ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor
incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi
consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</b></p>
</body>

</html>
Binary file added tests/OutputTest/float/float-width.p1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/float/float-width.pdf
Binary file not shown.
41 changes: 41 additions & 0 deletions tests/OutputTest/inline/extended-parent-width.html
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The text should flow over the entire width of the page, ignoring
the body box. See issue #2476">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
letter-spacing: 0.8pt;
border: 1pt solid black;
}

p {
margin: 0 0 0 -50pt;
width: 400pt;
}

b {
display: inline-block;
}
</style>
</head>

<body>
<p>Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor
incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris <b>nisi</b> ut aliquid ex ea commodi
consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>
</body>

</html>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/inline/extended-parent-width.pdf
Binary file not shown.
35 changes: 35 additions & 0 deletions tests/OutputTest/inline/inline-block-width.html
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The bold text should start in a new line after 'Lorem' and span the
entire available width">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
letter-spacing: 0.8pt;
border: 1pt solid black;
}

b {
display: inline-block;
}
</style>
</head>

<body>
<p>Lorem <b>ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor
incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi
consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</b></p>
</body>

</html>
Binary file added tests/OutputTest/inline/inline-block-width.p1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/inline/inline-block-width.pdf
Binary file not shown.
31 changes: 31 additions & 0 deletions tests/OutputTest/inline/letter-spacing.html
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The rendering is not correct currently, see issue #2404. Make sure
to update the reference rendering once the bug is fixed">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
font-size: 1em;
letter-spacing: 2pt;
}

p {
margin: 0;
}
</style>
</head>

<body>
<p>Lorem ipsum <b>dolor</b> sit amet, consectetur adipisici elit.</p>
</body>

</html>
Binary file added tests/OutputTest/inline/letter-spacing.p1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/inline/letter-spacing.pdf
Binary file not shown.
27 changes: 27 additions & 0 deletions tests/OutputTest/page-break/blocks-whitespace.html
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The two blocks should fit on one page (2 * 100pt + 2 * 50pt margin = 300pt)">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

.block {
border-top: 1pt solid black;
background-color: blue;
height: 99pt;
}
</style>
</head>

<body>
<div class="block"></div>
<div class="block"></div>
</body>

</html>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/page-break/blocks-whitespace.pdf
Binary file not shown.
38 changes: 38 additions & 0 deletions tests/OutputTest/page-break/inline-block-1.html
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The page should break before the span, because of inline-block
display and not fitting completely onto the first line">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
letter-spacing: 0.8pt;
border: 1pt solid black;
}

p {
margin: 180pt 0 0 0;
orphans: 1;
}

span {
display: inline-block;
border: 1pt solid red;
}
</style>
</head>

<body>
<p>Lorem ipsum dolor sit amet, <span>consectetur adipisici elit,</span> sed eiusmod tempor
incidunt ut labore et dolore magna aliqua.</p>
</body>

</html>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/page-break/inline-block-1.p2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/page-break/inline-block-1.pdf
Binary file not shown.
38 changes: 38 additions & 0 deletions tests/OutputTest/page-break/inline-block-2.html
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The page should break before the span, because of inline-block
display">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
letter-spacing: 0.8pt;
border: 1pt solid black;
}

p {
margin: 180pt 0 0 0;
orphans: 1;
}

span {
display: inline-block;
border: 1pt solid red;
}
</style>
</head>

<body>
<p>Lorem ipsum dolor sit amet, consectetur <span>adipisici elit, sed eiusmod tempor
incidunt ut labore et dolore magna aliqua.</span></p>
</body>

</html>
Binary file added tests/OutputTest/page-break/inline-block-2.p1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/page-break/inline-block-2.p2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/page-break/inline-block-2.pdf
Binary file not shown.
37 changes: 37 additions & 0 deletions tests/OutputTest/page-break/inline-block-3.html
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The red border should not bleed into the page margins">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
letter-spacing: 0.8pt;
border: 1pt solid black;
}

p {
margin: 180pt 0 0 0;
orphans: 1;
}

span {
display: inline-block;
border: 1pt solid red;
}
</style>
</head>

<body>
<p><span>Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor
incidunt ut labore et dolore magna aliqua.</span></p>
</body>

</html>
Binary file added tests/OutputTest/page-break/inline-block-3.p1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/page-break/inline-block-3.p2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/page-break/inline-block-3.pdf
Binary file not shown.
34 changes: 34 additions & 0 deletions tests/OutputTest/page-break/inline-element-1.html
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
letter-spacing: 0.8pt;
border: 1pt solid black;
}

p {
margin: 180pt 0 0 0;
orphans: 1;
}

span {
border: 1pt solid red;
}
</style>
</head>

<body>
<p>Lorem ipsum dolor sit amet, <span>consectetur adipisici elit,</span> sed eiusmod tempor
incidunt ut labore et dolore magna aliqua.</p>
</body>

</html>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/page-break/inline-element-1.pdf
Binary file not shown.
34 changes: 34 additions & 0 deletions tests/OutputTest/page-break/inline-element-2.html
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
letter-spacing: 0.8pt;
border: 1pt solid black;
}

p {
margin: 180pt 0 0 0;
orphans: 1;
}

span {
border: 1pt solid red;
}
</style>
</head>

<body>
<p>Lorem ipsum dolor sit amet, <span>consectetur adipisici elit, sed eiusmod tempor
incidunt ut labore et dolore magna aliqua.</span></p>
</body>

</html>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/page-break/inline-element-2.pdf
Binary file not shown.
34 changes: 34 additions & 0 deletions tests/OutputTest/page-break/inline-element-3.html
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<style type="text/css">
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
letter-spacing: 0.8pt;
border: 1pt solid black;
}

p {
margin: 180pt 0 0 0;
orphans: 1;
}

span {
border: 1pt solid red;
}
</style>
</head>

<body>
<p><span>Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor
incidunt ut labore et dolore magna aliqua.</span></p>
</body>

</html>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/OutputTest/page-break/inline-element-3.pdf
Binary file not shown.

0 comments on commit f02ea5c

Please sign in to comment.