|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 Make sure that the SVG glyph context-* values are not considered real values |
|
5 when gfx.font_rendering.opentype_svg.enabled is pref'ed off. |
|
6 --> |
|
7 <head> |
|
8 <title>Test that SVG glyph context-* values can be pref'ed off</title> |
|
9 <script src="/tests/SimpleTest/SimpleTest.js"></script> |
|
10 </head> |
|
11 <body> |
|
12 |
|
13 <script> |
|
14 |
|
15 var props = { |
|
16 "fill" : "context-stroke none", |
|
17 "stroke" : "context-fill none", |
|
18 "fillOpacity" : "context-stroke-opacity", |
|
19 "strokeOpacity" : "context-fill-opacity", |
|
20 "strokeDasharray" : "context-value", |
|
21 "strokeDashoffset" : "context-value", |
|
22 "strokeWidth" : "context-value" |
|
23 }; |
|
24 |
|
25 function testDisabled() { |
|
26 for (var p in props) { |
|
27 document.body.style[p] = props[p]; |
|
28 is(document.body.style[p], "", p + " not settable to " + props[p]); |
|
29 document.body.style[p] = ""; |
|
30 } |
|
31 SimpleTest.finish(); |
|
32 } |
|
33 |
|
34 function testEnabled() { |
|
35 for (var p in props) { |
|
36 document.body.style[p] = props[p]; |
|
37 is(document.body.style[p], props[p], p + " settable to " + props[p]); |
|
38 document.body.style[p] = ""; |
|
39 } |
|
40 |
|
41 SpecialPowers.pushPrefEnv( |
|
42 {'set': [['gfx.font_rendering.opentype_svg.enabled', false]]}, |
|
43 testDisabled |
|
44 ); |
|
45 } |
|
46 |
|
47 SimpleTest.waitForExplicitFinish(); |
|
48 |
|
49 SpecialPowers.pushPrefEnv( |
|
50 {'set': [['gfx.font_rendering.opentype_svg.enabled', true]]}, |
|
51 testEnabled |
|
52 ); |
|
53 |
|
54 </script> |
|
55 |
|
56 </body> |
|
57 </html> |