aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-11-08 16:59:47 +0000
committerJeremias Maerki <jeremias@apache.org>2005-11-08 16:59:47 +0000
commit15b5761efc751db0f84ccabe5f6309d66d7d4457 (patch)
tree406f5acd641e77284a32710cd367fd7352fc3cbc /test
parent01945b97d64b065915c7d3ab75d5c51ffd5a8778 (diff)
downloadxmlgraphics-fop-15b5761efc751db0f84ccabe5f6309d66d7d4457.tar.gz
xmlgraphics-fop-15b5761efc751db0f84ccabe5f6309d66d7d4457.zip
Fix for bug #37270:
No more exceptions. Code touch-up and logging optimization. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@331844 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/layoutengine/disabled-testcases.txt1
-rw-r--r--test/layoutengine/testcases/table_bug37270.xml35
2 files changed, 30 insertions, 6 deletions
diff --git a/test/layoutengine/disabled-testcases.txt b/test/layoutengine/disabled-testcases.txt
index 156f1da7d..86ba90031 100644
--- a/test/layoutengine/disabled-testcases.txt
+++ b/test/layoutengine/disabled-testcases.txt
@@ -34,7 +34,6 @@ table-body_background-image.xml
table_border-collapse_collapse_1.xml
table_border-collapse_collapse_2.xml
table_border_padding.xml
-table_bug37270.xml
table-cell_block_keep-with-previous.xml
table-cell_border_padding_conditionality.xml
table-column_first-row-width.xml
diff --git a/test/layoutengine/testcases/table_bug37270.xml b/test/layoutengine/testcases/table_bug37270.xml
index 56d87e7aa..c3d8cf6ae 100644
--- a/test/layoutengine/testcases/table_bug37270.xml
+++ b/test/layoutengine/testcases/table_bug37270.xml
@@ -38,19 +38,30 @@
<fo:table-body>
<fo:table-row>
<!-- Note: the padding-top caused a NullPointerException -->
- <fo:table-cell padding-top="1.2cm" number-rows-spanned="2">
+ <fo:table-cell padding-top="40pt" number-rows-spanned="3" background-color="yellow" id="left">
<fo:block>row 1 col 1</fo:block>
</fo:table-cell>
<!-- absent table-cells in first row -->
+ <!--fo:table-cell column-number="4">
+ <fo:block>xxxxx</fo:block>
+ </fo:table-cell-->
</fo:table-row>
- <fo:table-row>
- <fo:table-cell number-columns-spanned="2">
+ <fo:table-row background-color="orange">
+ <fo:table-cell number-columns-spanned="2" id="r2c2">
<fo:block>row 2 col 2</fo:block>
</fo:table-cell>
- <fo:table-cell>
+ <fo:table-cell id="r2c4">
<fo:block>Row 2 col 4</fo:block>
</fo:table-cell>
</fo:table-row>
+ <fo:table-row>
+ <fo:table-cell number-columns-spanned="2" id="r3c2">
+ <fo:block>row 3 col 2</fo:block>
+ </fo:table-cell>
+ <fo:table-cell id="r3c4">
+ <fo:block>Row 3 col 4</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
@@ -59,6 +70,20 @@
</fo>
<checks>
<!-- Simply check that FOP doesn't fail with an IndexOutOfBoundsException or an NPE -->
- <eval expected="1" xpath="count(//pageViewport)"/>
+ <element-list category="breaker">
+ <box w="0"/>
+ <penalty w="14400"/> <!-- p > 0 && p <= INF -->
+ <box w="14400"/>
+ <penalty w="14400"/> <!-- p > 0 && p <= INF -->
+ <box w="40000"/>
+ <skip>3</skip>
+ </element-list>
+
+ <!-- Checking vertical position here. I had trouble with this while debugging. -->
+ <true xpath="not(boolean(//block[@prod-id='left']/@top-offset))"/>
+ <true xpath="not(boolean(//block[@prod-id='r2c2']/@top-offset))"/>
+ <true xpath="not(boolean(//block[@prod-id='r2c4']/@top-offset))"/>
+ <eval expected="14400" xpath="//block[@prod-id='r3c2']/@top-offset"/>
+ <eval expected="14400" xpath="//block[@prod-id='r3c4']/@top-offset"/>
</checks>
</testcase>