Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | Make sure that the SVG glyph context-* values are not considered real values |
michael@0 | 5 | when gfx.font_rendering.opentype_svg.enabled is pref'ed off. |
michael@0 | 6 | --> |
michael@0 | 7 | <head> |
michael@0 | 8 | <title>Test that SVG glyph context-* values can be pref'ed off</title> |
michael@0 | 9 | <script src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | </head> |
michael@0 | 11 | <body> |
michael@0 | 12 | |
michael@0 | 13 | <script> |
michael@0 | 14 | |
michael@0 | 15 | var props = { |
michael@0 | 16 | "fill" : "context-stroke none", |
michael@0 | 17 | "stroke" : "context-fill none", |
michael@0 | 18 | "fillOpacity" : "context-stroke-opacity", |
michael@0 | 19 | "strokeOpacity" : "context-fill-opacity", |
michael@0 | 20 | "strokeDasharray" : "context-value", |
michael@0 | 21 | "strokeDashoffset" : "context-value", |
michael@0 | 22 | "strokeWidth" : "context-value" |
michael@0 | 23 | }; |
michael@0 | 24 | |
michael@0 | 25 | function testDisabled() { |
michael@0 | 26 | for (var p in props) { |
michael@0 | 27 | document.body.style[p] = props[p]; |
michael@0 | 28 | is(document.body.style[p], "", p + " not settable to " + props[p]); |
michael@0 | 29 | document.body.style[p] = ""; |
michael@0 | 30 | } |
michael@0 | 31 | SimpleTest.finish(); |
michael@0 | 32 | } |
michael@0 | 33 | |
michael@0 | 34 | function testEnabled() { |
michael@0 | 35 | for (var p in props) { |
michael@0 | 36 | document.body.style[p] = props[p]; |
michael@0 | 37 | is(document.body.style[p], props[p], p + " settable to " + props[p]); |
michael@0 | 38 | document.body.style[p] = ""; |
michael@0 | 39 | } |
michael@0 | 40 | |
michael@0 | 41 | SpecialPowers.pushPrefEnv( |
michael@0 | 42 | {'set': [['gfx.font_rendering.opentype_svg.enabled', false]]}, |
michael@0 | 43 | testDisabled |
michael@0 | 44 | ); |
michael@0 | 45 | } |
michael@0 | 46 | |
michael@0 | 47 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 48 | |
michael@0 | 49 | SpecialPowers.pushPrefEnv( |
michael@0 | 50 | {'set': [['gfx.font_rendering.opentype_svg.enabled', true]]}, |
michael@0 | 51 | testEnabled |
michael@0 | 52 | ); |
michael@0 | 53 | |
michael@0 | 54 | </script> |
michael@0 | 55 | |
michael@0 | 56 | </body> |
michael@0 | 57 | </html> |