]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Test bookmarks pointing to a non-existing internal destination should just trigger...
authorSimon Steiner <ssteiner@apache.org>
Tue, 5 May 2020 07:43:58 +0000 (07:43 +0000)
committerSimon Steiner <ssteiner@apache.org>
Tue, 5 May 2020 07:43:58 +0000 (07:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1877370 13f79535-47bb-0310-9956-ffa450edef68

fop-core/src/test/java/org/apache/fop/events/EventProcessingTestCase.java
fop/test/events/bookmarks.fo [new file with mode: 0644]

index 4f87cca20e593743cd5edfe397bf68311fd7fcfd..66ec43193f5b17dec1098a99cc39af23c92564ba 100644 (file)
@@ -111,6 +111,12 @@ public class EventProcessingTestCase {
                 AreaEventProducer.class.getName() + ".unresolvedIDReferenceOnPage");
     }
 
+    @Test
+    public void testBookmarks() throws Exception {
+        doTest("bookmarks.fo",
+                AreaEventProducer.class.getName() + ".unresolvedIDReference");
+    }
+
     @Test
     public void testResource() throws Exception {
         doTest("resource.fo",
diff --git a/fop/test/events/bookmarks.fo b/fop/test/events/bookmarks.fo
new file mode 100644 (file)
index 0000000..568ea35
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+  <fo:layout-master-set>
+    <fo:simple-page-master page-width="8.5in" page-height="11in" master-name="Page">
+      <fo:region-body region-name="Body"/>
+    </fo:simple-page-master>
+    <fo:page-sequence-master master-name="PageSequence">
+      <fo:repeatable-page-master-reference master-reference="Page"/>
+    </fo:page-sequence-master>
+  </fo:layout-master-set>
+  <fo:bookmark-tree>
+      <fo:bookmark internal-destination="B1">
+        <fo:bookmark-title>w</fo:bookmark-title>
+      </fo:bookmark>
+  </fo:bookmark-tree>
+  <fo:page-sequence format="1" id="TH_LastPage" initial-page-number="auto" force-page-count="auto" master-reference="PageSequence">
+    <fo:flow flow-name="Body">
+        <fo:block>a</fo:block>
+    </fo:flow>
+  </fo:page-sequence>
+</fo:root>
\ No newline at end of file