diff options
author | Jeremias Maerki <jeremias@apache.org> | 2007-01-22 22:33:42 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2007-01-22 22:33:42 +0000 |
commit | a005ac2471d128d09efcfd6f6492a585c0b534c1 (patch) | |
tree | f2de479dec52b1f3a0ab6b6e055bc60df68b4a91 /test/layoutengine | |
parent | bb27387f8e982402a92ffaca2140314fa360fcad (diff) | |
download | xmlgraphics-fop-a005ac2471d128d09efcfd6f6492a585c0b534c1.tar.gz xmlgraphics-fop-a005ac2471d128d09efcfd6f6492a585c0b534c1.zip |
Bugzilla #41426:
Fix for ClassCastException when fo:wrapper was used as direct child of fo:flow.
Note: "id" attributes are still not handled properly on fo:wrapper!
Submitted by: Adrian Cumiskey <fop-dev.at.cumiskey.com>
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@498835 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/layoutengine')
-rw-r--r-- | test/layoutengine/disabled-testcases.xml | 9 | ||||
-rw-r--r-- | test/layoutengine/standard-testcases/wrapper_block_id.xml | 49 |
2 files changed, 53 insertions, 5 deletions
diff --git a/test/layoutengine/disabled-testcases.xml b/test/layoutengine/disabled-testcases.xml index 748f04f76..9767533d2 100644 --- a/test/layoutengine/disabled-testcases.xml +++ b/test/layoutengine/disabled-testcases.xml @@ -312,11 +312,10 @@ case should be revisited.</description> </testcase> <testcase> - <name>fo:wrapper around block-level content</name> - <file>wrapper_block.xml</file> - <description>A ClassCastException occurs when fo:wrapper directly surrounds a - block-level element because its layout manager is written to handle only - inline content.</description> + <name>fo:wrapper around block-level content (with id)</name> + <file>wrapper_block_id.xml</file> + <description>"id" attributes on fo:wrapper around block-level content don't get + added to the area tree.</description> </testcase> <testcase> <name>Bugzilla #40230: invalid extra page break</name> diff --git a/test/layoutengine/standard-testcases/wrapper_block_id.xml b/test/layoutengine/standard-testcases/wrapper_block_id.xml new file mode 100644 index 000000000..6b1d2aec4 --- /dev/null +++ b/test/layoutengine/standard-testcases/wrapper_block_id.xml @@ -0,0 +1,49 @@ +<?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 fo:wrapper surrounding block-level content with an ID.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="normal">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:wrapper color="red" id="id1">
+ <fo:block>block content.</fo:block>
+ </fo:wrapper>
+ <fo:wrapper id="id2"/>
+ <fo:block id="id3"/>
+ <fo:block><fo:page-number-citation ref-id="id1"/>-<fo:page-number-citation ref-id="id2"/>-<fo:page-number-citation ref-id="id3"/></fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <true xpath="boolean(//*[@prod-id='id3'])" fail-msg="ID 'id3' must have been produced to the area tree"/>
+ <true xpath="boolean(//*[@prod-id='id2'])" fail-msg="ID 'id2' must have been produced to the area tree"/>
+ <true xpath="boolean(//*[@prod-id='id1'])" fail-msg="ID 'id1' must have been produced to the area tree"/>
+ </checks>
+</testcase>
|