OLD | NEW |
1 <!-- | 1 <!-- |
2 // test 77: external SVG fonts, from Erik Dahlstrom | 2 // test 77: external SVG fonts, from Erik Dahlstrom |
3 // | 3 // |
4 // SVGFonts are described here[3], and the relevant DOM methods | 4 // SVGFonts are described here[3], and the relevant DOM methods |
5 // used in the test are defined here[4]. | 5 // used in the test are defined here[4]. |
6 // | 6 // |
7 // Note that in order to be more predictable the svg should be | 7 // Note that in order to be more predictable the svg should be |
8 // visible, so that clause "For non-rendering environments, the | 8 // visible, so that clause "For non-rendering environments, the |
9 // user agent shall make reasonable assumptions about glyph | 9 // user agent shall make reasonable assumptions about glyph |
10 // metrics." doesn't influence the results. We use 'opacity:0' | 10 // metrics." doesn't influence the results. We use 'opacity:0' |
11 // to hide the SVG, but arguably it's still a "rendering | 11 // to hide the SVG, but arguably it's still a "rendering |
12 // environment". | 12 // environment". |
13 // | 13 // |
14 // The font-size 4000 was chosen because that matches the | 14 // The font-size 4000 was chosen because that matches the |
15 // unitsPerEm value in the svgfont, which makes it easy to check | 15 // unitsPerEm value in the svgfont, which makes it easy to check |
16 // the glyph advances since they will then be exactly what was | 16 // the glyph advances since they will then be exactly what was |
17 // specified in the svgfont. | 17 // specified in the svgfont. |
18 // | 18 // |
19 // [3] http://www.w3.org/TR/SVG11/fonts.html | 19 // [3] http://www.w3.org/TR/SVG11/fonts.html |
20 // [4] http://www.w3.org/TR/SVG11/text.html#InterfaceSVGTextContentElement | 20 // [4] http://www.w3.org/TR/SVG11/text.html#InterfaceSVGTextContentElement |
21 --> | 21 --> |
22 | 22 |
23 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 23 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
24 <html> | 24 <html> |
25 <head> | 25 <head> |
26 <script src="../../fast/js/resources/js-test-pre.js"></script> | 26 <script src="../../resources/js-test.js"></script> |
27 </head> | 27 </head> |
28 <body> | 28 <body> |
29 <p id="description"></p> | 29 <p id="description"></p> |
30 <div id="console"></div> | 30 <div id="console"></div> |
31 <script> | 31 <script> |
32 description("Acid3 test 77, checking text metric functionality"); | 32 description("Acid3 test 77, checking text metric functionality"); |
33 | 33 |
34 window.jsTestIsAsync = true; | 34 window.jsTestIsAsync = true; |
35 if (window.testRunner) | 35 if (window.testRunner) |
36 testRunner.waitUntilDone(); | 36 testRunner.waitUntilDone(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 shouldThrow("text.getEndPositionOfChar(-17)"); | 79 shouldThrow("text.getEndPositionOfChar(-17)"); |
80 shouldThrow("text.getEndPositionOfChar(4)"); | 80 shouldThrow("text.getEndPositionOfChar(4)"); |
81 | 81 |
82 finishJSTest(); | 82 finishJSTest(); |
83 } | 83 } |
84 | 84 |
85 startTest(); | 85 startTest(); |
86 </script> | 86 </script> |
87 </body> | 87 </body> |
88 </html> | 88 </html> |
OLD | NEW |