]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Resurrected overwritten test case external-graphic4.xml under a different name.
authorJeremias Maerki <jeremias@apache.org>
Thu, 1 Sep 2005 15:57:03 +0000 (15:57 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 1 Sep 2005 15:57:03 +0000 (15:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@265747 13f79535-47bb-0310-9956-ffa450edef68

test/layoutengine/disabled-testcases.txt
test/layoutengine/testcases/external-graphic_oversized.xml [new file with mode: 0644]

index 727037f0a772812f8a848ae1c4e4e0ea70fbcc99..f782b308d12de4f8ebacb0bca4c60327dc5d172b 100644 (file)
@@ -5,6 +5,7 @@ block_space-before_space-after_2.xml
 block_word-spacing.xml
 block_word-spacing_text-align_justify.xml
 external-graphic_content-height_content-width.xml
+external-graphic_oversized.xml
 inline-block_keep-together.xml
 inline_block_nested_3.xml
 inline-container_block_nested.xml
diff --git a/test/layoutengine/testcases/external-graphic_oversized.xml b/test/layoutengine/testcases/external-graphic_oversized.xml
new file mode 100644 (file)
index 0000000..3b091a8
--- /dev/null
@@ -0,0 +1,52 @@
+<?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