Debian Codegraph @

test_non_regression/fail/na/script/script-specify-02-f.svg

raw
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="CM" author="CL" status="accepted"
13 version="$Revision: 1.7 $" testname="$RCSfile: script-specify-02-f.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/script.html#ScriptingLanguage">
15 <p>
16 Tests the assertion that "It is also possible to specify the scripting language for each individual ‘script’ element by specifying a ‘type’ on the ‘script’ element." by setting it to an unknown value and checking the script is not executed.
17 The test uses an unknown (bogus) script language, which looks exactly like ECMAScript.
18 </p>
19 </d:testDescription>
20 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
21 <p>Load the test.</p>
22 </d:operatorScript>
23 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
24 <p>
25 The test is passed if string "Good, script didn't run" is displayed.
26 It fails if the string "No! This is not ECMAScript!" is displayed.
27 </p>
28 </d:passCriteria>
29 </d:SVGTestCase>
30 <title id="test-title">$RCSfile: script-specify-02-f.svg,v $</title>
31 <defs>
32 <font-face
33 font-family="SVGFreeSansASCII"
34 unicode-range="U+0-7F">
35 <font-face-src>
36 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
37 </font-face-src>
38 </font-face>
39 </defs>
40 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
41 <!-- Displayed Title -->
42 <text x="240" y="20" fill="black" text-anchor="middle">
43 Test unknown type attribute value on script element
44 </text>
45
46 <g font-size="24" font-weight="bold" transform="translate(240,170)" text-anchor="middle">
47 <text id="testPassed" fill="green">Good, script didn't run.</text>
48 <text id="testFailed" fill="red" visibility="hidden">No! This is not ECMAScript!</text>
49 </g>
50
51 <!-- The script should be run only if the user agent implemented the bogus language. -->
52 <script type="application/noSuchLanguage"><![CDATA[
53 document.getElementById('testPassed').setAttribute('visibility', 'hidden');
54 document.getElementById('testFailed').setAttribute('visibility', 'visible');
55 ]]></script>
56 </g>
57 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
58 <text id="revision" x="10" y="340" stroke="none"
59 fill="black">$Revision: 1.7 $</text>
60 </g>
61 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
62 <!-- comment out this watermark once the test is approved
63 <g id="draft-watermark">
64 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
65 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
66 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
67 </g>-->
68 </svg>
69