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 Sep 20, 2021
1 parent 38d7527 commit b56de37
Show file tree
Hide file tree
Showing 94 changed files with 930 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/OutputTest/base.css
@@ -0,0 +1,16 @@
@page {
size: 400pt 300pt;
margin: 50pt;
}

body {
font-family: sans-serif;
font-size: 12pt;
line-height: 14pt;
letter-spacing: 0.7pt;
}

p {
orphans: 1;
widows: 1;
}
31 changes: 31 additions & 0 deletions tests/OutputTest/float/float-width.html
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The grey text should start in a new line after 'Lorem' and span the
entire available width">
<style>
@import url(../base.css);

body {
outline: 1pt solid black;
}

span {
float: right;
color: grey;
}
</style>
</head>

<body>
Lorem <span>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.</span>
</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.
31 changes: 31 additions & 0 deletions tests/OutputTest/inline/extended-parent-width.html
@@ -0,0 +1,31 @@
<!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 horizontal page margins. See issue #2476">
<style>
@import url(../base.css);

body {
outline: 1pt solid black;
}

p {
margin: 0 -50pt;
}
</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.
31 changes: 31 additions & 0 deletions tests/OutputTest/inline/inline-block-width.html
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The grey text should start in a new line after 'Lorem' and span the
entire available width">
<style>
@import url(../base.css);

body {
outline: 1pt solid black;
}

span {
display: inline-block;
color: grey;
}
</style>
</head>

<body>
Lorem <span>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.</span>
</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.
21 changes: 21 additions & 0 deletions tests/OutputTest/inline/letter-spacing.html
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The should be no extra space around the bold text. See issue #2404">
<style>
@import url(../base.css);

body {
letter-spacing: 2pt;
}
</style>
</head>

<body>
Lorem ipsum <b>dolor</b> sit amet, consectetur adipisici elit.
</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.
24 changes: 24 additions & 0 deletions tests/OutputTest/page-break/blocks-whitespace.html
@@ -0,0 +1,24 @@
<!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>
@import url(../base.css);

.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.
Binary file added tests/OutputTest/page-break/blocks-whitespace.pdf
Binary file not shown.
32 changes: 32 additions & 0 deletions tests/OutputTest/page-break/inline-block-1.html
@@ -0,0 +1,32 @@
<!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>
@import url(../base.css);

body {
outline: 1pt solid black;
}

p {
margin: 182pt 0 0 0;
}

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.
32 changes: 32 additions & 0 deletions tests/OutputTest/page-break/inline-block-2.html
@@ -0,0 +1,32 @@
<!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>
@import url(../base.css);

body {
outline: 1pt solid black;
}

p {
margin: 182pt 0 0 0;
}

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.
31 changes: 31 additions & 0 deletions tests/OutputTest/page-break/inline-block-3.html
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The red border should not bleed into the page margins">
<style>
@import url(../base.css);

body {
outline: 1pt solid black;
}

p {
margin: 182pt 0 0 0;
}

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.
28 changes: 28 additions & 0 deletions tests/OutputTest/page-break/inline-element-1.html
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<style>
@import url(../base.css);

body {
outline: 1pt solid black;
}

p {
margin: 182pt 0 0 0;
}

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.
28 changes: 28 additions & 0 deletions tests/OutputTest/page-break/inline-element-2.html
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<style>
@import url(../base.css);

body {
outline: 1pt solid black;
}

p {
margin: 182pt 0 0 0;
}

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.
28 changes: 28 additions & 0 deletions tests/OutputTest/page-break/inline-element-3.html
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<style>
@import url(../base.css);

body {
outline: 1pt solid black;
}

p {
margin: 182pt 0 0 0;
}

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.
48 changes: 48 additions & 0 deletions tests/OutputTest/page-break/list-item-counter.html
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
content="The last list item should have number 14">
<style>
@import url(../base.css);

body {
line-height: 19pt;
outline: 1pt solid black;
}

ul {
margin: 0;
}

li {
counter-increment: li;
}

li::before {
content: counter(li);
}
</style>
</head>

<body>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li><ul><li></li></ul></li>
<li></li>
<li></li>
<li></li>
</ul>
</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/list-item-counter.pdf
Binary file not shown.

0 comments on commit b56de37

Please sign in to comment.