aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/layoutengine/disabled-testcases.xml9
-rw-r--r--test/layoutengine/standard-testcases/block_break-after_bug40230.xml45
2 files changed, 53 insertions, 1 deletions
diff --git a/test/layoutengine/disabled-testcases.xml b/test/layoutengine/disabled-testcases.xml
index d4b94361f..cdaaaa741 100644
--- a/test/layoutengine/disabled-testcases.xml
+++ b/test/layoutengine/disabled-testcases.xml
@@ -318,4 +318,11 @@
block-level element because its layout manager is written to handle only
inline content.</description>
</testcase>
-</disabled-testcases> \ No newline at end of file
+ <testcase>
+ <name>Bugzilla #40230: invalid extra page break</name>
+ <file>block_break-after_bug40230.xml</file>
+ <description>Currently an extra page is created even if there is nothing
+ after a block with break-after="page"</description>
+ <reference>http://issues.apache.org/bugzilla/show_bug.cgi?id=40230</reference>
+ </testcase>
+</disabled-testcases>
diff --git a/test/layoutengine/standard-testcases/block_break-after_bug40230.xml b/test/layoutengine/standard-testcases/block_break-after_bug40230.xml
new file mode 100644
index 000000000..15c66482f
--- /dev/null
+++ b/test/layoutengine/standard-testcases/block_break-after_bug40230.xml
@@ -0,0 +1,45 @@
+<?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: block_break-after.xml 426576 2006-07-28 15:44:37Z jeremias $ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that a break-after when there is no further element
+ after should not produce any additional page.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="normal"
+ page-height="5cm" page-width="10cm">
+ <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:block>Some text with an &lt;fo:block break-after="page"/&gt; after.</fo:block>
+ <fo:block break-after="page"/>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="1" xpath="count(//pageViewport)"/>
+ </checks>
+</testcase>