summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/import/animate-interact-pevents-02-t-manual.svg
blob: 46290190442f34dde61205df4a4490bd84a9bc58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<svg id="svg-root" width="100%" height="100%"
  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <!--======================================================================-->
  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
  <!--=  Institute of Technology, European Research Consortium for         =-->
  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
  <!--=  All Rights Reserved.                                              =-->
  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
  <!--======================================================================-->
  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
    template-version="1.4" reviewer="DOH" author="AE" status="accepted"
    version="$Revision: 1.3 $" testname="$RCSfile: animate-interact-pevents-02-t.svg,v $">
    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty">
      <p>Testing pointer-events and rendering order</p>
    </d:testDescription>
    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
      <p>
        Move the mouse over the blue and purple shapes. Click the pink circle at the top right of the page. Move the mouse over the blue and purple shapes again.
      </p>
    </d:operatorScript>
    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
      <p>
        For the test to pass the blue rectangles must always turn pink on mouseover, and the ovals must turn pink on mouseover only if pointer-events are set to "ALL".
        If a shape other than the one currently hovered turns pink then the test has failed.
      </p>
    </d:passCriteria>
  </d:SVGTestCase>
  <title id="test-title">$RCSfile: animate-interact-pevents-02-t.svg,v $</title>
  <defs>
    <font-face
      font-family="SVGFreeSansASCII"
      unicode-range="U+0-7F">
      <font-face-src>
        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
      </font-face-src>
    </font-face>
  </defs>
  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">

    <rect x="15" y="15" height="280" width="450" fill="none" stroke="black" stroke-width="0.25"/>
    <g text-anchor="middle">
      <text x="240" y="30" fill="black" font-size="15">Testing pointer-events and rendering order</text>
      <text x="240" y="42" fill="#555" font-size="10">Rectangles should turn RED on mouseover </text>
      <text x="240" y="54" fill="#555" font-size="10">Ovals should turn RED if Pointer-Events are set to "ALL"</text>
    </g>
    <g id="buttons">
      <g text-anchor="middle" font-size="8" fill="#555" transform="translate(0,10)">
        <text x="400" y="85">Change "Pointer-Events" of </text>
        <text x="400" y="95">ovals from "ALL" to "NONE"</text>
        <circle id="on" cx="385" cy="65" r="10" fill-opacity="1" fill="#3c5" stroke="black" stroke-width="3"/>
        <circle id="off" cx="415" cy="65" r="10" fill-opacity="1" fill="#f35" stroke="black"/>
      </g>
      <g text-anchor="middle" font-size="12" fill="#555">
        <text id="all" x="240" y="285" fill="#555" visibility="visible">Purple ovals have "Pointer-Events" set to "ALL".</text>
        <text id="none" x="240" y="285" fill="#555" visibility="hidden">Purple ovals have Pointer-Events set to "NONE".</text>
      </g>
      <set xlink:href="#all" attributeName="visibility" to="visible" begin="on.mousedown" fill="freeze"/>
      <set xlink:href="#all" attributeName="visibility" to="hidden" begin="off.mousedown" fill="freeze"/>
      <set xlink:href="#none" attributeName="visibility" to="hidden" begin="on.mousedown" fill="freeze"/>
      <set xlink:href="#none" attributeName="visibility" to="visible" begin="off.mousedown" fill="freeze"/>
      <set xlink:href="#on" attributeName="stroke-width" to="3" begin="on.mousedown" fill="freeze"/>
      <set xlink:href="#on" attributeName="stroke-width" to="1" begin="off.mousedown" fill="freeze"/>
      <set xlink:href="#off" attributeName="stroke-width" to="3" begin="off.mousedown" fill="freeze"/>
      <set xlink:href="#off" attributeName="stroke-width" to="1" begin="on.mousedown" fill="freeze"/>
      <set xlink:href="#c10" attributeName="pointer-events" to="all" begin="on.mousedown" fill="freeze"/>
      <set xlink:href="#c10" attributeName="pointer-events" to="none" begin="off.mousedown" fill="freeze"/>
      <set xlink:href="#c11" attributeName="pointer-events" to="all" begin="on.mousedown" fill="freeze"/>
      <set xlink:href="#c11" attributeName="pointer-events" to="none" begin="off.mousedown" fill="freeze"/>
      <set xlink:href="#c12" attributeName="pointer-events" to="all" begin="on.mousedown" fill="freeze"/>
      <set xlink:href="#c12" attributeName="pointer-events" to="none" begin="off.mousedown" fill="freeze"/>
    </g>
    <g transform="scale(0.75, 0.5) translate(100, 85)">
      <circle id="c10" cx="160" cy="350" r="100" fill-opacity="1" fill="#53f" stroke="black" pointer-events="all">
        <set attributeName="fill" to="#F55" begin="c10.mouseover"/>
        <set attributeName="fill" to="#53f" begin="c10.mouseout"/>
      </circle>
      <rect id="r10" x="10" y="50" width="300" height="300" fill-opacity="1" fill="#35f" stroke="black">
        <set attributeName="fill" to="#F55" begin="r10.mouseover"/>
        <set attributeName="fill" to="#35f" begin="r10.mouseout"/>
      </rect>
      <circle id="c11" cx="310" cy="350" r="90" fill-opacity="1" fill="#75f" stroke="black" pointer-events="all">
        <set attributeName="fill" to="#F55" begin="c11.mouseover"/>
        <set attributeName="fill" to="#75f" begin="c11.mouseout"/>
      </circle>
      <rect id="r11" x="60" y="100" width="200" height="200" fill-opacity="1" fill="#57f" stroke="black">
        <set attributeName="fill" to="#F55" begin="r11.mouseover"/>
        <set attributeName="fill" to="#57f" begin="r11.mouseout"/>
      </rect>
      <circle id="c12" cx="310" cy="200" r="75" fill-opacity="1" fill="#97f" stroke="black" pointer-events="all">
        <set attributeName="fill" to="#F55" begin="c12.mouseover"/>
        <set attributeName="fill" to="#97f" begin="c12.mouseout"/>
      </circle>
      <rect id="r12" x="110" y="150" width="100" height="100" fill-opacity="1" fill="#79f" stroke="black">
        <set attributeName="fill" to="#F55" begin="r12.mouseover"/>
        <set attributeName="fill" to="#79f" begin="r12.mouseout"/>
      </rect>
      <g id="dasharray-rectangles" stroke-width="0.5" stroke-dasharray="4, 4">
        <rect id="r-dash10" x="10" y="50" width="300" height="300" fill-opacity="0" fill="none" stroke="black" pointer-events="none"/>
        <rect id="r-dash11" x="60" y="100" width="200" height="200" fill-opacity="0" fill="none" stroke="black" pointer-events="none"/>
        <rect id="r-dash12" x="110" y="150" width="100" height="100" fill-opacity="0" fill="none" stroke="black" pointer-events="none"/>
      </g>
    </g>
  </g>
  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
    <text id="revision" x="10" y="340" stroke="none"
      fill="black">$Revision: 1.3 $</text>
  </g>
  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
  <!-- comment out this watermark once the test is approved
  <g id="draft-watermark">
    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
  </g>-->
</svg>