aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-06-12 09:30:18 +0000
committerJeremias Maerki <jeremias@apache.org>2006-06-12 09:30:18 +0000
commit7229a6d65e2f6c652ea6c46cdd7e1e882dc60590 (patch)
tree51de4d1b3b477b830c0120900f90818eb690d356 /test
parent23647acc2f2d3a81b24b1c5811e1a36e0ee125fd (diff)
downloadxmlgraphics-fop-7229a6d65e2f6c652ea6c46cdd7e1e882dc60590.tar.gz
xmlgraphics-fop-7229a6d65e2f6c652ea6c46cdd7e1e882dc60590.zip
Test case for change/revision 411180 ("Extends white-space removal to occur also before nested block-*level* FOs instead of only blocks.")
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@413614 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/layoutengine/standard-testcases/block_white-space_5.xml100
1 files changed, 100 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/block_white-space_5.xml b/test/layoutengine/standard-testcases/block_white-space_5.xml
new file mode 100644
index 000000000..2e40314fc
--- /dev/null
+++ b/test/layoutengine/standard-testcases/block_white-space_5.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2006 The Apache Software Foundation
+
+ Licensed 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 white space handling between block-level elements nested in blocks.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+ <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>
+ <fo:block border="0.2pt solid red">block1</fo:block>
+ <fo:block border="0.2pt solid red">block2</fo:block>
+ </fo:block>
+ <fo:block space-before="1em">
+ <fo:block-container border="0.2pt solid blue">
+ <fo:block>block1</fo:block>
+ </fo:block-container>
+ <fo:block-container border="0.2pt solid blue">
+ <fo:block>block2</fo:block>
+ </fo:block-container>
+ </fo:block>
+ <fo:block space-before="1em">
+ <fo:table table-layout="fixed" width="100%" border="0.2pt solid green" border-collapse="separate">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>Table 1 Cell</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:table table-layout="fixed" width="100%" border="0.2pt solid green" border-collapse="separate">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>Table 2 Cell</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+ <fo:block space-before="1em">
+ <fo:list-block border="0.2pt solid orange">
+ <fo:list-item>
+ <fo:list-item-label>
+ <fo:block>x</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body>
+ <fo:block>block1</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:list-block border="0.2pt solid orange">
+ <fo:list-item>
+ <fo:list-item-label>
+ <fo:block>x</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body>
+ <fo:block>block2</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <!-- No line areas must be generated between the nested elements -->
+ <eval expected="0" xpath="count(//flow/block[1]/lineArea)"/>
+ <eval expected="0" xpath="count(//flow/block[2]/lineArea)"/>
+ <eval expected="0" xpath="count(//flow/block[3]/lineArea)"/>
+ <eval expected="0" xpath="count(//flow/block[4]/lineArea)"/>
+ </checks>
+</testcase>