mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 798843 - Test to check that context-* attribute values are not valid when gfx.font-rendering.opentype_svg.enabled pref is false r=dbaron
This commit is contained in:
parent
a4c230a033
commit
01a69ae836
@ -84,6 +84,7 @@ MOCHITEST_FILES = test_acid3_test46.html \
|
|||||||
test_bug716226.html \
|
test_bug716226.html \
|
||||||
test_bug765590.html \
|
test_bug765590.html \
|
||||||
test_bug798567.html \
|
test_bug798567.html \
|
||||||
|
test_bug798843_pref.html \
|
||||||
test_cascade.html \
|
test_cascade.html \
|
||||||
test_ch_ex_no_infloops.html \
|
test_ch_ex_no_infloops.html \
|
||||||
test_compute_data_with_start_struct.html \
|
test_compute_data_with_start_struct.html \
|
||||||
|
50
layout/style/test/test_bug798843_pref.html
Normal file
50
layout/style/test/test_bug798843_pref.html
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<!--
|
||||||
|
Make sure that the SVG glyph context-* values are not considered real values
|
||||||
|
when gfx.font_rendering.opentype_svg.enabled is pref'ed off.
|
||||||
|
-->
|
||||||
|
<head>
|
||||||
|
<title>Test that SVG glyph context-* values can be pref'ed off</title>
|
||||||
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var props = {
|
||||||
|
"fill" : "context-stroke none",
|
||||||
|
"stroke" : "context-fill none",
|
||||||
|
"fillOpacity" : "context-stroke-opacity",
|
||||||
|
"strokeOpacity" : "context-fill-opacity",
|
||||||
|
"strokeDasharray" : "context-value",
|
||||||
|
"strokeDashoffset" : "context-value",
|
||||||
|
"strokeWidth" : "context-value"
|
||||||
|
};
|
||||||
|
|
||||||
|
var origPref = SpecialPowers.getBoolPref("gfx.font_rendering.opentype_svg.enabled");
|
||||||
|
|
||||||
|
SpecialPowers.setBoolPref("gfx.font_rendering.opentype_svg.enabled", true);
|
||||||
|
|
||||||
|
for (var prop in props) {
|
||||||
|
document.body.style[prop] = props[prop];
|
||||||
|
is(document.body.style[prop], props[prop],
|
||||||
|
prop + " settable to " + props[prop]);
|
||||||
|
document.body.style[prop] = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
SpecialPowers.setBoolPref("gfx.font_rendering.opentype_svg.enabled", false);
|
||||||
|
|
||||||
|
for (var prop in props) {
|
||||||
|
document.body.style[prop] = props[prop];
|
||||||
|
is(document.body.style[prop], "",
|
||||||
|
prop + " not settable to " + props[prop]);
|
||||||
|
document.body.style[prop] = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
SpecialPowers.setBoolPref("gfx.font_rendering.opentype_svg.enabled", origPref);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user