diff options
Diffstat (limited to 'test/layoutengine/standard-testcases/fox_external-document_2.xml')
-rw-r--r-- | test/layoutengine/standard-testcases/fox_external-document_2.xml | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/fox_external-document_2.xml b/test/layoutengine/standard-testcases/fox_external-document_2.xml new file mode 100644 index 000000000..5bce78f35 --- /dev/null +++ b/test/layoutengine/standard-testcases/fox_external-document_2.xml @@ -0,0 +1,81 @@ +<?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>
+ This test checks fox:external-document.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+ <fo:region-body reference-orientation="90"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fox:external-document id="img1" src="../../resources/images/bgimg72dpi.png"
+ width="5in" height="5in" text-align="center" display-align="center"/>
+ <fo:page-sequence master-reference="normal" id="ps1">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>
+ Just a normal page-sequence in between...
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <fox:external-document id="img2" src="../../resources/images/bgimg72dpi.png"
+ width="5in" height="5in" content-width="scale-to-fit"/>
+ <fox:external-document id="img3" src="../../resources/images/bgimg72dpi.png"
+ width="5in" height="5in" content-width="scale-down-to-fit" initial-page-number="5"/>
+ <fox:external-document id="img4" src="../../resources/images/big-image.png"
+ reference-orientation="90"/>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="5" xpath="count(/areaTree/pageSequence)"/>
+ <eval expected="6" xpath="count(//pageViewport)"/>
+
+ <eval expected="1" xpath="//pageViewport[@nr = '1']/@formatted-nr"/>
+ <eval expected="2" xpath="//pageViewport[@nr = '2']/@formatted-nr"/>
+ <eval expected="3" xpath="//pageViewport[@nr = '3']/@formatted-nr"/>
+ <eval expected="4" xpath="//pageViewport[@nr = '4']/@formatted-nr"/>
+ <true xpath="boolean(//pageViewport[@nr = '4']/@blank)"/> <!-- effect from force-page-count="auto" -->
+ <eval expected="5" xpath="//pageViewport[@nr = '5']/@formatted-nr"/>
+ <eval expected="6" xpath="//pageViewport[@nr = '6']/@formatted-nr"/>
+
+ <eval expected="0 0 360000 360000" xpath="//pageViewport[@nr = '1']/@bounds"/>
+ <eval expected="0 0 360000 360000" xpath="//pageViewport[@nr = '2']/@bounds"/>
+ <eval expected="0 0 360000 360000" xpath="//pageViewport[@nr = '3']/@bounds"/>
+ <eval expected="0 0 360000 360000" xpath="//pageViewport[@nr = '5']/@bounds"/>
+ <eval expected="0 0 843913 597171" xpath="//pageViewport[@nr = '6']/@bounds"/>
+
+ <eval expected="84012 84012 191975 191975" xpath="//viewport[@prod-id = 'img1']/@pos"/>
+ <eval expected="0 0 360000 360000" xpath="//viewport[@prod-id = 'img2']/@pos"/>
+ <eval expected="0 0 191975 191975" xpath="//viewport[@prod-id = 'img3']/@pos"/>
+ <eval expected="0 0 597171 843913" xpath="//viewport[@prod-id = 'img4']/@pos"/>
+
+ <eval expected="0 0 843913 597171" xpath="//pageViewport[@nr = '6']/page/regionViewport/@rect"/>
+ <eval expected="843913" xpath="//pageViewport[@nr = '6']/page/regionViewport/@ipd"/>
+ <eval expected="597171" xpath="//pageViewport[@nr = '6']/page/regionViewport/@bpd"/>
+ <eval expected="597171" xpath="//pageViewport[@nr = '6']/page/regionViewport/regionBody/@ipd"/>
+ <eval expected="843913" xpath="//pageViewport[@nr = '6']/page/regionViewport/regionBody/@bpd"/>
+ <eval expected="[0.0 -1.0 1.0 0.0 0.0 597171.0]" xpath="//pageViewport[@nr = '6']/page/regionViewport/regionBody/@ctm"/>
+
+ </checks>
+</testcase>
|