| OLD | NEW |
| (Empty) |
| 1 <?xml version="1.0" encoding="UTF-8"?> | |
| 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/
SVG/1.1/DTD/svg11-tiny.dtd"> | |
| 3 | |
| 4 <!--======================================================================--> | |
| 5 <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =--> | |
| 6 <!--= Institute of Technology, Institut National de Recherche en =--> | |
| 7 <!--= Informatique et en Automatique, Keio University). All Rights =--> | |
| 8 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =--> | |
| 9 <!--======================================================================--> | |
| 10 <!-- ===================================================================== --> | |
| 11 <!-- --> | |
| 12 <!-- text-whiteSpace-BE-06.svg --> | |
| 13 <!-- renamed for 1.1 suite to text-ws-02-t.svg --> | |
| 14 <!-- --> | |
| 15 <!-- Test that viewer correctly handles whitespace --> | |
| 16 <!-- and the "space" attribute. --> | |
| 17 <!-- --> | |
| 18 <!-- Author : Lofton Henderson, 10-Apr-2000 --> | |
| 19 <!-- 1.1 revision by Vincent Hardy --> | |
| 20 <!-- --> | |
| 21 <!-- History: --> | |
| 22 <!-- 10-Apr-2000, LH: Serial#1 created. --> | |
| 23 <!-- 02-Jun-2000, LH=" rmv 1 extra SPACE before "indented", test 3" ser#2. --> | |
| 24 <!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . --> | |
| 25 <!-- 12-Dec-2000, JF: test case 2 lost its linebreaks. restored. --> | |
| 26 <!-- --> | |
| 27 <!-- ===================================================================== --> | |
| 28 <!--======================================================================--> | |
| 29 <!--= Note. After October 2000, revision history is kept as CVS 'commit' =--> | |
| 30 <!--= log messages, and therefore is no longer in the preceding preamble.=--> | |
| 31 <!--======================================================================--> | |
| 32 <svg version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:x
link="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" vi
ewBox="0 0 480 360"> | |
| 33 <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" > | |
| 34 <!--nav data here--> | |
| 35 <OperatorScript version="$Revision: 1.8 $" testname="text-ws-02-
t.svg"> | |
| 36 <Paragraph> | |
| 37 Test for viewer correct handling of whitespace and the 'xml:spac
e' attribute. | |
| 38 There are two sub-tests, for value "preserve". | |
| 39 In each test, the content of the 'text' element is written on | |
| 40 multiple lines. The first test of each pair has indented text w
ith leading | |
| 41 space characters, tabs, etc. The second has no indentation, but
a line break | |
| 42 before the content and after it. There are no space (or other w
hitespace) | |
| 43 characters at the ends of the lines. | |
| 44 </Paragraph> | |
| 45 <Paragraph> | |
| 46 The two test cases are self-descriptive. From the top; | |
| 47 first, "preserve" applied to essentially the same content as fir
st; | |
| 48 second, "preserve" applied to essentially the same content as se
cond. | |
| 49 </Paragraph> | |
| 50 <Paragraph> | |
| 51 In each test, the test string is in blue and the reference | |
| 52 image is in black. | |
| 53 The rendered picture should approximately match the reference im
age, | |
| 54 however there is some question in the reference image concerning
the | |
| 55 exact amount of space in the long-space areas. The third test us
es the nbsp unicode character | |
| 56 to force the reference white spaces display, which provides an a
ccurate match if the font in use | |
| 57 has the same metrics for that character and the default white sp
ace. | |
| 58 Also, variations are possible in the text fonts and layout (per
CSS2 rules). | |
| 59 </Paragraph> | |
| 60 <Paragraph> | |
| 61 The test also uses the 'rect' element, | |
| 62 as well as basic fill (solid primary colors), | |
| 63 stroke (black 1-pixel lines), font-family (Arial) | |
| 64 and font-size properties. | |
| 65 </Paragraph> | |
| 66 </OperatorScript> | |
| 67 </SVGTestCase> | |
| 68 | |
| 69 <title id="test-title">text-ws-02-t</title> | |
| 70 <desc id="test-desc">Test that viewer correctly handle whitespace and th
e "space" attribute.</desc> | |
| 71 <!--====================================================================
==--> | |
| 72 <!--Content of Test Case follows... ===================
==--> | |
| 73 <!--====================================================================
==--> | |
| 74 <g id="test-body-content"> | |
| 75 <text x="15" y="35" font-size="32" font-family="Verdana" fill="b
lack">Basic: xml:space attribute</text> | |
| 76 <text x="35" y="60" font-size="32" font-family="Verdana" fill="b
lack">& whitespace handling.</text> | |
| 77 <!-- Test 3: indented, spaces, tabs, and space='preserve' --> | |
| 78 <!-- Features=" line break and spaces before 1st line" tabs befo
re 2nd line; --> | |
| 79 <!-- spaces before 3rd line; no space at ends of any lines.
--> | |
| 80 <text x="15" y="105" fill="blue" font-size="40" font-family="Ari
al" xml:space="preserve"> | |
| 81 WS | |
| 82 with | |
| 83 indented lines. | |
| 84 </text> | |
| 85 <!-- should match this, with blank replacing HT, LF, etc --> | |
| 86 <text x="15" y="140" fill="black" font-size="40" font-family="Arial" xml:sp
ace='preserve'> WS   with  indented lines.</t
ext> | |
| 87 | |
| 88 <rect x="25" y="145" width="380" height="36" fill="none" stroke=
"black" /> | |
| 89 <text x="28" y="175" fill="black" font-size="40" font-family="Ar
ial" >xml:space='preserve'</text> | |
| 90 <!-- Test 4: non-indented, and space='preserve' --> | |
| 91 <!-- Features=" no line break before 1st line" no space either
at beginning --> | |
| 92 <!-- or end of any lines.
--> | |
| 93 <text x="15" y="225" fill="blue" font-size="40" font-family="Ari
al" xml:space="preserve">WS | |
| 94 non-indented lines. | |
| 95 </text> | |
| 96 <text x="15" y="260" fill="black" font-size="40" font-family="Ar
ial" >WS non-indented lines.</text> | |
| 97 <rect x="25" y="265" width="380" height="36" fill="none" stroke=
"black" /> | |
| 98 <text x="28" y="295" fill="black" font-size="40" font-family="Ar
ial" >xml:space='preserve'</text> | |
| 99 </g> | |
| 100 | |
| 101 <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="bl
ack">$Revision: 1.8 $</text> | |
| 102 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" s
troke="#000000"/> | |
| 103 <script> | |
| 104 if (window.testRunner) | |
| 105 window.testRunner.dumpSelectionRect(); | |
| 106 document.execCommand("SelectAll"); | |
| 107 </script> | |
| 108 </svg> | |
| 109 | |
| OLD | NEW |