aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuca Furini <lfurini@apache.org>2015-02-14 10:55:13 +0000
committerLuca Furini <lfurini@apache.org>2015-02-14 10:55:13 +0000
commitc85d08c4b9adbf8135e18ad9c3f94e3469e4e12e (patch)
treee6075acd695de5204a89beb6166e7ea08e6f5e3d /test
parenta56f97607b7260a1ebfde968d53d35a5b333d6df (diff)
downloadxmlgraphics-fop-c85d08c4b9adbf8135e18ad9c3f94e3469e4e12e.tar.gz
xmlgraphics-fop-c85d08c4b9adbf8135e18ad9c3f94e3469e4e12e.zip
FOP-2348:
- fixing inconsistencies in attribute names when serializing / deserializing extension data, which caused data loss - adding testcase to avoid unsignalled regressions git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1659776 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/layoutengine/standard-testcases/pdf-embedded-file-extension.xml58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/pdf-embedded-file-extension.xml b/test/layoutengine/standard-testcases/pdf-embedded-file-extension.xml
new file mode 100644
index 000000000..43ffd312e
--- /dev/null
+++ b/test/layoutengine/standard-testcases/pdf-embedded-file-extension.xml
@@ -0,0 +1,58 @@
+<?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 the PDF embedded file extension,
+ and a link to an embedded file.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="simple">
+ <fo:region-body />
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:declarations>
+ <pdf:embedded-file filename="test.png" description="This is just a png image" src="../resources/images/arrow_down_large.png"/>
+ </fo:declarations>
+ <fo:page-sequence master-reference="simple">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>
+ See the
+ <fo:basic-link external-destination="url(embedded-file:test.png)">attached file</fo:basic-link>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks xmlns:pdf="apache:fop:extensions:pdf">
+ <eval expected="test.png" xpath="//extension-attachments/pdf:embedded-file/@filename"/>
+ <eval expected="This is just a png image" xpath="//extension-attachments/pdf:embedded-file/@description"/>
+ <eval expected="../resources/images/arrow_down_large.png" xpath="//extension-attachments/pdf:embedded-file/@src"/>
+ <eval expected="newWindow=false,dest=embedded-file:test.png" xpath="//inlineparent/@external-link"/>
+ </checks>
+ <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate" xmlns:nav="http://xmlgraphics.apache.org/fop/intermediate/document-navigation" xmlns:pdf="apache:fop:extensions:pdf">
+ <eval expected="test.png" xpath="//if:header/pdf:embedded-file/@filename"/>
+ <eval expected="This is just a png image" xpath="//if:header/pdf:embedded-file/@description"/>
+ <eval expected="../resources/images/arrow_down_large.png" xpath="//if:header/pdf:embedded-file/@src"/>
+ <eval expected="embedded-file:test.png" xpath="//if:page-trailer/nav:link/nav:goto-uri/@uri"/>
+ </if-checks>
+</testcase> \ No newline at end of file