aboutsummaryrefslogtreecommitdiffstats
path: root/test/fotree
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2008-02-10 12:50:47 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2008-02-10 12:50:47 +0000
commit2d84b6d1ed7b09a95cad0305e8377f397e455f8f (patch)
treea6cee7a46d07923c45b66f012f51c408a5c3ceca /test/fotree
parent7ee30cf256088a4cc15e94915e84ba9b7fb8c790 (diff)
downloadxmlgraphics-fop-2d84b6d1ed7b09a95cad0305e8377f397e455f8f.tar.gz
xmlgraphics-fop-2d84b6d1ed7b09a95cad0305e8377f397e455f8f.zip
Revisit background-position shorthand implementation: always convert to percentages (more possibilities/precision).
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@620276 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/fotree')
-rw-r--r--test/fotree/testcases/background-position-shorthand-test.fo36
1 files changed, 24 insertions, 12 deletions
diff --git a/test/fotree/testcases/background-position-shorthand-test.fo b/test/fotree/testcases/background-position-shorthand-test.fo
index 6ef374544..6bc793535 100644
--- a/test/fotree/testcases/background-position-shorthand-test.fo
+++ b/test/fotree/testcases/background-position-shorthand-test.fo
@@ -25,48 +25,60 @@
<fo:page-sequence master-reference="simpleA4">
<fo:flow flow-name="xsl-region-body">
<fo:block background-image="../../resources/images/bgimg72dpi.jpg">
- <test:assert property="background-position-horizontal" expected="0.0%"/>
- <test:assert property="background-position-vertical" expected="0.0%"/>
+ <test:assert property="background-position-horizontal" expected="0mpt"/>
+ <test:assert property="background-position-vertical" expected="0mpt"/>
Test background-position shorthand: initial values
</fo:block>
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="50% 50%">
- <test:assert property="background-position-horizontal" expected="0.5"/>
- <test:assert property="background-position-vertical" expected="0.5"/>
+ <test:assert property="background-position-horizontal" expected="50.0%"/>
+ <test:assert property="background-position-vertical" expected="50.0%"/>
Test background-position shorthand: "50% 50%"
</fo:block>
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="2in 50%">
<test:assert property="background-position-horizontal" expected="144000mpt"/>
- <test:assert property="background-position-vertical" expected="0.5"/>
+ <test:assert property="background-position-vertical" expected="50.0%"/>
Test background-position shorthand: "2in 50%"
</fo:block>
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="100%">
- <test:assert property="background-position-horizontal" expected="1.0"/>
+ <test:assert property="background-position-horizontal" expected="100.0%"/>
<test:assert property="background-position-vertical" expected="50.0%"/>
Test background-position shorthand: "100%"
</fo:block>
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="top center">
- <test:assert property="background-position-horizontal" expected="top"/>
- <test:assert property="background-position-vertical" expected="center"/>
+ <test:assert property="background-position-horizontal" expected="50.0%"/>
+ <test:assert property="background-position-vertical" expected="0mpt"/>
Test background-position shorthand: "top center"
</fo:block>
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="right bottom">
- <test:assert property="background-position-horizontal" expected="right"/>
- <test:assert property="background-position-vertical" expected="bottom"/>
+ <test:assert property="background-position-horizontal" expected="100.0%"/>
+ <test:assert property="background-position-vertical" expected="100.0%"/>
Test background-position shorthand: "right bottom"
</fo:block>
<fo:block background-position="right bottom">
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="inherit">
- <test:assert property="background-position-horizontal" expected="right"/>
- <test:assert property="background-position-vertical" expected="bottom"/>
+ <test:assert property="background-position-horizontal" expected="100.0%"/>
+ <test:assert property="background-position-vertical" expected="100.0%"/>
Test background-position shorthand: "inherit"
</fo:block>
</fo:block>
+ <fo:block background-image="../../resources/images/bgimg72dpi.jpg"
+ background-position="top right">
+ <test:assert property="background-position-horizontal" expected="100.0%"/>
+ <test:assert property="background-position-vertical" expected="0mpt"/>
+ Test background-position shorthand: "top right"
+ </fo:block>
+ <fo:block background-image="../../resources/images/bgimg72dpi.jpg"
+ background-position="center">
+ <test:assert property="background-position-horizontal" expected="50.0%"/>
+ <test:assert property="background-position-vertical" expected="50.0%"/>
+ Test background-position shorthand: "center"
+ </fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>