aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-02-20 23:11:53 +0100
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-03-02 20:47:47 +0100
commita83ae699df1748fa0c7fccc36935f43d48631fc5 (patch)
tree3539618dd06436620f5462133ae3cc370586e484
parent6b79a74601b57500ff786e1bb9f9ec94e72416ad (diff)
Add table-td-width-percent test
-rw-r--r--test/html/Makefile.am4
-rw-r--r--test/html/render/table-td-width-percent.html26
-rw-r--r--test/html/render/table-td-width-percent.ref.html26
3 files changed, 55 insertions, 1 deletions
diff --git a/test/html/Makefile.am b/test/html/Makefile.am
index df18c242..b0568365 100644
--- a/test/html/Makefile.am
+++ b/test/html/Makefile.am
@@ -19,6 +19,7 @@ TESTS = \
render/min-width-html.html \
render/min-width-nested-div.html \
render/span-padding.html \
+ render/table-td-width-percent.html \
render/table-thead-tfoot.html \
render/white-space.html
@@ -29,4 +30,5 @@ XFAIL_TESTS = \
render/margin-auto.html \
render/max-width-html.html \
render/min-width-html.html \
- render/span-padding.html
+ render/span-padding.html \
+ render/table-td-width-percent.html
diff --git a/test/html/render/table-td-width-percent.html b/test/html/render/table-td-width-percent.html
new file mode 100644
index 00000000..112387c0
--- /dev/null
+++ b/test/html/render/table-td-width-percent.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>Test relative width column</title>
+ <style type="text/css">
+ body { margin: 0px; padding: 0px }
+ .first { background: lightblue; }
+ .second { background: lightgreen }
+ td, img { margin: 0px; padding: 0px; border: solid 1px black }
+ </style>
+ </head>
+ <body>
+ <table>
+ <tr>
+ <td width="300" class="first">
+ The next cell should have a 50% width of the table width.
+ </td>
+ <td width="25%" class="second">
+ This text should use the whole cell width, but for some reason is not
+ doing it?
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
diff --git a/test/html/render/table-td-width-percent.ref.html b/test/html/render/table-td-width-percent.ref.html
new file mode 100644
index 00000000..7eece2f3
--- /dev/null
+++ b/test/html/render/table-td-width-percent.ref.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>Test relative width column</title>
+ <style type="text/css">
+ body { margin: 0px; padding: 0px }
+ .first { background: lightblue; }
+ .second { background: lightgreen }
+ td, img { margin: 0px; padding: 0px; border: solid 1px black }
+ </style>
+ </head>
+ <body>
+ <table>
+ <tr>
+ <td width="300" class="first">
+ The next cell should have a 50% width of the table width.
+ </td>
+ <td width="100" class="second">
+ This text should use the whole cell width, but for some reason is not
+ doing it?
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>