diff options
author | Mehdi Houshmand <mehdi@apache.org> | 2012-01-24 09:53:32 +0000 |
---|---|---|
committer | Mehdi Houshmand <mehdi@apache.org> | 2012-01-24 09:53:32 +0000 |
commit | f248634b7fcd300446c25275d89cf7e07f3757c3 (patch) | |
tree | 6c21f675be9722d81f8eaade9f5d58bbfbb94c75 /test | |
parent | fb20c15fa4aafcc71ddb7288d45d32db118a7d86 (diff) | |
download | xmlgraphics-fop-f248634b7fcd300446c25275d89cf7e07f3757c3.tar.gz xmlgraphics-fop-f248634b7fcd300446c25275d89cf7e07f3757c3.zip |
Reverted changes made in r1234877, see bugzilla#52513
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1235189 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
3 files changed, 17 insertions, 13 deletions
diff --git a/test/java/org/apache/fop/URIResolutionTestCase.java b/test/java/org/apache/fop/URIResolutionTestCase.java index 490486158..97d1c9c25 100644 --- a/test/java/org/apache/fop/URIResolutionTestCase.java +++ b/test/java/org/apache/fop/URIResolutionTestCase.java @@ -39,21 +39,19 @@ import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; -import org.junit.BeforeClass; -import org.junit.Test; -import org.w3c.dom.Document; - import org.apache.commons.io.IOUtils; import org.apache.commons.io.output.ByteArrayOutputStream; -import org.apache.xpath.XPathAPI; -import org.apache.xpath.objects.XObject; - import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.Fop; import org.apache.fop.apps.FopFactory; import org.apache.fop.apps.MimeConstants; import org.apache.fop.render.xml.XMLRenderer; +import org.apache.xpath.XPathAPI; +import org.apache.xpath.objects.XObject; +import org.junit.BeforeClass; +import org.junit.Test; +import org.w3c.dom.Document; /** * Tests URI resolution facilities. @@ -162,7 +160,8 @@ public class URIResolutionTestCase extends AbstractFOPTest { TransformerHandler athandler = tfactory.newTransformerHandler(); athandler.setResult(domres); - XMLRenderer atrenderer = new XMLRenderer(ua); + XMLRenderer atrenderer = new XMLRenderer(); + atrenderer.setUserAgent(ua); atrenderer.setContentHandler(athandler); ua.setRendererOverride(atrenderer); diff --git a/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java b/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java index 1f8abb9be..a0de2e8ab 100644 --- a/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java +++ b/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java @@ -97,9 +97,10 @@ public class AreaTreeParserTestCase extends AbstractIntermediateTest { Renderer targetRenderer = userAgent.getRendererFactory().createRenderer( userAgent, getTargetMIME()); - XMLRenderer renderer = new XMLRenderer(userAgent); + XMLRenderer renderer = new XMLRenderer(); renderer.mimicRenderer(targetRenderer); renderer.setContentHandler(handler); + renderer.setUserAgent(userAgent); userAgent.setRendererOverride(renderer); @@ -130,10 +131,12 @@ public class AreaTreeParserTestCase extends AbstractIntermediateTest { TransformerHandler handler = testAssistant.getTransformerFactory().newTransformerHandler(); DOMResult domResult = new DOMResult(); handler.setResult(domResult); + XMLRenderer renderer = new XMLRenderer(); + renderer.setContentHandler(handler); + FOUserAgent userAgent = createUserAgent(); - XMLRenderer renderer = new XMLRenderer(userAgent); userAgent.setRendererOverride(renderer); - renderer.setContentHandler(handler); + renderer.setUserAgent(userAgent); FontInfo fontInfo = new FontInfo(); AreaTreeModel treeModel = new RenderPagesModel(userAgent, diff --git a/test/java/org/apache/fop/layoutengine/LayoutEngineTestCase.java b/test/java/org/apache/fop/layoutengine/LayoutEngineTestCase.java index 6a0d424e9..46908a448 100644 --- a/test/java/org/apache/fop/layoutengine/LayoutEngineTestCase.java +++ b/test/java/org/apache/fop/layoutengine/LayoutEngineTestCase.java @@ -150,7 +150,8 @@ public class LayoutEngineTestCase { ua.getEventBroadcaster().addEventListener( new ConsoleEventListenerForTests(testFile.getName(), EventSeverity.WARN)); - XMLRenderer atrenderer = new XMLRenderer(ua); + XMLRenderer atrenderer = new XMLRenderer(); + atrenderer.setUserAgent(ua); atrenderer.setContentHandler(athandler); ua.setRendererOverride(atrenderer); fop = effFactory.newFop(ua); @@ -207,7 +208,8 @@ public class LayoutEngineTestCase { ua.getEventBroadcaster().addEventListener( new ConsoleEventListenerForTests(testFile.getName(), EventSeverity.WARN)); - IFRenderer ifRenderer = new IFRenderer(ua); + IFRenderer ifRenderer = new IFRenderer(); + ifRenderer.setUserAgent(ua); IFSerializer serializer = new IFSerializer(); serializer.setContext(new IFContext(ua)); |