aboutsummaryrefslogtreecommitdiffstats
path: root/test/java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2009-01-02 14:29:30 +0000
committerJeremias Maerki <jeremias@apache.org>2009-01-02 14:29:30 +0000
commit01ceb0032ead03d9c35abeee9075dabc3702fc7f (patch)
tree024f667fa9fbd31a966c08a0dff5211123b113eb /test/java
parent211330493a528d1793cc1b86ff9907ed16d1a16a (diff)
downloadxmlgraphics-fop-01ceb0032ead03d9c35abeee9075dabc3702fc7f.tar.gz
xmlgraphics-fop-01ceb0032ead03d9c35abeee9075dabc3702fc7f.zip
Introduced IFContext to provide access to foreign attributes (as discussed on fop-dev).
Removed the foreign attributes map from the drawImage methods as a consequence. Added support for foreign attributes on the page (PCL's paper-source and duplex-mode extensions). Fixed a couple of bugs parsing the document navigation elements. Build-time test suite now runs through. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@730740 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java')
-rw-r--r--test/java/org/apache/fop/intermediate/IFParserTestCase.java5
-rw-r--r--test/java/org/apache/fop/intermediate/IFTester.java3
-rw-r--r--test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java3
-rw-r--r--test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java3
4 files changed, 9 insertions, 5 deletions
diff --git a/test/java/org/apache/fop/intermediate/IFParserTestCase.java b/test/java/org/apache/fop/intermediate/IFParserTestCase.java
index b61c252d7..76d72c804 100644
--- a/test/java/org/apache/fop/intermediate/IFParserTestCase.java
+++ b/test/java/org/apache/fop/intermediate/IFParserTestCase.java
@@ -36,6 +36,7 @@ import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.MimeConstants;
import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.render.intermediate.IFContext;
import org.apache.fop.render.intermediate.IFDocumentHandler;
import org.apache.fop.render.intermediate.IFParser;
import org.apache.fop.render.intermediate.IFRenderer;
@@ -87,7 +88,7 @@ public class IFParserTestCase extends AbstractIntermediateTestCase {
//Setup painter
IFSerializer serializer = new IFSerializer();
- serializer.setUserAgent(userAgent);
+ serializer.setContext(new IFContext(userAgent));
serializer.mimicDocumentHandler(targetHandler);
serializer.setResult(domResult);
@@ -125,7 +126,7 @@ public class IFParserTestCase extends AbstractIntermediateTestCase {
FOUserAgent userAgent = createUserAgent();
IFSerializer serializer = new IFSerializer();
- serializer.setUserAgent(userAgent);
+ serializer.setContext(new IFContext(userAgent));
DOMResult domResult = new DOMResult();
serializer.setResult(domResult);
diff --git a/test/java/org/apache/fop/intermediate/IFTester.java b/test/java/org/apache/fop/intermediate/IFTester.java
index 7f64ad489..a3291a373 100644
--- a/test/java/org/apache/fop/intermediate/IFTester.java
+++ b/test/java/org/apache/fop/intermediate/IFTester.java
@@ -51,6 +51,7 @@ import org.apache.fop.area.RenderPagesModel;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.layoutengine.EvalCheck;
import org.apache.fop.layoutengine.TrueCheck;
+import org.apache.fop.render.intermediate.IFContext;
import org.apache.fop.render.intermediate.IFRenderer;
import org.apache.fop.render.intermediate.IFSerializer;
import org.apache.fop.util.DelegatingContentHandler;
@@ -113,7 +114,7 @@ public class IFTester {
ifRenderer.setUserAgent(ua);
IFSerializer serializer = new IFSerializer();
- serializer.setUserAgent(ua);
+ serializer.setContext(new IFContext(ua));
DOMResult result = new DOMResult();
serializer.setResult(result);
ifRenderer.setDocumentHandler(serializer);
diff --git a/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java b/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
index 51c4dc301..7f0462a75 100644
--- a/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
+++ b/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java
@@ -35,6 +35,7 @@ import org.apache.xmlgraphics.ps.dsc.events.DSCCommentTitle;
import org.apache.xmlgraphics.ps.dsc.events.DSCEvent;
import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.render.intermediate.IFContext;
/**
* Tests the image handling in PostScript output.
@@ -90,7 +91,7 @@ public class ImageHandlingTestCase extends AbstractPostScriptTestCase {
private void innerTestJPEGImageWithIF(int level) throws Exception {
FOUserAgent ua = fopFactory.newFOUserAgent();
PSDocumentHandler handler = new PSDocumentHandler();
- handler.setUserAgent(ua);
+ handler.setContext(new IFContext(ua));
PSRenderingUtil psUtil = handler.getPSUtil();
psUtil.setLanguageLevel(level);
psUtil.setOptimizeResources(true);
diff --git a/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java b/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java
index ace96e85d..e5b9a4d27 100644
--- a/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java
+++ b/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java
@@ -45,6 +45,7 @@ import org.apache.xmlgraphics.ps.dsc.events.DSCCommentPage;
import org.apache.xmlgraphics.ps.dsc.events.DSCCommentPages;
import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.render.intermediate.IFContext;
/**
* Tests the PostScript resource optimization (selective de-duplication of
@@ -77,7 +78,7 @@ public class ResourceOptimizationTestCase extends AbstractPostScriptTestCase {
public void testResourceOptimizationWithIF() throws Exception {
FOUserAgent ua = fopFactory.newFOUserAgent();
PSDocumentHandler handler = new PSDocumentHandler();
- handler.setUserAgent(ua);
+ handler.setContext(new IFContext(ua));
// This is the important part: we're enabling resource optimization
handler.getPSUtil().setOptimizeResources(true);
ua.setDocumentHandlerOverride(handler);