aboutsummaryrefslogtreecommitdiffstats
path: root/test/layoutengine
diff options
context:
space:
mode:
authorChris Bowditch <cbowditch@apache.org>2005-09-13 09:50:36 +0000
committerChris Bowditch <cbowditch@apache.org>2005-09-13 09:50:36 +0000
commitf36a89c9878494b67d9a8e1042fd1d92099a8d4a (patch)
tree7549959da867a0150b7880def9af5842e9c155b7 /test/layoutengine
parentb92a145d9375e88f428b5f9c0a9ede42081f45b6 (diff)
downloadxmlgraphics-fop-f36a89c9878494b67d9a8e1042fd1d92099a8d4a.tar.gz
xmlgraphics-fop-f36a89c9878494b67d9a8e1042fd1d92099a8d4a.zip
Added Test case for Border Conditionality on fo:table
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@280527 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/layoutengine')
-rw-r--r--test/layoutengine/testcases/table_border-width_conditionality.xml195
1 files changed, 195 insertions, 0 deletions
diff --git a/test/layoutengine/testcases/table_border-width_conditionality.xml b/test/layoutengine/testcases/table_border-width_conditionality.xml
new file mode 100644
index 000000000..194050e8e
--- /dev/null
+++ b/test/layoutengine/testcases/table_border-width_conditionality.xml
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2005 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 painting of borders and border-style.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="a4" page-width="210mm" page-height="297mm">
+ <fo:region-body margin-top="100mm" margin-bottom="100mm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="a4">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>
+ <fo:block>Following Table has border-width.conditionality="discard"</fo:block>
+ <fo:table border-style="solid" border-width="1pt" border-color="black" border-collapse="separate" border-start-width.conditionality="discard" border-end-width.conditionality="discard">
+ <fo:table-column column-width="50%"/>
+ <fo:table-column column-width="50%"/>
+ <fo:table-body>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>1-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>1-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>2-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>2-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>3-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>3-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>4-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>4-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>5-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>5-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>6-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>6-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>7-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>7-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>8-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>8-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>Next Table has border.conditionality="retain"</fo:block>
+ <fo:table border-style="solid" border-width="1pt" border-color="black" border-collapse="separate" border-start-width.conditionality="retain" border-end-width.conditionality="retain">
+ <fo:table-column column-width="50%"/>
+ <fo:table-column column-width="50%"/>
+ <fo:table-body>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>1-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>1-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>2-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>2-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>3-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>3-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>4-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>4-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>5-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>5-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>6-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>6-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>7-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>7-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="20mm">
+ <fo:table-cell>
+ <fo:block>8-1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>8-2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <!-- page1 test: table should have before border bu not after border-->
+ <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(none,#000000,0)" xpath="//pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@border-after"/>
+ <!-- page2 test: table should have after but no before -->
+ <eval expected="(none,#000000,0)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-after"/>
+ <!-- page3 test: table should have both before and after border -->
+ <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-after"/>
+ <!-- page4 test: table should have both before and after border -->
+ <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,1000)" xpath="//pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/@border-after"/>
+ </checks>
+</testcase>