Hi Andreas,
Thank you for the reply. I created a diff file and then wrote the
checks, but I couldn't figure how to verify if the test was working.
Also since the page http://xmlgraphics.apache.org/fop/dev/testing.html
does not specify how I should submit the test file, I'm attaching the
files with this mail. If this is not the right way then please guide me
to submit the file properly.
To run the test, I tried by putting the file in the
test/layoutengine/standard-testcases folder and then setting the
variable "-Dfop.layoutengine.starts-with" to my test file name, but it
didn't run the test. If you could also let me know how to verify if the
test works then that would be great.
Lastly for my report I need to write who started the project and what
was the reason for starting the project. I know that James Tauber
started the project but could you please tell me why he started it?
Thank you,
Darshan
On 17/05/11 06:14, Andreas L. Delmelle wrote:
On 15 May 2011, at 07:18, darshan wrote:
Hi Darshan
Thank you all for answering my questions. I could run the test cases using the
variables in eclipse. That was great! Should I update the wiki so that other it
will be easier for other people using eclipse?
Yes, if you think that is useful, then by all means, go ahead. Thanks!
For the bug report 47279 from my previous mail, the bug seems to have been
fixed so can it's status be changed to resolved?
If it is really fixed somehow, then I'd definitely start by adding a comment
that describes how you verified this. If the reporter challenges your
assessment, he will reopen anyway, so it does no harm to close it if you are
convinced.
Lastly the bug report https://issues.apache.org/bugzilla/show_bug.cgi?id=50196
was reopened because there was no test case for the fix. I have reproduced the
error by modifying one of the existing layout test files. The xml file and the
output pdfs are attached. However I could not figure out how to write the
checks. How can I know which xpath elements should have what values? Could you
please guide as to how I can write the checks?
You will want to take a look at the generated area tree XML in the
build/test-results folder (or wherever you have the output sent to). Locate the
elements in the tree that play a part in the issue, and figure out which
attribute values to check.
Note: if you leave the<checks> element empty, you will still always get a
default check for a non-empty areaTree node. I added this once, to have a generic way
to check for simple things, like not throwing a NullPointerException, but I see it is
not mentioned on the Wiki...
Hope this helps!
Regards
Andreas
<?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: table-header_table-footer_padding.xml 633961 2011-05-23 18:22:06Z darshan $ -->
<testcase>
<info>
<p>
This test checks tables, especially headers and footers.
</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" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block space-after="100mm">
<fo:inline font-weight="bold">Test for header padding. Please see Page 2</fo:inline>
</fo:block>
<fo:table space-after="100mm" table-layout="fixed" width="100%">
<fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/>
<fo:table-header>
<fo:table-row background-color="yellow">
<fo:table-cell>
<fo:block>
<fo:inline padding-left="20">header1</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<fo:inline padding-left="20">header2</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-footer>
<fo:table-row background-color="orange">
<fo:table-cell>
<fo:block>
<fo:inline padding-left="20">footer1</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<fo:inline padding-left="20">footer2</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-footer>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:inline padding-left="30">cell1</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell background-color="lightgray">
<fo:block>
<fo:inline padding-left="30">cell2</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell background-color="lightgray">
<fo:block>
<fo:inline padding-left="30">cell3</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<fo:inline padding-left="30">cell4</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:inline padding-left="30">cell5</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell background-color="lightgray">
<fo:block>
<fo:inline padding-left="30">cell6</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell background-color="lightgray">
<fo:block>
<fo:inline padding-left="30">cell7</fo:inline>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<fo:inline padding-left="30">cell8</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</fo>
<checks>
<eval expected="0" xpath="/areaTree/pageSequence/pageViewport[1]/page/regionViewport/regionBody/footnote/@top-offset"/>
<eval expected="20000" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[2]/block/lineArea/inlineparent/@padding-start"/>
<eval expected="20000" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[4]/block/lineArea/inlineparent/@padding-start"/>
<eval expected="20000" xpath="/areatree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[10]/block/linearea/inlineparent/@padding-start"/>
<eval expected="20000" xpath="/areatree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[12]/block/linearea/inlineparent/@padding-start"/>
<eval expected="0" xpath="/areatree/pagesequence/pageViewport[2]/page/regionViewport/regionBody/footnote/@top-offset"/>
</checks>
</testcase>
35c35
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#ffff00" bkg-color="#ffff00" positioning="absolute"/>
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#ffff00" bkg-color="java.awt.Color[r=255,g=255,b=0]"
> positioning="absolute"/>
47c47
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#ffff00" bkg-color="#ffff00" left-offset="180000"
positioning="absolute"/>
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#ffff00" bkg-color="java.awt.Color[r=255,g=255,b=0]"
> left-offset="180000" positioning="absolute"/>
70c70
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#d3d3d3" bkg-color="#d3d3d3" is-reference-area="true"
left-offset="180000" top-offset="14400" positioning="absolute">
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#d3d3d3" bkg-color="java.awt.Color[r=211,g=211,b=211]"
> is-reference-area="true" left-offset="180000" top-offset="14400"
> positioning="absolute">
81c81
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#d3d3d3" bkg-color="#d3d3d3" is-reference-area="true"
top-offset="28800" positioning="absolute">
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#d3d3d3" bkg-color="java.awt.Color[r=211,g=211,b=211]"
> is-reference-area="true" top-offset="28800" positioning="absolute">
103c103
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#ffa500" bkg-color="#ffa500" top-offset="43200"
positioning="absolute"/>
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#ffa500" bkg-color="java.awt.Color[r=255,g=165,b=0]"
> top-offset="43200" positioning="absolute"/>
115c115
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#ffa500" bkg-color="#ffa500" left-offset="180000"
top-offset="43200" positioning="absolute"/>
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#ffa500" bkg-color="java.awt.Color[r=255,g=165,b=0]"
> left-offset="180000" top-offset="43200" positioning="absolute"/>
131c131
< <footnote top-offset="0"/>
---
> <footnote/>
145c145
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#ffff00" bkg-color="#ffff00" positioning="absolute"/>
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#ffff00" bkg-color="java.awt.Color[r=255,g=255,b=0]"
> positioning="absolute"/>
149c149
< <inlineparent ipd="44028" bpd="11100" ipda="64028" bpda="11100" bap="20000 0
0 0" padding-start="20000" offset="0">
---
> <inlineparent ipd="44028" bpd="11100" ipda="44028" bpda="11100" bap="0 0 0 0"
> offset="0">
157c157
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#ffff00" bkg-color="#ffff00" left-offset="180000"
positioning="absolute"/>
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#ffff00" bkg-color="java.awt.Color[r=255,g=255,b=0]"
> left-offset="180000" positioning="absolute"/>
161c161
< <inlineparent ipd="44028" bpd="11100" ipda="64028" bpda="11100" bap="20000 0
0 0" padding-start="20000" offset="0">
---
> <inlineparent ipd="44028" bpd="11100" ipda="44028" bpda="11100" bap="0 0 0 0"
> offset="0">
180c180
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#d3d3d3" bkg-color="#d3d3d3" is-reference-area="true"
left-offset="180000" top-offset="14400" positioning="absolute">
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#d3d3d3" bkg-color="java.awt.Color[r=211,g=211,b=211]"
> is-reference-area="true" left-offset="180000" top-offset="14400"
> positioning="absolute">
191c191
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#d3d3d3" bkg-color="#d3d3d3" is-reference-area="true"
top-offset="28800" positioning="absolute">
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#d3d3d3" bkg-color="java.awt.Color[r=211,g=211,b=211]"
> is-reference-area="true" top-offset="28800" positioning="absolute">
213c213
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#ffa500" bkg-color="#ffa500" top-offset="43200"
positioning="absolute"/>
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#ffa500" bkg-color="java.awt.Color[r=255,g=165,b=0]"
> top-offset="43200" positioning="absolute"/>
217c217
< <inlineparent ipd="37356" bpd="11100" ipda="57356" bpda="11100" bap="20000 0
0 0" padding-start="20000" offset="0">
---
> <inlineparent ipd="37356" bpd="11100" ipda="37356" bpda="11100" bap="0 0 0 0"
> offset="0">
225c225
< <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
background="color=#ffa500" bkg-color="#ffa500" left-offset="180000"
top-offset="43200" positioning="absolute"/>
---
> <block ipd="180000" bpd="14400" ipda="180000" bpda="14400" bap="0 0 0 0"
> background="color=#ffa500" bkg-color="java.awt.Color[r=255,g=165,b=0]"
> left-offset="180000" top-offset="43200" positioning="absolute"/>
229c229
< <inlineparent ipd="37356" bpd="11100" ipda="57356" bpda="11100" bap="20000 0
0 0" padding-start="20000" offset="0">
---
> <inlineparent ipd="37356" bpd="11100" ipda="37356" bpda="11100" bap="0 0 0 0"
> offset="0">
241c241
< <footnote top-offset="0"/>
---
> <footnote/>