Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <svg id="svg-root" width="100%" height="100%" | |
|
fs
2017/03/23 16:55:43
I guess we could remove this test because SVGStrin
| |
| 2 viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" | |
| 3 xmlns:xlink="http://www.w3.org/1999/xlink" onload="runtest()"> | |
| 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="ED" status="accepted" | |
| 13 version="$Revision: 1.5 $" testname="$RCSfile: types-dom-06-f.svg,v $"> | |
| 14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3. org/TR/SVG11/types.html#InterfaceSVGStringList"> | |
| 15 <p> | |
| 16 This tests parts of the SVGStringList interface. Particularly it tests t hat | |
| 17 strings that are taken from one SVGStringList and then inserted into ano ther | |
| 18 SVGStringList duplicates the value instead of removing the value from th e | |
| 19 first list when it's inserted into the second list. | |
| 20 </p> | |
| 21 </d:testDescription> | |
| 22 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> | |
| 23 <p> | |
| 24 Run the test. No interaction required. | |
| 25 </p> | |
| 26 </d:operatorScript> | |
| 27 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> | |
| 28 <p> | |
| 29 | |
| 30 </p> | |
| 31 <p> | |
| 32 The test has passed if there are three green rectangles visible and no r ed. Red is an indication that the test failed. | |
| 33 </p> | |
| 34 </d:passCriteria> | |
| 35 </d:SVGTestCase> | |
| 36 <title id="test-title">$RCSfile: types-dom-06-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="../custom/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 | |
| 48 <defs> | |
| 49 <script type="application/ecmascript"> | |
| 50 function runtest() | |
| 51 { | |
| 52 try { | |
| 53 var r1 = document.getElementById ("r1"); | |
| 54 var r2 = document.getElementById ("r2"); | |
| 55 var r3 = document.getElementById ("r3"); | |
| 56 var i0 = r1.requiredFeatures.get Item(0); | |
| 57 var i1 = r1.requiredFeatures.get Item(1); | |
| 58 | |
| 59 if(i0 != "http://www.w3.org/TR/S VG11/feature#Shape") | |
| 60 { | |
| 61 r1.removeAttribute("requ iredFeatures"); | |
| 62 return; | |
| 63 } | |
| 64 if(i1 != "this.is.a.bogus.featur e.string") | |
| 65 { | |
| 66 r1.removeAttribute("requ iredFeatures"); | |
| 67 return; | |
| 68 } | |
| 69 if(r1.requiredFeatures.numberOfI tems != 2) | |
| 70 { | |
| 71 r1.removeAttribute("requ iredFeatures"); | |
| 72 return; | |
| 73 } | |
| 74 r2.requiredFeatures.appendItem(i 1); | |
| 75 if(r1.requiredFeatures.numberOfI tems != 2) | |
| 76 { | |
| 77 r1.removeAttribute("requ iredFeatures"); | |
| 78 return; | |
| 79 } | |
| 80 if(r2.requiredFeatures.numberOfI tems != 1) | |
| 81 { | |
| 82 r1.removeAttribute("requ iredFeatures"); | |
| 83 return; | |
| 84 } | |
| 85 r3.requiredFeatures.insertItemBe fore(i0,0); | |
| 86 if(r3.requiredFeatures.numberOfI tems != 2) | |
| 87 { | |
| 88 r3.setAttribute("fill", "red"); | |
| 89 return; | |
| 90 } | |
| 91 if(r1.requiredFeatures.numberOfI tems != 2) | |
| 92 { | |
| 93 r1.removeAttribute("requ iredFeatures"); | |
| 94 return; | |
| 95 } | |
| 96 } | |
| 97 catch(e) | |
| 98 { | |
| 99 var f = document.getElementById( "fail"); | |
| 100 f.setAttribute("fill", "red"); | |
| 101 } | |
| 102 } | |
| 103 </script> | |
| 104 </defs> | |
| 105 | |
| 106 <text x="50%" y="70" text-anchor="middle">SVGStringList DOM</tex t> | |
| 107 | |
| 108 <!-- background images --> | |
| 109 <g> | |
| 110 <rect width="100" height="100" fill="lime" transform="tr anslate(80 100)"/> | |
| 111 <rect width="100" height="100" fill="lime" transform="tr anslate(190 100)"/> | |
| 112 <rect width="100" height="100" fill="red" transform="tra nslate(300 100)"/> | |
| 113 </g> | |
| 114 | |
| 115 <!-- tests --> | |
| 116 <rect id="r1" requiredFeatures="http://www.w3.org/TR/SVG11/featu re#Shape this.is.a.bogus.feature.string" width="100" height="100" fill="red" tra nsform="translate(100 100)"/> | |
| 117 <rect id="r2" width="100" height="100" fill="red" transform="tra nslate(190 100)"/> | |
| 118 <rect id="r3" width="100" height="100" fill="lime" requiredFeatu res="http://www.w3.org/TR/SVG11/feature#Shape" transform="translate(300 100)"/> | |
| 119 | |
| 120 <rect id="fail" width="100%" height="100%" fill="none"/> | |
| 121 </g> | |
| 122 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> | |
| 123 <text id="revision" x="10" y="340" stroke="none" | |
| 124 fill="black">$Revision: 1.5 $</text> | |
| 125 </g> | |
| 126 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke= "#000"/> | |
| 127 <!-- comment out this watermark once the test is approved --><!-- | |
| 128 <g id="draft-watermark"> | |
| 129 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-w idth="1"/> | |
| 130 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size ="20" x="240" | |
| 131 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white" >DRAFT</text> | |
| 132 </g>--> | |
| 133 </svg> | |
| OLD | NEW |