gotoDSCComment(parser, DSCConstants.BEGIN_RESOURCE);
gotoDSCComment(parser, DSCConstants.BEGIN_RESOURCE);
gotoDSCComment(parser, DSCConstants.BEGIN_RESOURCE);
gotoDSCComment(parser, DSCConstants.BEGIN_RESOURCE);
PSResource form2 = new PSResource(PSResource.TYPE_FORM, "FOPForm:2");
checkResourceComment(parser, DSCConstants.BEGIN_RESOURCE, form2);
DSCCommentTitle title = (DSCCommentTitle)parser.nextEvent().asDSCComment();
assertEquals("image/jpeg test/resources/images/bgimg300dpi.jpg", title.getTitle());
String resourceContent = getResourceContent(parser);
if (level == 3) {
assertContains(resourceContent, "/FOPForm:2");
assertContains(resourceContent, "/DCTDecode filter");
assertContains(resourceContent, "/ReusableStreamDecode filter");
} else {
assertContains(resourceContent, "/FOPForm:2");
assertContains(resourceContent, "/DCTDecode filter");
assertAbsent(resourceContent, "/ReusableStreamDecode filter");
}
//---=== Page 1 ===---
DSCCommentPage page = (DSCCommentPage)gotoDSCComment(parser, DSCConstants.PAGE);
assertEquals(1, page.getPagePosition());
PSResource form1 = new PSResource(PSResource.TYPE_FORM, "FOPForm:1");
checkResourceComment(parser, DSCConstants.BEGIN_RESOURCE, form1);
title = (DSCCommentTitle)parser.nextEvent().asDSCComment();
assertEquals("image/jpeg test/resources/images/bgimg72dpi.jpg", title.getTitle());
resourceContent = getResourceContent(parser);