| 1 |
<svg id="svg-root" width="100%" height="100%" |
| 2 |
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" |
| 3 |
xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =--> |
| 6 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 7 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 8 |
<!--= All Rights Reserved. =--> |
| 9 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 10 |
<!--======================================================================--> |
| 11 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 12 |
template-version="1.4" reviewer="ED" author="Microsoft" status="accepted" |
| 13 |
version="$Revision: 1.4 $" testname="$RCSfile: interact-pevents-10-f.svg,v $"> |
| 14 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/interact.html#PointerEvents"> |
| 15 |
<p> |
| 16 |
An element with 'display' set to 'none' or an element whose parent has 'display' set to 'none' is not a target of pointer events. |
| 17 |
</p> |
| 18 |
<p> |
| 19 |
Stack a 'circle' element with 'display' equal to 'none' on another 'circle' element. |
| 20 |
Specify an 'onclick' event handler on the 'circle' with 'display' set to 'none' that will change the 'visibility' of 'FAIL' text to 'visible'. |
| 21 |
Verify that the event handler does not fire which clicking on the top 'circle' element. |
| 22 |
Repeat with another set of 'circle' elements with the parent of one of the 'circle' elements having its 'display' set to 'none'. |
| 23 |
</p> |
| 24 |
</d:testDescription> |
| 25 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 26 |
<p> |
| 27 |
Click on both black circles. |
| 28 |
</p> |
| 29 |
</d:operatorScript> |
| 30 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 31 |
<p> |
| 32 |
Test passes if there is no red visible on the page after clicking the black circles. |
| 33 |
</p> |
| 34 |
</d:passCriteria> |
| 35 |
</d:SVGTestCase> |
| 36 |
<title id="test-title">$RCSfile: interact-pevents-10-f.svg,v $</title> |
| 37 |
<defs> |
| 38 |
<font-face |
| 39 |
font-family="SVGFreeSansASCII" |
| 40 |
unicode-range="U+0-7F"> |
| 41 |
<font-face-src> |
| 42 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 43 |
</font-face-src> |
| 44 |
</font-face> |
| 45 |
</defs> |
| 46 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 47 |
<circle cx="100" cy="200" r="50" /> |
| 48 |
<circle onclick="failTest()" display="none" cx="100" cy="200" r="50" /> |
| 49 |
<circle cx="250" cy="200" r="50" pointer-events="none" /> |
| 50 |
<g display="none"> |
| 51 |
<circle onclick="failTest()" cx="250" cy="200" r="50" /> |
| 52 |
</g> |
| 53 |
<text id="failText" visibility="hidden" x="100" y="100" font-size="80" fill="red">FAIL</text> |
| 54 |
<script type="text/javascript"><![CDATA[ |
| 55 |
try |
| 56 |
{ |
| 57 |
function failTest() |
| 58 |
{ |
| 59 |
var testElement = document.getElementById("failText"); |
| 60 |
testElement.setAttribute("visibility", "visible"); |
| 61 |
} |
| 62 |
} |
| 63 |
catch(ex) |
| 64 |
{ |
| 65 |
//alert('ERROR: ' + ex.message); |
| 66 |
}]]> |
| 67 |
</script> |
| 68 |
</g> |
| 69 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 70 |
<text id="revision" x="10" y="340" stroke="none" |
| 71 |
fill="black">$Revision: 1.4 $</text> |
| 72 |
</g> |
| 73 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 74 |
<!-- comment out this watermark once the test is approved --> |
| 75 |
<!-- |
| 76 |
<g id="draft-watermark"> |
| 77 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 78 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 79 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 80 |
</g> |
| 81 |
--> |
| 82 |
</svg> |