aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-06-02 14:05:52 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-06-02 14:05:52 +0000
commit92f144a66ef5f789019687047756ac870782ef0a (patch)
tree4e0801a4aa22a7c876f1633b22f723e472b7f34f /test
parentdf16894515e5927bc1442225fb0210d2db4c11c9 (diff)
downloadxmlgraphics-fop-92f144a66ef5f789019687047756ac870782ef0a.tar.gz
xmlgraphics-fop-92f144a66ef5f789019687047756ac870782ef0a.zip
Merged revisions 660979,660998,661276,661310,661999,662009,662203 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r660979 | vhennebert | 2008-05-28 16:24:23 +0100 (Wed, 28 May 2008) | 3 lines Bugzilla 37579: added support for footnotes in lists and table bodies (not header nor footer). This is /not/ to be considered a final fix: similar code is duplicated over several classes (LineLayoutManager, ListItemLayoutManager and to less extent TableStepper). Footnotes should probably be handled another way. ........ r660998 | maxberger | 2008-05-28 17:10:32 +0100 (Wed, 28 May 2008) | 1 line Implemented Font auto-selection word-by-word ........ r661276 | vhennebert | 2008-05-29 10:58:06 +0100 (Thu, 29 May 2008) | 2 lines Set svn:keywords and svn:eol-style properties for files added in revision 660998 ........ r661310 | maxberger | 2008-05-29 13:03:48 +0100 (Thu, 29 May 2008) | 1 line Added docs for my recent commit (word-by-word character selection) ........ r661999 | adelmelle | 2008-05-31 11:56:05 +0100 (Sat, 31 May 2008) | 3 lines Bugzilla 45097: Leading/trailing white-space not removed from nested inline-content when there is no preceding/following text. ........ r662009 | maxberger | 2008-05-31 12:45:55 +0100 (Sat, 31 May 2008) | 1 line Code Cleanups (no functional change) ........ r662203 | maxberger | 2008-06-01 12:57:33 +0100 (Sun, 01 Jun 2008) | 1 line More code Cleanups (no functional changes) ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@662442 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/layoutengine/disabled-testcases.xml18
-rw-r--r--test/layoutengine/standard-testcases/block_font-autoselect.xml54
-rw-r--r--test/layoutengine/standard-testcases/footnote_in_list.xml2
-rw-r--r--test/layoutengine/standard-testcases/footnote_in_list_2.xml125
-rw-r--r--test/layoutengine/standard-testcases/footnote_in_table.xml2
-rw-r--r--test/layoutengine/standard-testcases/footnote_in_table_2.xml185
-rw-r--r--test/layoutengine/standard-testcases/inline_white-space-treatment_bugzilla45097.xml79
7 files changed, 447 insertions, 18 deletions
diff --git a/test/layoutengine/disabled-testcases.xml b/test/layoutengine/disabled-testcases.xml
index 476db249e..ba985bf8d 100644
--- a/test/layoutengine/disabled-testcases.xml
+++ b/test/layoutengine/disabled-testcases.xml
@@ -98,24 +98,6 @@
regions.</description>
</testcase>
<testcase>
- <name>Footnotes swallowed in lists</name>
- <file>footnote_in_list.xml</file>
- <description>Element lists for lists are created by combining the
- element lists from list-item-label and list-item-body. The
- footnotes contained in the KnuthBlockBoxes are not propagated to
- the combined element list.</description>
- <reference>http://issues.apache.org/bugzilla/show_bug.cgi?id=37579</reference>
- </testcase>
- <testcase>
- <name>Footnotes swallowed in tables</name>
- <file>footnote_in_table.xml</file>
- <description>Element lists for tables are created by combining the
- element lists from the individual table-cells. The footnotes
- contained in the KnuthBlockBoxes are not propagated to the combined
- element list.</description>
- <reference>http://issues.apache.org/bugzilla/show_bug.cgi?id=37579</reference>
- </testcase>
- <testcase>
<name>NPE for table inside an inline</name>
<file>inline_block_nested_3.xml</file>
<description>Placing a table as a child of an fo:inline produces a
diff --git a/test/layoutengine/standard-testcases/block_font-autoselect.xml b/test/layoutengine/standard-testcases/block_font-autoselect.xml
new file mode 100644
index 000000000..55406ad73
--- /dev/null
+++ b/test/layoutengine/standard-testcases/block_font-autoselect.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks the font auto selection.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="normal" page-width="210mm" page-height="297mm">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="normal" white-space-collapse="true">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>font-family not given</fo:block>
+ <fo:block>this text contains a &#x2211; symbol in the middle</fo:block>
+ <fo:block>mixed contents should be</fo:block>
+ <fo:block>&#x2211;&#x2211;text</fo:block>
+ <fo:block>&#x2211;&#x2211;&#x2211;&#x2211;text</fo:block>
+ <fo:block>&#x2211;&#x2211;&#x2211;&#x2211;sym</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="sans-serif" xpath="//flow/block[1]/lineArea/text/@font-name"/>
+ <eval expected="sans-serif" xpath="//flow/block[2]/lineArea/text[1]/@font-name"/>
+ <eval expected="Symbol" xpath="//flow/block[2]/lineArea/text[2]/@font-name"/>
+ <eval expected="sans-serif" xpath="//flow/block[2]/lineArea/text[3]/@font-name"/>
+ <eval expected="sans-serif" xpath="//flow/block[3]/lineArea/text[1]/@font-name"/>
+ <eval expected="sans-serif" xpath="//flow/block[4]/lineArea/text[1]/@font-name"/>
+ <eval expected="sans-serif" xpath="//flow/block[5]/lineArea/text[1]/@font-name"/>
+ <eval expected="Symbol" xpath="//flow/block[6]/lineArea/text[1]/@font-name"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/footnote_in_list.xml b/test/layoutengine/standard-testcases/footnote_in_list.xml
index 13bfa2ba4..716f07fc8 100644
--- a/test/layoutengine/standard-testcases/footnote_in_list.xml
+++ b/test/layoutengine/standard-testcases/footnote_in_list.xml
@@ -65,5 +65,7 @@
</fo>
<checks>
<eval expected="2" xpath="count(//footnote/block)"/>
+ <eval expected="1) The footnote from the normal block." xpath="//footnote/block[1]"/>
+ <eval expected="2) The footnote from the list." xpath="//footnote/block[2]"/>
</checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/footnote_in_list_2.xml b/test/layoutengine/standard-testcases/footnote_in_list_2.xml
new file mode 100644
index 000000000..a0e477d57
--- /dev/null
+++ b/test/layoutengine/standard-testcases/footnote_in_list_2.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks footnotes as descendants of list-item-body elements.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="simple" page-height="220pt" page-width="3in"
+ margin="10pt">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="simple" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Before the list.</fo:block>
+ <fo:list-block provisional-distance-between-starts="1.2em" provisional-label-separation="2pt">
+ <fo:list-item>
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>–</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque<fo:footnote>
+ <fo:inline>(1)</fo:inline>
+ <fo:footnote-body>
+ <fo:block start-indent="0">
+ <fo:inline>(1)</fo:inline> First footnote from the list.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote> hendrerit euismod velit. Nulla facilisi. Etiam et risus at neque ultrices
+ facilisis. Donec lectus est, nonummy quis, rhoncus bibendum, porta at, nisl<fo:footnote>
+ <fo:inline>(2)</fo:inline>
+ <fo:footnote-body>
+ <fo:block start-indent="0">
+ <fo:inline>(2)</fo:inline> Second footnote from the list.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote>.
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ <fo:list-item>
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>–</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque<fo:footnote>
+ <fo:inline>(3)</fo:inline>
+ <fo:footnote-body>
+ <fo:block start-indent="0">
+ <fo:inline>(3)</fo:inline> Third footnote from the list.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote> hendrerit euismod velit. Nulla facilisi. Etiam et risus at neque ultrices
+ facilisis. Donec lectus est, nonummy quis, rhoncus bibendum, porta at, nisl<fo:footnote>
+ <fo:inline>(4)</fo:inline>
+ <fo:footnote-body>
+ <fo:block start-indent="0">
+ <fo:inline>(4)</fo:inline> Fourth footnote from the list.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote>.
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="simple" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block space-after="130pt">Before the list.</fo:block>
+ <fo:list-block provisional-distance-between-starts="1.2em" provisional-label-separation="2pt">
+ <fo:list-item>
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>–</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block orphans="1" widows="1">Lorem ipsum dolor sit amet, consectetuer adipiscing
+ elit. Pellentesque<fo:footnote>
+ <fo:inline>(1)</fo:inline>
+ <fo:footnote-body>
+ <fo:block start-indent="0">(1) First footnote from the list.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote> hendrerit euismod velit. Nulla facilisi. Etiam et risus at neque ultrices
+ facilisis. Donec lectus est, nonummy quis, rhoncus bibendum, porta at, nisl<fo:footnote>
+ <fo:inline>(2)</fo:inline>
+ <fo:footnote-body>
+ <fo:block start-indent="0">(2) Second footnote from the list.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote>.
+ </fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="4" xpath="count(//pageSequence[1]//footnote/block)"/>
+ <eval expected="(1) First footnote from the list." xpath="//pageSequence[1]//footnote/block[1]"/>
+ <eval expected="(2) Second footnote from the list." xpath="//pageSequence[1]//footnote/block[2]"/>
+ <eval expected="(3) Third footnote from the list." xpath="//pageSequence[1]//footnote/block[3]"/>
+ <eval expected="(4) Fourth footnote from the list." xpath="//pageSequence[1]//footnote/block[4]"/>
+ <eval expected="1" xpath="count(//pageSequence[2]/pageViewport[1]//footnote/block)"/>
+ <eval expected="(1) First footnote from the list." xpath="//pageSequence[2]/pageViewport[1]//footnote/block"/>
+ <eval expected="1" xpath="count(//pageSequence[2]/pageViewport[2]//footnote/block)"/>
+ <eval expected="(2) Second footnote from the list." xpath="//pageSequence[2]/pageViewport[2]//footnote/block"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/footnote_in_table.xml b/test/layoutengine/standard-testcases/footnote_in_table.xml
index 5011b48c6..d9e252ce6 100644
--- a/test/layoutengine/standard-testcases/footnote_in_table.xml
+++ b/test/layoutengine/standard-testcases/footnote_in_table.xml
@@ -69,5 +69,7 @@
</fo>
<checks>
<eval expected="2" xpath="count(//footnote/block)"/>
+ <eval expected="1) The footnote from the normal block." xpath="//footnote/block[1]"/>
+ <eval expected="2) The footnote from the table." xpath="//footnote/block[2]"/>
</checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/footnote_in_table_2.xml b/test/layoutengine/standard-testcases/footnote_in_table_2.xml
new file mode 100644
index 000000000..f0514a889
--- /dev/null
+++ b/test/layoutengine/standard-testcases/footnote_in_table_2.xml
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks footnotes as descendants of table-body elements.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="simple" page-height="220pt" page-width="3in"
+ margin="10pt">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="simple" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Before the table</fo:block>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-body border="1pt solid black">
+ <fo:table-row border="inherit">
+ <fo:table-cell border="inherit" number-rows-spanned="2">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1<fo:footnote>
+ <fo:inline>(2)</fo:inline>
+ <fo:footnote-body>
+ <fo:block>(2) Second footnote from the table.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote></fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2<fo:footnote>
+ <fo:inline>(1)</fo:inline>
+ <fo:footnote-body>
+ <fo:block>(1) First footnote from the table.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote>.
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="inherit">
+ <fo:table-cell>
+ <fo:block>Cell<fo:footnote>
+ <fo:inline>(3)</fo:inline>
+ <fo:footnote-body>
+ <fo:block>(3) Third footnote from the table.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote> 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="simple" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block space-after="159pt">Before the table</fo:block>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-body border="1pt solid black">
+ <fo:table-row border="inherit">
+ <fo:table-cell border="inherit" number-rows-spanned="2">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1<fo:footnote>
+ <fo:inline>(2)</fo:inline>
+ <fo:footnote-body>
+ <fo:block>(2) Second footnote from the table.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote></fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2<fo:footnote>
+ <fo:inline>(1)</fo:inline>
+ <fo:footnote-body>
+ <fo:block>(1) First footnote from the table.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote>.
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="inherit">
+ <fo:table-cell>
+ <fo:block>Cell<fo:footnote>
+ <fo:inline>(3)</fo:inline>
+ <fo:footnote-body>
+ <fo:block>(3) Third footnote from the table.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote> 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="simple" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block space-after="139pt">Before the table</fo:block>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-body border="1pt solid black">
+ <fo:table-row border="inherit">
+ <fo:table-cell border="inherit" number-rows-spanned="2">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1<fo:footnote>
+ <fo:inline>(2)</fo:inline>
+ <fo:footnote-body>
+ <fo:block>(2) Second footnote from the table.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote></fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="inherit">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2<fo:footnote>
+ <fo:inline>(1)</fo:inline>
+ <fo:footnote-body>
+ <fo:block>(1) First footnote from the table.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote>.
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="inherit">
+ <fo:table-cell>
+ <fo:block>Cell<fo:footnote>
+ <fo:inline>(3)</fo:inline>
+ <fo:footnote-body>
+ <fo:block>(3) Third footnote from the table.</fo:block>
+ </fo:footnote-body>
+ </fo:footnote> 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="3" xpath="count(//pageSequence[1]//footnote/block)"/>
+ <eval expected="(1) First footnote from the table." xpath="//pageSequence[1]//footnote/block[1]"/>
+ <eval expected="(2) Second footnote from the table." xpath="//pageSequence[1]//footnote/block[2]"/>
+ <eval expected="(3) Third footnote from the table." xpath="//pageSequence[1]//footnote/block[3]"/>
+
+ <eval expected="1" xpath="count(//pageSequence[2]/pageViewport[1]//footnote/block)"/>
+ <eval expected="(1) First footnote from the table." xpath="//pageSequence[2]/pageViewport[1]//footnote/block[1]"/>
+ <eval expected="2" xpath="count(//pageSequence[2]/pageViewport[2]//footnote/block)"/>
+ <eval expected="(2) Second footnote from the table." xpath="//pageSequence[2]/pageViewport[2]//footnote/block[1]"/>
+ <eval expected="(3) Third footnote from the table." xpath="//pageSequence[2]/pageViewport[2]//footnote/block[2]"/>
+
+ <eval expected="2" xpath="count(//pageSequence[3]/pageViewport[1]//footnote/block)"/>
+ <eval expected="(1) First footnote from the table." xpath="//pageSequence[3]/pageViewport[1]//footnote/block[1]"/>
+ <eval expected="(2) Second footnote from the table." xpath="//pageSequence[3]/pageViewport[1]//footnote/block[2]"/>
+ <eval expected="1" xpath="count(//pageSequence[3]/pageViewport[2]//footnote/block)"/>
+ <eval expected="(3) Third footnote from the table." xpath="//pageSequence[3]/pageViewport[2]//footnote/block[1]"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/inline_white-space-treatment_bugzilla45097.xml b/test/layoutengine/standard-testcases/inline_white-space-treatment_bugzilla45097.xml
new file mode 100644
index 000000000..bfe89c673
--- /dev/null
+++ b/test/layoutengine/standard-testcases/inline_white-space-treatment_bugzilla45097.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks for white-space related bugs as reported in Bugzilla 45097.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="all-pages" margin-top="0.5in" margin-bottom="0.5in" margin-left="0.38in" margin-right="0.38in" page-width="8.5in" page-height="11in">
+ <fo:region-body margin-top="0.5in + 1mm" margin-bottom="0.5in + 1mm"/>
+ <fo:region-before extent="0.5in"/>
+ <fo:region-after extent="0.5in"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="all-pages">
+ <fo:static-content flow-name="xsl-region-before"><fo:block/></fo:static-content>
+ <fo:static-content flow-name="xsl-region-after"><fo:block/></fo:static-content>
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>
+ <fo:block><fo:leader leader-pattern="space"/></fo:block>
+ <fo:block text-decoration="underline">Example 1: white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve"</fo:block>
+ <fo:block font-family="Courier"
+ white-space-collapse="false"
+ linefeed-treatment="preserve"
+ white-space-treatment="preserve"><fo:block><fo:inline id="inline-1a" border="1mm solid red"> *** </fo:inline></fo:block><fo:block><fo:inline border="1mm solid red">*************</fo:inline></fo:block><fo:block><fo:inline id="inline-1b" border="1mm solid red"> *** </fo:inline></fo:block></fo:block>
+
+ <fo:block><fo:leader leader-pattern="space"/></fo:block>
+ <fo:block text-decoration="underline">Example 2: white-space-collapse="false" linefeed-treatment="preserve" w/ inlines</fo:block>
+ <fo:block font-family="Courier"
+ white-space-collapse="false"
+ linefeed-treatment="preserve"><fo:block><fo:inline id="inline-2a" border="1mm solid red"> *** </fo:inline></fo:block><fo:block><fo:inline border="1mm solid red">*************</fo:inline></fo:block><fo:block><fo:inline id="inline-2b" border="1mm solid red"> *** </fo:inline></fo:block></fo:block>
+
+ </fo:block>
+ <fo:block><fo:leader leader-pattern="space"/></fo:block>
+ <fo:block text-decoration="underline">Example 1: white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve"</fo:block>
+ <fo:block font-family="Courier"
+ white-space-collapse="false"
+ linefeed-treatment="preserve"
+ white-space-treatment="preserve"><fo:block><fo:inline id="inline-3a" border="1mm solid red"> *** </fo:inline></fo:block><fo:block><fo:inline border="1mm solid red">*************</fo:inline></fo:block><fo:block><fo:inline id="inline-3b" border="1mm solid red"> *** </fo:inline></fo:block></fo:block>
+
+ <fo:block><fo:leader leader-pattern="space"/></fo:block>
+ <fo:block text-decoration="underline">Example 2: white-space-collapse="false" linefeed-treatment="preserve" w/ inlines</fo:block>
+ <fo:block font-family="Courier"
+ white-space-collapse="false"
+ linefeed-treatment="preserve"><fo:block><fo:inline id="inline-4a" border="1mm solid red"> *** </fo:inline></fo:block><fo:block><fo:inline border="1mm solid red">*************</fo:inline></fo:block><fo:block><fo:inline id="inline-4b" border="1mm solid red"> *** </fo:inline></fo:block></fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="10" xpath="count(//inlineparent[@prod-id='inline-1a']//space)" />
+ <eval expected="10" xpath="count(//inlineparent[@prod-id='inline-1b']//space)" />
+ <eval expected="0" xpath="count(//inlineparent[@prod-id='inline-2a']//space)" />
+ <eval expected="0" xpath="count(//inlineparent[@prod-id='inline-2b']//space)" />
+ <eval expected="10" xpath="count(//inlineparent[@prod-id='inline-3a']//space)" />
+ <eval expected="10" xpath="count(//inlineparent[@prod-id='inline-3b']//space)" />
+ <eval expected="0" xpath="count(//inlineparent[@prod-id='inline-4a']//space)" />
+ <eval expected="0" xpath="count(//inlineparent[@prod-id='inline-4b']//space)" />
+ </checks>
+</testcase> \ No newline at end of file