aboutsummaryrefslogtreecommitdiffstats
path: root/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'test/java')
-rw-r--r--test/java/org/apache/fop/events/EventChecker.java2
-rw-r--r--test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java24
2 files changed, 20 insertions, 6 deletions
diff --git a/test/java/org/apache/fop/events/EventChecker.java b/test/java/org/apache/fop/events/EventChecker.java
index 506658467..c2d5fcfd6 100644
--- a/test/java/org/apache/fop/events/EventChecker.java
+++ b/test/java/org/apache/fop/events/EventChecker.java
@@ -46,7 +46,7 @@ public class EventChecker implements EventListener {
if (id.equals(expectedEventID)) {
eventReceived = true;
for (Map.Entry<String, Object> param : expectedParams.entrySet()) {
- assertEquals(event.getParam(param.getKey()), param.getValue());
+ assertEquals(param.getValue(), event.getParam(param.getKey()));
}
}
}
diff --git a/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java b/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java
index b2b77e842..752d666c5 100644
--- a/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java
+++ b/test/java/org/apache/fop/render/pdf/PDFAConformanceTestCase.java
@@ -115,15 +115,29 @@ public class PDFAConformanceTestCase extends BasePDFTest {
@Test
public void svgTransparency() throws Exception {
- Map<String, Object> params = new HashMap<String, Object>();
- params.put("pdfProfile", PDFAMode.PDFA_1B);
- EventChecker eventChecker = new EventChecker(SVGEventProducer.class.getName()
- + ".transparencyIgnored", params);
FOUserAgent ua = getUserAgent();
- ua.getEventBroadcaster().addEventListener(eventChecker);
+ EventChecker eventChecker = setupEventChecker(ua, "transparencyIgnored");
File foFile = new File(foBaseDir, "svg-transparency.fo");
convertFO(foFile, ua, dumpPDF);
eventChecker.end();
}
+ @Test
+ public void svgContainingBitmapWithTransparency() throws Exception {
+ FOUserAgent ua = getUserAgent();
+ EventChecker eventChecker = setupEventChecker(ua, "bitmapWithTransparency");
+ File foFile = new File(foBaseDir, "svg-with-transparent-image.fo");
+ convertFO(foFile, ua, dumpPDF);
+ eventChecker.end();
+ }
+
+ private EventChecker setupEventChecker(FOUserAgent ua, String expectedEvent) {
+ Map<String, Object> params = new HashMap<String, Object>();
+ params.put("pdfProfile", PDFAMode.PDFA_1B);
+ EventChecker eventChecker = new EventChecker(SVGEventProducer.class.getName()
+ + "." + expectedEvent, params);
+ ua.getEventBroadcaster().addEventListener(eventChecker);
+ return eventChecker;
+ }
+
}