diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2010-04-09 15:21:00 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2010-04-09 15:21:00 +0000 |
commit | 83f36b614c3f1f1a866ff70fe9363cd5be31e986 (patch) | |
tree | 6e96940806b3600d3bd964eb24611a43fa7e7505 /test/events | |
parent | fad33d93cca6ce80d6291b7b36f8ed5f01f6b6d7 (diff) | |
download | xmlgraphics-fop-83f36b614c3f1f1a866ff70fe9363cd5be31e986.tar.gz xmlgraphics-fop-83f36b614c3f1f1a866ff70fe9363cd5be31e986.zip |
Added test cases to ensure that the event notification system runs smoothly
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@932461 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/events')
-rw-r--r-- | test/events/area.fo | 15 | ||||
-rw-r--r-- | test/events/block-level.fo | 19 | ||||
-rw-r--r-- | test/events/inline-level.fo | 17 | ||||
-rw-r--r-- | test/events/resource.fo | 15 | ||||
-rw-r--r-- | test/events/table.fo | 34 | ||||
-rw-r--r-- | test/events/validation.fo | 15 |
6 files changed, 115 insertions, 0 deletions
diff --git a/test/events/area.fo b/test/events/area.fo new file mode 100644 index 000000000..d10beccb0 --- /dev/null +++ b/test/events/area.fo @@ -0,0 +1,15 @@ +<?xml version="1.0" standalone="no"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="420pt" page-width="320pt" margin="10pt"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:block>This text contains an <fo:basic-link internal-destination="unresolved" + color="blue">unresolved reference</fo:basic-link>.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/test/events/block-level.fo b/test/events/block-level.fo new file mode 100644 index 000000000..df224260f --- /dev/null +++ b/test/events/block-level.fo @@ -0,0 +1,19 @@ +<?xml version="1.0" standalone="no"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="420pt" page-width="320pt" margin="10pt"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:block>The content of the following block-container is too wide:</fo:block> + <fo:block-container width="100pt" height="100pt" border="1pt solid black"> + <fo:block-container width="150pt" height="50pt" background-color="yellow"> + <fo:block/> + </fo:block-container> + </fo:block-container> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/test/events/inline-level.fo b/test/events/inline-level.fo new file mode 100644 index 000000000..26a00acff --- /dev/null +++ b/test/events/inline-level.fo @@ -0,0 +1,17 @@ +<?xml version="1.0" standalone="no"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="420pt" page-width="320pt" margin="10pt"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:block>The following line overflows its container:</fo:block> + <fo:block-container width="100pt" height="100pt" border="1pt solid black"> + <fo:block>ThisLineOverflowsItsContainer</fo:block> + </fo:block-container> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/test/events/resource.fo b/test/events/resource.fo new file mode 100644 index 000000000..64209e68d --- /dev/null +++ b/test/events/resource.fo @@ -0,0 +1,15 @@ +<?xml version="1.0" standalone="no"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="420pt" page-width="320pt" margin="10pt"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:block>This text contains a reference to a non-existent image: <fo:external-graphic + src="non-existent"/>.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/test/events/table.fo b/test/events/table.fo new file mode 100644 index 000000000..f71c30edb --- /dev/null +++ b/test/events/table.fo @@ -0,0 +1,34 @@ +<?xml version="1.0" standalone="no"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="420pt" page-width="320pt" margin="10pt"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:block>This table defines padding in collapsing border model:</fo:block> + <fo:table width="100%" table-layout="fixed" padding="1em"> + <fo:table-body> + <fo:table-row> + <fo:table-cell border="1pt solid black"> + <fo:block>Cell 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>Cell 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="1pt solid black"> + <fo:block>Cell 2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="1pt solid black"> + <fo:block>Cell 2.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/test/events/validation.fo b/test/events/validation.fo new file mode 100644 index 000000000..f4f30e05d --- /dev/null +++ b/test/events/validation.fo @@ -0,0 +1,15 @@ +<?xml version="1.0" standalone="no"?> +<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" + page-height="420pt" page-width="320pt" margin="10pt"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:block border-before-style="blah">This block contains has a property with an invalid + value.</fo:block> + </fo:flow> + </fo:page-sequence> +</fo:root> |