Bug 798843 - Test to check that context-* attribute values are not valid when gfx.font-rendering.opentype_svg.enabled pref is false r=dbaron
☠☠ backed out by c88b666cff54 ☠ ☠
authorJonathan Kew <jkew@mozilla.com>
Thu, 16 May 2013 14:35:15 +1200
changeset 146962 9fdf99c07466a28afff4e1a1182631ee478a36d9
parent 146961 51f5d900cd27bf875ccc24e89c39c71849b5bb57
child 146963 b322938b37ef87655606364b47897ca4b42ed022
push id25279
push useremorley@mozilla.com
push dateFri, 13 Sep 2013 14:01:29 +0000
treeherdermozilla-central@2b4aa0f8515e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs798843
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 798843 - Test to check that context-* attribute values are not valid when gfx.font-rendering.opentype_svg.enabled pref is false r=dbaron
layout/style/test/Makefile.in
layout/style/test/test_bug798843_pref.html
--- a/layout/style/test/Makefile.in
+++ b/layout/style/test/Makefile.in
@@ -72,16 +72,17 @@ MOCHITEST_FILES =	test_acid3_test46.html
 		test_bug664955.html \
 		test_bug667520.html \
 		test_bug645998.html \
 		file_bug645998-1.css \
 		file_bug645998-2.css \
 		test_bug716226.html \
 		test_bug765590.html \
 		test_bug798567.html \
+		test_bug798843_pref.html \
 		test_bug829816.html \
 		file_bug829816.css \
 		test_bug887741_at-rules_in_declaration_lists.html \
 		test_bug892929.html \
 		test_cascade.html \
 		test_ch_ex_no_infloops.html \
 		test_compute_data_with_start_struct.html \
 		test_computed_style.html \
new file mode 100644
--- /dev/null
+++ b/layout/style/test/test_bug798843_pref.html
@@ -0,0 +1,54 @@
+<!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"
+};
+
+function testDisabled() {
+  for (var p in props) {
+    document.body.style[p] = props[p];
+    is(document.body.style[p], "", p + " not settable to " + props[p]);
+    document.body.style[p] = "";
+  }
+}
+
+function testEnabled() {
+  for (var p in props) {
+    document.body.style[p] = props[p];
+    is(document.body.style[p], props[p], p + " settable to " + props[p]);
+    document.body.style[p] = "";
+  }
+
+  SpecialPowers.pushPrefEnv(
+    {'set': [['gfx.font_rendering.opentype_svg.enabled', false]]},
+    testDisabled
+  );
+}
+
+SpecialPowers.pushPrefEnv(
+  {'set': [['gfx.font_rendering.opentype_svg.enabled', true]]},
+  testEnabled
+);
+
+</script>
+
+</body>
+</html>