diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2009-10-23 17:27:14 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2009-10-23 17:27:14 +0000 |
commit | 20171ce3b3d9b4dddc24844ef22b4d6e669a4080 (patch) | |
tree | f83143a667fd924175965ee9557ff84d10d6b9e9 /test | |
parent | 662af8ed5acde4c1c9f2b0fd32af8f03528f98ca (diff) | |
parent | 65f82b62234e15a610233d9828433002cade1570 (diff) | |
download | xmlgraphics-fop-20171ce3b3d9b4dddc24844ef22b4d6e669a4080.tar.gz xmlgraphics-fop-20171ce3b3d9b4dddc24844ef22b4d6e669a4080.zip |
Merged changes from Trunk up to revision 829121
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Accessibility@829138 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
4 files changed, 517 insertions, 33 deletions
diff --git a/test/java/org/apache/fop/layoutengine/ElementListCheck.java b/test/java/org/apache/fop/layoutengine/ElementListCheck.java index 1b6077c29..e63fc3291 100644 --- a/test/java/org/apache/fop/layoutengine/ElementListCheck.java +++ b/test/java/org/apache/fop/layoutengine/ElementListCheck.java @@ -83,10 +83,10 @@ public class ElementListCheck implements LayoutEngineCheck { } if (domEl.getAttribute("w").length() > 0) { int w = Integer.parseInt(domEl.getAttribute("w")); - if (w != knuthEl.getW()) { + if (w != knuthEl.getWidth()) { fail("Expected w=" + w + " at position " + pos - + " but got: " + knuthEl.getW()); + + " but got: " + knuthEl.getWidth()); } } if ("true".equals(domEl.getAttribute("aux"))) { @@ -110,24 +110,24 @@ public class ElementListCheck implements LayoutEngineCheck { KnuthPenalty pen = (KnuthPenalty)knuthEl; if (domEl.getAttribute("w").length() > 0) { int w = Integer.parseInt(domEl.getAttribute("w")); - if (w != knuthEl.getW()) { + if (w != knuthEl.getWidth()) { fail("Expected w=" + w + " at position " + pos - + " but got: " + knuthEl.getW()); + + " but got: " + knuthEl.getWidth()); } } if (domEl.getAttribute("p").length() > 0) { if ("<0".equals(domEl.getAttribute("p"))) { - if (knuthEl.getP() >= 0) { + if (knuthEl.getPenalty() >= 0) { fail("Expected p<0" + " at position " + pos - + " but got: " + knuthEl.getP()); + + " but got: " + knuthEl.getPenalty()); } } else if (">0".equals(domEl.getAttribute("p"))) { - if (knuthEl.getP() <= 0) { + if (knuthEl.getPenalty() <= 0) { fail("Expected p>0" + " at position " + pos - + " but got: " + knuthEl.getP()); + + " but got: " + knuthEl.getPenalty()); } } else { int p; @@ -142,20 +142,20 @@ public class ElementListCheck implements LayoutEngineCheck { } else { p = Integer.parseInt(domEl.getAttribute("p")); } - if (p != knuthEl.getP()) { + if (p != knuthEl.getPenalty()) { fail("Expected p=" + p + " at position " + pos - + " but got: " + knuthEl.getP()); + + " but got: " + knuthEl.getPenalty()); } } } if ("true".equals(domEl.getAttribute("flagged"))) { - if (!pen.isFlagged()) { + if (!pen.isPenaltyFlagged()) { fail("Expected flagged penalty" + " at position " + pos); } } else if ("false".equals(domEl.getAttribute("flagged"))) { - if (pen.isFlagged()) { + if (pen.isPenaltyFlagged()) { fail("Expected non-flagged penalty" + " at position " + pos); } @@ -180,26 +180,26 @@ public class ElementListCheck implements LayoutEngineCheck { KnuthGlue glue = (KnuthGlue)knuthEl; if (domEl.getAttribute("w").length() > 0) { int w = Integer.parseInt(domEl.getAttribute("w")); - if (w != knuthEl.getW()) { + if (w != knuthEl.getWidth()) { fail("Expected w=" + w + " at position " + pos - + " but got: " + knuthEl.getW()); + + " but got: " + knuthEl.getWidth()); } } if (domEl.getAttribute("y").length() > 0) { int stretch = Integer.parseInt(domEl.getAttribute("y")); - if (stretch != knuthEl.getY()) { + if (stretch != knuthEl.getStretch()) { fail("Expected y=" + stretch + " (stretch) at position " + pos - + " but got: " + knuthEl.getY()); + + " but got: " + knuthEl.getStretch()); } } if (domEl.getAttribute("z").length() > 0) { int shrink = Integer.parseInt(domEl.getAttribute("z")); - if (shrink != knuthEl.getZ()) { + if (shrink != knuthEl.getShrink()) { fail("Expected z=" + shrink + " (shrink) at position " + pos - + " but got: " + knuthEl.getZ()); + + " but got: " + knuthEl.getShrink()); } } } else { diff --git a/test/java/org/apache/fop/util/ElementListUtilsTestCase.java b/test/java/org/apache/fop/util/ElementListUtilsTestCase.java index d41e9f94f..bebad4422 100644 --- a/test/java/org/apache/fop/util/ElementListUtilsTestCase.java +++ b/test/java/org/apache/fop/util/ElementListUtilsTestCase.java @@ -55,9 +55,9 @@ public class ElementListUtilsTestCase extends TestCase { assertFalse(res); - assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getP()); - assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getP()); - assertEquals(0, ((KnuthPenalty)lst.get(5)).getP()); + assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getPenalty()); + assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getPenalty()); + assertEquals(0, ((KnuthPenalty)lst.get(5)).getPenalty()); } /** @@ -82,11 +82,11 @@ public class ElementListUtilsTestCase extends TestCase { assertFalse(res); //Must insert an INFINITE penalty - assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getP()); - assertEquals(0, ((KnuthGlue)lst.get(2)).getW()); - assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(4)).getP()); - assertEquals(0, ((KnuthGlue)lst.get(5)).getW()); - assertEquals(0, ((KnuthGlue)lst.get(7)).getW()); + assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getPenalty()); + assertEquals(0, ((KnuthGlue)lst.get(2)).getWidth()); + assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(4)).getPenalty()); + assertEquals(0, ((KnuthGlue)lst.get(5)).getWidth()); + assertEquals(0, ((KnuthGlue)lst.get(7)).getWidth()); } /** @@ -110,9 +110,9 @@ public class ElementListUtilsTestCase extends TestCase { assertFalse(res); - assertEquals(0, ((KnuthPenalty)lst.get(1)).getP()); - assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getP()); - assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getP()); + assertEquals(0, ((KnuthPenalty)lst.get(1)).getPenalty()); + assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getPenalty()); + assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getPenalty()); } /** @@ -137,10 +137,10 @@ public class ElementListUtilsTestCase extends TestCase { assertFalse(res); //Must insert an INFINITE penalty - assertEquals(0, ((KnuthPenalty)lst.get(1)).getP()); - assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getP()); - assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getP()); - assertEquals(0, ((KnuthGlue)lst.get(6)).getW()); + assertEquals(0, ((KnuthPenalty)lst.get(1)).getPenalty()); + assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getPenalty()); + assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getPenalty()); + assertEquals(0, ((KnuthGlue)lst.get(6)).getWidth()); } diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_no-restartable.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_no-restartable.xml new file mode 100644 index 000000000..576a73ac6 --- /dev/null +++ b/test/layoutengine/standard-testcases/flow_changing-ipd_no-restartable.xml @@ -0,0 +1,404 @@ +<?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 that the code behaves properly when no restartable element can be found at + all after a changing IPD break. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-size="8pt" line-height="10pt" + provisional-distance-between-starts="6pt" provisional-label-separation="0"> + <fo:layout-master-set> + <fo:simple-page-master master-name="narrow" + page-height="70pt" page-width="320pt" margin="10pt"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + <fo:simple-page-master master-name="wide" + page-height="70pt" page-width="420pt" margin="10pt"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + <fo:page-sequence-master master-name="start-narrow-rest-wide"> + <fo:single-page-master-reference master-reference="narrow"/> + <fo:repeatable-page-master-reference master-reference="wide"/> + </fo:page-sequence-master> + <fo:page-sequence-master master-name="alternate"> + <fo:repeatable-page-master-alternatives> + <fo:conditional-page-master-reference master-reference="narrow" odd-or-even="odd"/> + <fo:conditional-page-master-reference master-reference="wide" odd-or-even="even"/> + </fo:repeatable-page-master-alternatives> + </fo:page-sequence-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="start-narrow-rest-wide"> + <fo:flow flow-name="xsl-region-body"> + <fo:block space-after="30pt">Before the table</fo:block> + <fo:table table-layout="fixed" width="100%"> + <fo:table-body> + <fo:table-row> + <fo:table-cell> + <fo:block> + <fo:block>Before page break</fo:block> + <fo:block>After page break</fo:block> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="start-narrow-rest-wide"> + <fo:flow flow-name="xsl-region-body"> + <fo:block space-after="30pt">Before the table</fo:block> + <fo:table table-layout="fixed" width="100%"> + <fo:table-body> + <fo:table-row> + <fo:table-cell> + <fo:block> + <fo:block>Before page break</fo:block> + <fo:block>After page break</fo:block> + </fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 1</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 3</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 4</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 5</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 6</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 7</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="alternate"> + <fo:flow flow-name="xsl-region-body"> + <fo:block space-after="30pt">Before the table</fo:block> + <fo:table table-layout="fixed" width="100%"> + <fo:table-body> + <fo:table-row> + <fo:table-cell> + <fo:block> + <fo:block>Before page break</fo:block> + <fo:block>After page break</fo:block> + </fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 1</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 3</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 4</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 5</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 6</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>Fill 7</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="start-narrow-rest-wide"> + <fo:flow flow-name="xsl-region-body"> + <fo:block space-after="30pt">Before the list</fo:block> + <fo:list-block> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Before page break</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>After page break</fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="start-narrow-rest-wide"> + <fo:flow flow-name="xsl-region-body"> + <fo:block space-after="30pt">Before the list</fo:block> + <fo:list-block> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Before page break</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>After page break</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 1</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 2</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 3</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 4</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 5</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 6</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 7</fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="alternate"> + <fo:flow flow-name="xsl-region-body"> + <fo:block space-after="30pt">Before the list</fo:block> + <fo:list-block> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Before page break</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>After page break</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 1</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 2</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 3</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 4</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 5</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 6</fo:block> + </fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block>Fill 7</fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + + <!-- Tables --> + <eval expected="Before page break" xpath="//pageSequence[1]/pageViewport[1]//flow/block[2]//text"/> + <eval expected="After page break" xpath="//pageSequence[1]/pageViewport[2]//flow/block[1]//text"/> + + <eval expected="Before page break" xpath="//pageSequence[2]/pageViewport[1]//flow/block[2]//text"/> + <eval expected="After page break" xpath="//pageSequence[2]/pageViewport[2]//flow/block/block[1]//text"/> + <eval expected="Fill 1" xpath="//pageSequence[2]/pageViewport[2]//flow/block/block[2]//text"/> + <eval expected="Fill 2" xpath="//pageSequence[2]/pageViewport[2]//flow/block/block[3]//text"/> + <eval expected="Fill 3" xpath="//pageSequence[2]/pageViewport[2]//flow/block/block[4]//text"/> + <eval expected="Fill 4" xpath="//pageSequence[2]/pageViewport[2]//flow/block/block[5]//text"/> + <eval expected="Fill 5" xpath="//pageSequence[2]/pageViewport[3]//flow/block/block[1]//text"/> + <eval expected="Fill 6" xpath="//pageSequence[2]/pageViewport[3]//flow/block/block[2]//text"/> + <eval expected="Fill 7" xpath="//pageSequence[2]/pageViewport[3]//flow/block/block[3]//text"/> + + <eval expected="Before page break" xpath="//pageSequence[3]/pageViewport[1]//flow/block[2]//text"/> + <eval expected="After page break" xpath="//pageSequence[3]/pageViewport[2]//flow/block/block[1]//text"/> + <eval expected="Fill 1" xpath="//pageSequence[3]/pageViewport[2]//flow/block/block[2]//text"/> + <eval expected="Fill 2" xpath="//pageSequence[3]/pageViewport[2]//flow/block/block[3]//text"/> + <eval expected="Fill 3" xpath="//pageSequence[3]/pageViewport[2]//flow/block/block[4]//text"/> + <eval expected="Fill 4" xpath="//pageSequence[3]/pageViewport[2]//flow/block/block[5]//text"/> + <eval expected="Fill 5" xpath="//pageSequence[3]/pageViewport[3]//flow/block/block[1]//text"/> + <eval expected="Fill 6" xpath="//pageSequence[3]/pageViewport[3]//flow/block/block[2]//text"/> + <eval expected="Fill 7" xpath="//pageSequence[3]/pageViewport[3]//flow/block/block[3]//text"/> + + <!-- Lists --> + <eval expected="Before page break" xpath="//pageSequence[4]/pageViewport[1]//flow/block[2]/block/block[2]//text"/> + <eval expected="After page break" xpath="//pageSequence[4]/pageViewport[2]//flow/block[1]/block/block[2]//text"/> + + <eval expected="Before page break" xpath="//pageSequence[5]/pageViewport[1]//flow/block[2]/block/block[2]//text"/> + <eval expected="After page break" xpath="//pageSequence[5]/pageViewport[2]//flow/block/block[1]/block[2]//text"/> + <eval expected="Fill 1" xpath="//pageSequence[5]/pageViewport[2]//flow/block/block[2]/block[2]//text"/> + <eval expected="Fill 2" xpath="//pageSequence[5]/pageViewport[2]//flow/block/block[3]/block[2]//text"/> + <eval expected="Fill 3" xpath="//pageSequence[5]/pageViewport[2]//flow/block/block[4]/block[2]//text"/> + <eval expected="Fill 4" xpath="//pageSequence[5]/pageViewport[2]//flow/block/block[5]/block[2]//text"/> + <eval expected="Fill 5" xpath="//pageSequence[5]/pageViewport[3]//flow/block/block[1]/block[2]//text"/> + <eval expected="Fill 6" xpath="//pageSequence[5]/pageViewport[3]//flow/block/block[2]/block[2]//text"/> + <eval expected="Fill 7" xpath="//pageSequence[5]/pageViewport[3]//flow/block/block[3]/block[2]//text"/> + + <eval expected="Before page break" xpath="//pageSequence[6]/pageViewport[1]//flow/block[2]/block/block[2]//text"/> + <eval expected="After page break" xpath="//pageSequence[6]/pageViewport[2]//flow/block/block[1]/block[2]//text"/> + <eval expected="Fill 1" xpath="//pageSequence[6]/pageViewport[2]//flow/block/block[2]/block[2]//text"/> + <eval expected="Fill 2" xpath="//pageSequence[6]/pageViewport[2]//flow/block/block[3]/block[2]//text"/> + <eval expected="Fill 3" xpath="//pageSequence[6]/pageViewport[2]//flow/block/block[4]/block[2]//text"/> + <eval expected="Fill 4" xpath="//pageSequence[6]/pageViewport[2]//flow/block/block[5]/block[2]//text"/> + <eval expected="Fill 5" xpath="//pageSequence[6]/pageViewport[3]//flow/block/block[1]/block[2]//text"/> + <eval expected="Fill 6" xpath="//pageSequence[6]/pageViewport[3]//flow/block/block[2]/block[2]//text"/> + <eval expected="Fill 7" xpath="//pageSequence[6]/pageViewport[3]//flow/block/block[3]/block[2]//text"/> + + </checks> +</testcase> diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_table-after-break.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_table-after-break.xml new file mode 100644 index 000000000..956563e20 --- /dev/null +++ b/test/layoutengine/standard-testcases/flow_changing-ipd_table-after-break.xml @@ -0,0 +1,80 @@ +<?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 that a table immediately following a changing IPD break is handled properly. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="narrow" + page-height="220pt" page-width="320pt" margin="10pt"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + <fo:simple-page-master master-name="wide" + page-height="220pt" page-width="420pt" margin="10pt"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + <fo:page-sequence-master master-name="pages"> + <fo:single-page-master-reference master-reference="narrow"/> + <fo:repeatable-page-master-reference master-reference="wide"/> + </fo:page-sequence-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="pages" font-size="8pt" line-height="10pt"> + <fo:flow flow-name="xsl-region-body" text-align="justify"> + <fo:block space-after="180pt">Before the table</fo:block> + <fo:table table-layout="fixed" width="100%" id="table"> + <fo:table-body> + <fo:table-row> + <fo:table-cell> + <fo:block> + <fo:block id="before_break">Block before the page break.</fo:block> + <fo:block id="after_break">Block after the page break.</fo:block> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:table table-layout="fixed" width="100%"> + <fo:table-body> + <fo:table-row> + <fo:table-cell> + <fo:block>After the table 1</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell> + <fo:block>After the table 2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="Block before the page break." xpath="//pageViewport[1]//flow/block[2]//text"/> + <eval expected="Block after the page break." xpath="//pageViewport[2]//flow/block[1]//text"/> + <eval expected="After the table 1" xpath="//pageViewport[2]//flow/block[2]/block[1]//text"/> + <eval expected="After the table 2" xpath="//pageViewport[2]//flow/block[2]/block[2]//text"/> + </checks> +</testcase> |