aboutsummaryrefslogtreecommitdiffstats
path: root/test/layoutengine/standard-testcases
diff options
context:
space:
mode:
authorSimon Pepping <spepping@apache.org>2005-12-28 09:10:36 +0000
committerSimon Pepping <spepping@apache.org>2005-12-28 09:10:36 +0000
commit5eed711853cc3cb871408f317487d065eeec22f7 (patch)
treee7d363af578c8ec4b4a6e7b463d7c5082f2c2dff /test/layoutengine/standard-testcases
parent0851197b9c9b5210d99d9bde7fef5305125c3930 (diff)
downloadxmlgraphics-fop-5eed711853cc3cb871408f317487d065eeec22f7.tar.gz
xmlgraphics-fop-5eed711853cc3cb871408f317487d065eeec22f7.zip
Each block in inline content now appears in its own line area.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@359451 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/layoutengine/standard-testcases')
-rw-r--r--test/layoutengine/standard-testcases/inline_block_nested_5.xml64
-rwxr-xr-xtest/layoutengine/standard-testcases/inline_border_padding_block_nested_1.xml25
-rwxr-xr-xtest/layoutengine/standard-testcases/inline_border_padding_block_nested_2.xml31
3 files changed, 82 insertions, 38 deletions
diff --git a/test/layoutengine/standard-testcases/inline_block_nested_5.xml b/test/layoutengine/standard-testcases/inline_block_nested_5.xml
index 1dd64be6e..f1ef1d336 100644
--- a/test/layoutengine/standard-testcases/inline_block_nested_5.xml
+++ b/test/layoutengine/standard-testcases/inline_block_nested_5.xml
@@ -18,37 +18,63 @@
<testcase>
<info>
<p>
- This test checks whether inline block content does not generate
-ClassCastExceptions. The exceptions would occur because an
-UnresolvedElement in a list of ListElements is cast to a KnuthElement.
+ This test checks fo:inlines which generate multiple consecutive
+inlineblockparent areas. Each inlineblockparent area should appear in
+its own line area. Two cases: 1. A block containing multiple
+lines. 2. A block containing multiple child blocks which must be kept
+together (so that there are not break positions between the positions
+for the blocks).
+ <p>
+ Implicitly this test checks whether inline block content does
+not generate ClassCastExceptions. The exceptions would occur because
+an UnresolvedElement in a list of ListElements would be cast to a
+KnuthElement.
+ </p>
</p>
</info>
<fo>
- <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <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="5in" page-height="5in">
+ <fo:simple-page-master master-name="normal"
+ page-width="5in" page-height="5in" margin="5pt">
<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 id="svg"><fo:inline>This book is designed to be the clear, concise, normative reference to the DocBook DTD. This book is the official documentation for the DocBook DTD:<fo:block>A=B</fo:block><fo:block><fo:block>A1=B1,</fo:block><fo:block>A2=B2.</fo:block></fo:block>We hope to answer, definitively, all the questions you might have about all the elements and entities in DocBook. In particular, we cover the following subjects.</fo:inline>End of the DocBook blurb.</fo:block>
+ <fo:page-sequence master-reference="normal"
+ white-space-collapse="true" language="en">
+ <fo:flow flow-name="xsl-region-body" font-size="10pt">
+ <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt">
+ <fo:inline>before block
+ <fo:block background-color="yellow"
+ border="solid 1pt red">
+As far as the laws of mathematics refer to reality, they are not
+certain, and as far as they are certain, they do not refer to reality
+- Albert Einstein
+ </fo:block>
+after block</fo:inline>
+ </fo:block>
+ <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt">
+ <fo:inline>before block
+ <fo:block keep-together.within-page="always"
+ background-color="yellow" border="solid 1pt red">
+ <fo:block>A1=B1,</fo:block>
+ <fo:block>A2=B2.</fo:block>
+ </fo:block>
+after block</fo:inline>
+ </fo:block>
</fo:flow>
</fo:page-sequence>
-
</fo:root>
</fo>
<checks>
<true xpath="boolean(//flow/block[1]/lineArea[1]/inlineparent[1])"/>
- <true xpath="boolean(//flow/block[1]/lineArea[2]/inlineparent[1])"/>
- <true xpath="boolean(//flow/block[1]/lineArea[3]/inlineparent[1])"/>
- <true xpath="boolean(//flow/block[1]/lineArea[4]/inlineblockparent[1])"/>
- <true xpath="boolean(//flow/block[1]/lineArea[5]/inlineblockparent[1])"/>
- <true xpath="boolean(//flow/block[1]/lineArea[6]/inlineblockparent[1])"/>
- <true xpath="boolean(//flow/block[1]/lineArea[7]/inlineparent[1])"/>
- <true xpath="boolean(//flow/block[1]/lineArea[8]/inlineparent[1])"/>
- <true xpath="boolean(//flow/block[1]/lineArea[9]/inlineparent[1])"/>
+ <true xpath="boolean(//flow/block[1]/lineArea[2]/inlineblockparent[1])"/>
+ <true xpath="boolean(//flow/block[1]/lineArea[3]/inlineblockparent[1])"/>
+ <true xpath="boolean(//flow/block[1]/lineArea[4]/inlineparent[1])"/>
+ <true xpath="boolean(//flow/block[2]/lineArea[1]/inlineparent[1])"/>
+ <true xpath="boolean(//flow/block[2]/lineArea[2]/inlineblockparent[1])"/>
+ <true xpath="boolean(//flow/block[2]/lineArea[3]/inlineblockparent[1])"/>
+ <true xpath="boolean(//flow/block[2]/lineArea[4]/inlineparent[1])"/>
</checks>
</testcase>
-
diff --git a/test/layoutengine/standard-testcases/inline_border_padding_block_nested_1.xml b/test/layoutengine/standard-testcases/inline_border_padding_block_nested_1.xml
index fc26c2b8f..62054b520 100755
--- a/test/layoutengine/standard-testcases/inline_border_padding_block_nested_1.xml
+++ b/test/layoutengine/standard-testcases/inline_border_padding_block_nested_1.xml
@@ -100,7 +100,6 @@
<eval expected="54470" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipd"/>
<eval expected="57470" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipda"/>
- <eval expected="2000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@offset"/>
<eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-after"/>
<eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-before"/>
<eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-start"/>
@@ -111,16 +110,24 @@
<eval expected="350000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@ipda"/>
<eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@border-after"/>
<eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@border-before"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@offset"/>
<eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@padding-after"/>
<eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@padding-before"/>
- <eval expected="46130" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipd"/>
- <eval expected="49130" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipda"/>
- <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-after"/>
- <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-before"/>
- <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-end"/>
- <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-after"/>
- <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-before"/>
- <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-end"/>
+ <eval expected="350000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@ipd"/>
+ <eval expected="350000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@ipda"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-after"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-before"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@offset"/>
+ <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-after"/>
+ <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-before"/>
+ <eval expected="46130" xpath="//flow/block[3]/lineArea[4]/inlineparent/@ipd"/>
+ <eval expected="49130" xpath="//flow/block[3]/lineArea[4]/inlineparent/@ipda"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-after"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-before"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-end"/>
+ <eval expected="1000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-after"/>
+ <eval expected="1000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-before"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-end"/>
</checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/inline_border_padding_block_nested_2.xml b/test/layoutengine/standard-testcases/inline_border_padding_block_nested_2.xml
index 345a2c4c3..4b1bf52d2 100755
--- a/test/layoutengine/standard-testcases/inline_border_padding_block_nested_2.xml
+++ b/test/layoutengine/standard-testcases/inline_border_padding_block_nested_2.xml
@@ -153,16 +153,27 @@
<eval expected="2000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@padding-before"/>
<eval expected="2000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@padding-start"/>
<eval expected="2000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@padding-end"/>
- <eval expected="46130" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipd"/>
- <eval expected="52130" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipda"/>
- <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-after"/>
- <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-before"/>
- <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-start"/>
- <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-end"/>
- <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-after"/>
- <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-before"/>
- <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-start"/>
- <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-end"/>
+ <eval expected="344000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@ipd"/>
+ <eval expected="350000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@ipda"/>
+ <eval expected="3000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@offset"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-after"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-before"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-start"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-end"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-after"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-before"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-start"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-end"/>
+ <eval expected="46130" xpath="//flow/block[3]/lineArea[4]/inlineparent/@ipd"/>
+ <eval expected="52130" xpath="//flow/block[3]/lineArea[4]/inlineparent/@ipda"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-after"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-before"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-start"/>
+ <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-end"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-after"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-before"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-start"/>
+ <eval expected="2000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-end"/>
</checks>
</testcase>