aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-03-02 22:03:04 +0100
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-03-17 20:37:33 +0100
commit227f1bbaf094b2affd921a3bd11333ec153b479c (patch)
tree23685b391875239939d3f7fec4cc6f3fa7b2e8d0 /test
parentad791d84e07c174ef85bc0a69255dbfab5ea6fbb (diff)
Add table-max-width render test
Diffstat (limited to 'test')
-rw-r--r--test/html/Makefile.am2
-rw-r--r--test/html/render/table-max-width.html44
-rw-r--r--test/html/render/table-max-width.ref.html43
3 files changed, 89 insertions, 0 deletions
diff --git a/test/html/Makefile.am b/test/html/Makefile.am
index 9348a06f..833f1405 100644
--- a/test/html/Makefile.am
+++ b/test/html/Makefile.am
@@ -21,6 +21,7 @@ TESTS = \
render/min-width-html.html \
render/min-width-nested-div.html \
render/span-padding.html \
+ render/table-max-width.html \
render/table-td-width-percent-img.html \
render/table-td-width-percent.html \
render/table-thead-tfoot.html \
@@ -36,4 +37,5 @@ XFAIL_TESTS = \
render/max-width-html.html \
render/min-width-html.html \
render/span-padding.html \
+ render/table-max-width.html \
render/table-td-width-percent.html
diff --git a/test/html/render/table-max-width.html b/test/html/render/table-max-width.html
new file mode 100644
index 00000000..3c260fdd
--- /dev/null
+++ b/test/html/render/table-max-width.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Test table in container with max-width and min-width</title>
+ <style type="text/css">
+ .main {
+ background: lightgreen;
+ max-width: 500px;
+ min-width: 200px;
+ padding: 10px;
+ }
+ .ruler {
+ background: red;
+ width: 500px;
+ height: 20px;
+ padding: 0px;
+ margin: 10px;
+ }
+ table, th, td {
+ padding: 0.25em;
+ background: lightblue;
+ border: solid 1px black;
+ }
+ </style>
+</head>
+<body>
+ <div class="ruler"></div>
+ <div class="main">
+ <table width="100%">
+ <tr>
+ <th>AAAAAA</th>
+ <th>BBBBBB</th>
+ <th>CCCCCC</th>
+ </tr>
+ <tr>
+ <td>aaaaaa</td>
+ <td>bbbbbb</td>
+ <td>cccccc</td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
diff --git a/test/html/render/table-max-width.ref.html b/test/html/render/table-max-width.ref.html
new file mode 100644
index 00000000..d02a5518
--- /dev/null
+++ b/test/html/render/table-max-width.ref.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Test table in container with max-width and min-width</title>
+ <style type="text/css">
+ .main {
+ background: lightgreen;
+ width: 500px;
+ padding: 10px;
+ }
+ .ruler {
+ background: red;
+ width: 500px;
+ height: 20px;
+ padding: 0px;
+ margin: 10px;
+ }
+ table, th, td {
+ padding: 0.25em;
+ background: lightblue;
+ border: solid 1px black;
+ }
+ </style>
+</head>
+<body>
+ <div class="ruler"></div>
+ <div class="main">
+ <table width="100%">
+ <tr>
+ <th>AAAAAA</th>
+ <th>BBBBBB</th>
+ <th>CCCCCC</th>
+ </tr>
+ <tr>
+ <td>aaaaaa</td>
+ <td>bbbbbb</td>
+ <td>cccccc</td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>