--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+ Copyright 2005 The Apache Software Foundation\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+-->\r
+<!-- $Id$ -->\r
+<testcase>\r
+ <info>\r
+ <p>\r
+ This test checks external-graphics. An oversized image is to be squeezed into page using min/opt/max values.\r
+ </p>\r
+ </info>\r
+ <fo>\r
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">\r
+ <fo:layout-master-set>\r
+ <fo:simple-page-master master-name="normal" page-width="21cm" page-height="29.7cm" margin="2cm">\r
+ <fo:region-body background-color="yellow"/>\r
+ </fo:simple-page-master>\r
+ </fo:layout-master-set>\r
+ <fo:page-sequence master-reference="normal" white-space-collapse="true">\r
+ <fo:flow flow-name="xsl-region-body">\r
+ <fo:block font-size="8pt">This first block is only to force an infinite loop if the image is not scaled down.</fo:block>\r
+ <!-- TODO If you remove the above block, the image is placed on the page although it's too big. No warnings. -->\r
+ <fo:block>\r
+ <fo:external-graphic src="../../resources/images/big-image.png" \r
+ inline-progression-dimension.maximum="100%" block-progression-dimension.maximum="100%"\r
+ content-width="scale-to-fit" content-height="scale-to-fit" overflow="hidden"/>\r
+ </fo:block>\r
+ <fo:block>EOF</fo:block>\r
+ </fo:flow>\r
+ </fo:page-sequence>\r
+ </fo:root>\r
+ </fo>\r
+ <checks>\r
+ <eval expected="0 0 595275 841889" xpath="//pageViewport/@bounds"/>\r
+ <eval expected="481891" xpath="//regionBody/@ipda"/>\r
+ <eval expected="728505" xpath="//regionBody/@bpda"/>\r
+ <eval expected="481891" xpath="//flow/block[2]/lineArea/viewport/@ipda"/>\r
+ <eval expected="728505" xpath="//flow/block[2]/lineArea/viewport/@bpda + //flow/block[1]/@bpda"/>\r
+ </checks>\r
+</testcase>\r