aboutsummaryrefslogtreecommitdiffstats
path: root/fop/test/layoutengine/standard-testcases/change-bar_inline.xml
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2018-07-13 10:29:57 +0000
committerSimon Steiner <ssteiner@apache.org>2018-07-13 10:29:57 +0000
commite6748b4ed1522214915b2e3cd4df2db9f2b7b3b2 (patch)
treeb75f62ef1a16e363f01b0ddc2cb7f4daf9ad587d /fop/test/layoutengine/standard-testcases/change-bar_inline.xml
parenta53d9972f9aa1f7dcff8db4a0922113f6974681f (diff)
downloadxmlgraphics-fop-e6748b4ed1522214915b2e3cd4df2db9f2b7b3b2.tar.gz
xmlgraphics-fop-e6748b4ed1522214915b2e3cd4df2db9f2b7b3b2.zip
FOP-1760: Add change bar generation
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1835810 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fop/test/layoutengine/standard-testcases/change-bar_inline.xml')
-rw-r--r--fop/test/layoutengine/standard-testcases/change-bar_inline.xml81
1 files changed, 81 insertions, 0 deletions
diff --git a/fop/test/layoutengine/standard-testcases/change-bar_inline.xml b/fop/test/layoutengine/standard-testcases/change-bar_inline.xml
new file mode 100644
index 000000000..d90500db8
--- /dev/null
+++ b/fop/test/layoutengine/standard-testcases/change-bar_inline.xml
@@ -0,0 +1,81 @@
+<?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:change-bar-* on inline elements.</p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master page-height="145mm" page-width="210mm" margin="10mm"
+ master-name="master">
+ <fo:region-body column-count="2" column-gap="10mm"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="master">
+ <fo:flow flow-name="xsl-region-body">
+
+ <fo:block change-bar-style="solid" change-bar-color="red" change-bar-offset="2mm"
+ change-bar-width="0.3mm">
+
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
+ <fo:change-bar-begin change-bar-class="red-01"/><fo:inline id="red-01"
+ color="red">tempor incididunt</fo:inline><fo:change-bar-end
+ change-bar-class="red-01"/> ut labore et dolore magna aliqua.</fo:block>
+
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
+ <fo:change-bar-begin change-bar-class="red-02"/><fo:inline id="red-02"
+ color="red">tempor incididunt</fo:inline><fo:change-bar-end
+ change-bar-class="red-02"/> ut labore et <fo:change-bar-begin
+ change-bar-color="blue" change-bar-offset="3mm" change-bar-class="blue-02"
+ /><fo:inline id="blue-02" color="blue">dolore
+ magna</fo:inline><fo:change-bar-end change-bar-class="blue-02"/>
+ aliqua.</fo:block>
+
+ <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
+ <fo:change-bar-begin change-bar-class="red-03"/><fo:inline id="red-03-a"
+ color="red">tempor incididunt ut </fo:inline><fo:change-bar-begin
+ change-bar-color="blue" change-bar-offset="3mm" change-bar-class="blue-03"
+ /><fo:inline id="blue-03" color="blue">labore</fo:inline><fo:change-bar-end
+ change-bar-class="blue-03"/><fo:inline id="red-03-b" color="red"> et dolore
+ magna</fo:inline><fo:change-bar-end change-bar-class="red-03"/>
+ aliqua.</fo:block>
+
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="(solid,#ff0000,850)" xpath="//inlineparent[@prod-id='red-01']/inlineblock[1]/@border-start"/>
+ <eval expected="-6519" xpath="//inlineparent[@prod-id='red-01']/inlineblock[1]/@left-offset"/>
+ <eval expected="(solid,#ff0000,850)" xpath="//inlineparent[@prod-id='red-02']/inlineblock[1]/@border-start"/>
+ <eval expected="-6519" xpath="//inlineparent[@prod-id='red-02']/inlineblock[1]/@left-offset"/>
+ <eval expected="(solid,#0000ff,850)" xpath="//inlineparent[@prod-id='blue-02']/inlineblock[1]/@border-start"/>
+ <eval expected="-9353" xpath="//inlineparent[@prod-id='blue-02']/inlineblock[1]/@left-offset"/>
+ <eval expected="(solid,#ff0000,850)" xpath="//inlineparent[@prod-id='red-03-a']/inlineblock[1]/@border-start"/>
+ <eval expected="-6519" xpath="//inlineparent[@prod-id='red-03-a']/inlineblock[1]/@left-offset"/>
+ <eval expected="(solid,#ff0000,850)" xpath="//inlineparent[@prod-id='blue-03']/inlineblock[1]/@border-start"/>
+ <eval expected="-6519" xpath="//inlineparent[@prod-id='blue-03']/inlineblock[1]/@left-offset"/>
+ <eval expected="(solid,#0000ff,850)" xpath="//inlineparent[@prod-id='blue-03']/inlineblock[2]/@border-start"/>
+ <eval expected="-9353" xpath="//inlineparent[@prod-id='blue-03']/inlineblock[2]/@left-offset"/>
+ <eval expected="(solid,#ff0000,850)" xpath="//inlineparent[@prod-id='red-03-b']/inlineblock[1]/@border-start"/>
+ <eval expected="-6519" xpath="//inlineparent[@prod-id='red-03-b']/inlineblock[1]/@left-offset"/>
+ </checks>
+</testcase>