]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Testing all inline-level FOs inside fo:inline to check for ClassCastExceptions as...
authorJeremias Maerki <jeremias@apache.org>
Sat, 20 Aug 2005 14:40:01 +0000 (14:40 +0000)
committerJeremias Maerki <jeremias@apache.org>
Sat, 20 Aug 2005 14:40:01 +0000 (14:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@234033 13f79535-47bb-0310-9956-ffa450edef68

test/layoutengine/testcases/inline2.xml [new file with mode: 0644]

diff --git a/test/layoutengine/testcases/inline2.xml b/test/layoutengine/testcases/inline2.xml
new file mode 100644 (file)
index 0000000..d25247a
--- /dev/null
@@ -0,0 +1,59 @@
+<?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 fo:inline and nested nodes. Regression test for Bugzilla #36248.\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="5in" page-height="5in">\r
+          <fo:region-body/>\r
+        </fo:simple-page-master>\r
+      </fo:layout-master-set>\r
+      <fo:page-sequence master-reference="normal" white-space-collapse="true" id="ps1">\r
+        <fo:flow flow-name="xsl-region-body">\r
+          <fo:block>normal<fo:inline><fo:page-number/></fo:inline>normal</fo:block>\r
+          <fo:block>normal<fo:inline><fo:page-number-citation ref-id="ps1"/></fo:inline>normal</fo:block>\r
+          <fo:block>normal<fo:inline><fo:character character="x"/></fo:inline>normal</fo:block>\r
+          <fo:block>normal<fo:inline><fo:external-graphic src="../../resources/images/bgimg300dpi.jpg"/></fo:inline>normal</fo:block>\r
+          <fo:block>normal<fo:inline><fo:instream-foreign-object content-width="20pt" content-height="20pt">\r
+              <svg:svg viewBox="0 0 20 20">\r
+                <svg:g style="fill:red; stroke:#000000">\r
+                  <svg:rect x="0" y="0" width="15" height="15"/>\r
+                  <svg:rect x="5" y="5" width="15" height="15"/>\r
+                </svg:g>\r
+              </svg:svg>\r
+            </fo:instream-foreign-object>\r
+</fo:inline>normal</fo:block>\r
+          <fo:block>normal<fo:inline><fo:leader/></fo:inline>normal</fo:block>\r
+          <fo:block>normal<fo:inline><fo:wrapper>wrapped</fo:wrapper></fo:inline>normal</fo:block>\r
+          <fo:block>normal<fo:inline>TODO: bidi-override is missing here</fo:inline>normal</fo:block>\r
+          <fo:block>normal<fo:inline><fo:inline>nested inline</fo:inline></fo:inline>normal</fo:block>\r
+          <fo:block>normal<fo:inline><fo:footnote><fo:inline>bla</fo:inline><fo:footnote-body><fo:block>bla? yawn.</fo:block></fo:footnote-body></fo:footnote></fo:inline>normal</fo:block>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <eval expected="10" xpath="count(//flow/block)"/>\r
+    <!-- We don't really check all this stuff here, rather we're making sure there are no ClassCastExceptions anymore. -->\r
+  </checks>\r
+</testcase>\r