<?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-container_background-image_background-repeat.xml 627324 2008-02-13 09:35:01Z maxberger $ -->
<testcase>
  <info>
    <p>
      This test checks background images in block-containers.
    </p>
  </info>
  <variables>
    <img>../../resources/images/bgimg300dpi.jpg</img>
  </variables>
  <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-container left="10pt" top="10pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-color="blue" background-repeat="repeat-x" background-image="##img">
            <fo:block margin="0pt">repeat-x</fo:block>
          </fo:block-container>
          <fo:block-container left="150pt" top="10pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-color="blue" background-repeat="repeat-y" background-image="##img">
            <fo:block margin="0pt">repeat-y</fo:block>
          </fo:block-container>
          <fo:block-container left="10pt" top="110pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-color="blue" background-repeat="repeat" background-image="##img">
            <fo:block margin="0pt">repeat</fo:block>
          </fo:block-container>
          <fo:block-container left="150pt" top="110pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-color="blue" background-repeat="no-repeat" background-image="##img">
            <fo:block margin="0pt">no-repeat</fo:block>
          </fo:block-container>
          <fo:block-container left="10pt" top="210pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-position-vertical="75%" background-color="blue" background-repeat="repeat-x" background-image="##img">
            <fo:block margin="0pt">repeat-x and vertical: 75%</fo:block>
          </fo:block-container>
          <fo:block-container left="150pt" top="210pt" width="100pt" height="50pt" border="solid 5pt" padding="5pt" absolute-position="absolute" background-position-horizontal="75%" background-color="blue" background-repeat="repeat-y" background-image="##img">
            <fo:block margin="0pt">repeat-y and horizontal: 75%</fo:block>
          </fo:block-container>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </fo>
  <checks>
    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=repeat-x,horiz=0,vertical=0" xpath="//flow/block[1]/@background"/>
    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=repeat-y,horiz=0,vertical=0" xpath="//flow/block[2]/@background"/>
    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=repeat,horiz=0,vertical=0" xpath="//flow/block[3]/@background"/>
    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=0,vertical=0" xpath="//flow/block[4]/@background"/>
    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=repeat-x,horiz=0,vertical=10440" xpath="//flow/block[5]/@background"/>
    <eval expected="color=#0000ff,url=../../resources/images/bgimg300dpi.jpg,repeat=repeat-y,horiz=47940,vertical=0" xpath="//flow/block[6]/@background"/>
  </checks>
</testcase>
