summaryrefslogtreecommitdiffstats
path: root/test/layoutengine
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2013-10-08 11:29:05 +0000
committerVincent Hennebert <vhennebert@apache.org>2013-10-08 11:29:05 +0000
commit54aa3369126225b7152d8692796babbc7f79135b (patch)
treeeba35b6674992926f7bb60e9027d7b25756b7a72 /test/layoutengine
parentbd40eedf996567982667e5987f64be54df417f1e (diff)
downloadxmlgraphics-fop-54aa3369126225b7152d8692796babbc7f79135b.tar.gz
xmlgraphics-fop-54aa3369126225b7152d8692796babbc7f79135b.zip
FOP-2106: Footnote put on earlier page than the one that contains the footnote call
Patch by Alexey Neyman, committed with minor modifications git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1530232 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/layoutengine')
-rw-r--r--test/layoutengine/standard-testcases/footnote_jira2106.xml52
1 files changed, 52 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/footnote_jira2106.xml b/test/layoutengine/standard-testcases/footnote_jira2106.xml
new file mode 100644
index 000000000..8acc91f35
--- /dev/null
+++ b/test/layoutengine/standard-testcases/footnote_jira2106.xml
@@ -0,0 +1,52 @@
+<?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>
+ Test for FOP-2106: footnote must be positioned on the same page as the inline reference (not
+ on the page before).
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-size="10pt">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="body" page-width="100pt" page-height="35pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="body">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Page 1 line 1</fo:block>
+ <fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Page 1 line 2</fo:block>
+ <fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Page 2 line 1</fo:block>
+ <fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Page 3 line
+ 1<fo:footnote><fo:inline>*</fo:inline><fo:footnote-body><fo:block
+ font-size="6pt">Footnote should be on page
+ 3</fo:block></fo:footnote-body></fo:footnote></fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <!-- The block with footnote reference is on page 3 -->
+ <eval expected="Page 3 line 1" xpath="//pageViewport[3]//mainReference//text"/>
+ <!-- ... and so is the footnote itself -->
+ <eval expected="Footnote" xpath="//pageViewport[3]//footnote//word[1]"/>
+ </checks>
+</testcase>