chromium/third_party/blink/web_tests/svg/W3C-SVG-1.1/linking-uri-02-b.svg

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">

<!--======================================================================-->
<!--=  Copyright 2000 World Wide Web Consortium, (Massachusetts          =-->
<!--=  Institute of Technology, Institut National de Recherche en        =-->
<!--=  Informatique et en Automatique, Keio University). All Rights      =-->
<!--=  Reserved. See http://www.w3.org/Consortium/Legal/.                =-->
<!--======================================================================-->
<!-- =====================================================================-->
<!--                                                                      -->
<!-- linking-uri-02-b.svg                                                 -->
<!--                                                                      -->
<!-- Link test of the 'view' element and its attributes, 2 of 2, external.-->
<!--                                                                      -->
<!-- Note.  This is one of a pair, with linking-uri-01-b.svg, which is    -->
<!-- identical except that all of its links refer to the objects within   -->
<!-- itself.  The links herein refer to the matching objects in uri-01-b. -->
<!--                                                                      -->
<!-- Author : Lee Klosterman   01-February-2002                           -->
<!-- Revised for Mobile Profiles: Jun Fujisawa 16-Jul-2002                -->
<!--                                                                      -->
<!-- History:                                                             -->
<!--                                                                      -->
<!-- =====================================================================-->
<!--======================================================================-->
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
<!--= log messages, and therefore is no longer in the preceding preamble.=-->
<!--======================================================================-->
<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">

    <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" chapter="linking" section="uri" profile="f" index="02" >

        <!-- For BE-01 case, 'Previous' should target last BE of previous chapter-focus --> 

        <!-- Previous focus="view" BENumber="04" / -->

        <!-- For last BE of chapter, 'Next' should target first BE of next chapter-focus --> 

        <!-- Next chapter="script" focus="eventDom" BENumber="01" / -->
        <!-- Parent chapter="toc" / -->

        <!-- For now, all BE target DT-01 in same chapter-focus as Child -->

        <!-- Child testType="DT" DTNumber="01" / -->

		<OperatorScript version="$Revision: 1.7 $" testname="linking-uri-02-b.svg">
            <Paragraph>
                Verify the capability to handle links to 'view' elements, and the
                permissible attributes on those elements.  All of the links in this
                test case are external, i.e., to 'view' elements in another the SVG file.
                That file is linking-uri-01-b.svg. 
                This test is one of a pair, with linking-view-BE-04, which is substantially
                identical except that its links are all internal, targeting the same 'view'
                elements as the corresponding links in this test case,
                i.e., they are external).
            </Paragraph>
            <Paragraph>
                In the four quadrants of the initial picture are four graphical objects.  
                Clockwise from upper right, they are
                a red rectangle, blue ellipse, green polygon (pentagon), and yellow
                circle.  Each is labelled and tightly boxes with a rectangular frame.
                These are identical to their counterparts in linking-uri-01-b.svg, in which
                file each has an associated 'view' element, with attributes
                per the labels in the initial picture.
            </Paragraph>
            <Paragraph>
                In the center is a gray box with four lines of text, each of which says
                "Go to" followed by Rectangle, Ellipse, Polygon, and Circle, respectively.
                Each of these is contained within an 'a' element, whose xlink:href names
                the respective 'view' element of the respective graphical object.
            </Paragraph>
            <Paragraph>
                Activating the Rectangle link should cause the whole of linking-uri-01-b.svg to be
                displayed, which is visually similar similar to linking-uri-02-b.svg.  Its
                'view' element has no attributes (other than id), so the correct view in 
                the frame is of the parent 'svg' element, which is the whole picture.
            </Paragraph>
            <Paragraph>
                Assuming that a "back" action has been requested, activating the Ellipse link 
                should cause the initial picture to be replaced in the
                frame by the whole ellipse element, uniformly scaled, with its boxing rect
                just inside the frame.
            </Paragraph>
            <Paragraph>
                Assuming that a "back" action has
                been requested, activating the Polygon link should cause the initial 
                picture to remain unchanged within the frame, except that the polygon is
                "highlighted" (the meaning of highlighted is not further specified).
            </Paragraph>
            <Paragraph>
                Assuming that a "back" action has been requested, 
                activating the Circle link should cause the initial picture to be replaced in the
                frame by the whole whole element, non-uniformly scaled so that it is stretched
                horizontally into an ellipse, with its boxing rect just inside the frame.
            </Paragraph>
            <Paragraph>
                There are several reference images associated with this test case.  The first
                illustrates the correct initial state of the rendered SVG file, which should
                also be the correct picture after the Rectangle link is executed.
                The second, third, and fourth illustrate the correct images as described
                above after respectively the Ellipse, Polygon, and Circle links are activated.
                (Note.  This harness does not yet provide access to multiple PNGs; the PNG for the
                initial view is shown.)	
            </Paragraph>
            <Paragraph>
                The test uses the 'rect', 'circle', 'ellipse', and 'polygon' elements, 
                as well as basic fill (solid simple colors), 
                stroke (black and colored 1-pixel lines), font-family (Arial) and font-size properties.
            </Paragraph>
        </OperatorScript>

    </SVGTestCase>

    <title id="test-title">linking-uri-02-b</title>
    <desc id="test-desc">Link test of the 'view' element and its attributes, 2 of 2, external.</desc>
    <!--======================================================================-->
    <!--Content of Test Case follows...                  =====================-->
    <!--======================================================================-->
    <g id="test-body-content">
    	<text x="50" y="16" font-size="12" >Link test of the 'view' element and its attributes, 2 of 2, external.</text>
    	<g transform="translate(-150,75)">
    	    <rect x="300" y="55" width="125" height="85" fill="#aaa" />
    	    <a xlink:href="resources/linking-uri-01-b.svg#rect-view">
    	    	<text x="320" y="70" fill="red" >Go to Rectangle</text>
    	    </a>
    	    <a xlink:href="resources/linking-uri-01-b.svg#ellipse-view">
    	    	<text x="320" y="90" fill="blue" >Go to Ellipse</text>
    	    </a>
    	    <a xlink:href="resources/linking-uri-01-b.svg#circle-view">
    	    	<text x="320" y="110" fill="yellow" >Go to Circle</text>
    	    </a>
    	    <a xlink:href="resources/linking-uri-01-b.svg#polygon-view">
    	    	<text x="320" y="130" fill="green" >Go to Polygon</text>
    	    </a>
    	    <text x="310" y="150" font-size="12" >Click element's line</text>
    	    <text x="310" y="162" font-size="12" >to link to its view in</text>
    	    <text x="310" y="174" font-size="12" >linking-uri-01-b.</text>
    	</g>

    	<!-- In linking-uri-01-b, there is the following 'view' element. -->
    	<!-- View with no attributes.  Picture should not change. -->
    	<!-- <view id="rect-view" /> -->
    	<rect id="rect-object" fill="red"  x="295" y="36" width="135" height="68"/>
    	<text id="rect-label" x="340" y="116">Rectangle</text>
    	<rect x="292" y="29" width="141" height="91" fill="none" stroke="black" />
    	<text x="302" y="130" font-size="10" >No view attributes except id.</text>
    	<!-- In linking-uri-01-b, there is the following 'view' element. -->
    	<!-- Test viewBox.  Should blow-up the ellipse in the frame. -->
    	<!-- <view id="ellipse-view" viewBox="294 221 152 83"/> -->
    	<ellipse id="ellipse-object" fill="blue"  cx="370" cy="251" rx="72" ry="32"/>
    	<text id="ellipse-label" x="355" y="295">Ellipse</text>
    	<rect x="295" y="216" width="150" height="82" fill="none" stroke="black" />
    	<text x="315" y="214" font-size="10" >viewBox, should fill frame.</text>
    	<!-- In linking-uri-01-b, there is the following 'view' element. -->
    	<!-- Test preserveAspectRatio. -->
    	<!-- <view id="circle-view" viewBox="20 29 128 91.5" preserveAspectRatio="none"/> -->
    	<circle id="circle-object" fill="yellow"  cx="85" cy="68" r="36"/>
    	<text id="circle-label" x="70" y="116">Circle</text>
    	<rect x="36" y="29" width="98" height="91" fill="none" stroke="black" />
    	<text x="36" y="128" font-size="10" >viewBox &amp; non-uniform</text>
    	<text x="36" y="137" font-size="10" >preserveAspectRatio</text>
    	<!-- In linking-uri-01-b, there is the following 'view' element. -->
    	<!-- Test viewTarget attribute, should highlight the polygon. -->
    	<!-- <view id="polygon-view" viewTarget="polygon-object" /> -->
    	<polygon id="polygon-object" fill="green"  points="87,211 134,238 116,283 57,283 39,238 87,211"/>
    	<text id="polygon-label" x="65" y="295">Polygon</text>
    	<rect x="36" y="208" width="100" height="89" fill="none" stroke="black" />
    	<text x="46" y="197" font-size="10" >viewTarget, should</text>
    	<text x="46" y="206" font-size="10" >highlight polygon</text>
    </g>

	<text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.7 $</text>
	<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
</svg>