dom/smil/test/db_smilCSSFromTo.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/smil/test/db_smilCSSFromTo.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,455 @@
     1.4 +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ts=2 sw=2 sts=2 et: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +/* testcase data for simple "from-to" animations of CSS properties */
    1.11 +
    1.12 +// NOTE: This js file requires db_smilCSSPropertyList.js
    1.13 +
    1.14 +// NOTE: I'm Including 'inherit' and 'currentColor' as interpolatable values.
    1.15 +// According to SVG Mobile 1.2 section 16.2.9, "keywords such as inherit which
    1.16 +// yield a numeric computed value may be included in the values list for an
    1.17 +// interpolated animation".
    1.18 +
    1.19 +// Path of test URL (stripping off final slash + filename), for use in
    1.20 +// generating computed value of 'cursor' property
    1.21 +var _testPath = document.URL.substring(0, document.URL.lastIndexOf('/'));
    1.22 +
    1.23 +// Lists of testcases for re-use across multiple properties of the same type
    1.24 +var _fromToTestLists = {
    1.25 +  color: [
    1.26 +    new AnimTestcaseFromTo("rgb(100, 100, 100)", "rgb(200, 200, 200)",
    1.27 +                           { midComp: "rgb(150, 150, 150)" }),
    1.28 +    new AnimTestcaseFromTo("#F02000", "#0080A0",
    1.29 +                           { fromComp: "rgb(240, 32, 0)",
    1.30 +                             midComp: "rgb(120, 80, 80)",
    1.31 +                             toComp: "rgb(0, 128, 160)" }),
    1.32 +    new AnimTestcaseFromTo("crimson", "lawngreen",
    1.33 +                           { fromComp: "rgb(220, 20, 60)",
    1.34 +                             midComp: "rgb(172, 136, 30)",
    1.35 +                             toComp: "rgb(124, 252, 0)" }),
    1.36 +    new AnimTestcaseFromTo("currentColor", "rgb(100, 100, 100)",
    1.37 +                           { fromComp: "rgb(50, 50, 50)",
    1.38 +                             midComp: "rgb(75, 75, 75)" }),
    1.39 +  ],
    1.40 +  colorFromInheritBlack: [
    1.41 +    new AnimTestcaseFromTo("inherit", "rgb(200, 200, 200)",
    1.42 +                           { fromComp: "rgb(0, 0, 0)",
    1.43 +                             midComp: "rgb(100, 100, 100)" }),
    1.44 +  ],
    1.45 +  colorFromInheritWhite: [
    1.46 +    new AnimTestcaseFromTo("inherit", "rgb(205, 205, 205)",
    1.47 +                           { fromComp: "rgb(255, 255, 255)",
    1.48 +                             midComp: "rgb(230, 230, 230)" }),
    1.49 +  ],
    1.50 +  paintServer: [
    1.51 +    new AnimTestcaseFromTo("none", "none"),
    1.52 +    new AnimTestcaseFromTo("none", "blue", { toComp : "rgb(0, 0, 255)" }),
    1.53 +    new AnimTestcaseFromTo("rgb(50, 50, 50)", "none"),
    1.54 +    new AnimTestcaseFromTo("url(#gradA)", "url(#gradB) currentColor",
    1.55 +                           { fromComp: "url(\"" + document.URL +
    1.56 +                                       "#gradA\") rgb(0, 0, 0)",
    1.57 +                             toComp: "url(\"" + document.URL +
    1.58 +                                     "#gradB\") rgb(50, 50, 50)" },
    1.59 +                           "need support for URI-based paints"),
    1.60 +    new AnimTestcaseFromTo("url(#gradA) orange", "url(#gradB)",
    1.61 +                           { fromComp: "url(\"" + document.URL +
    1.62 +                                       "#gradA\") rgb(255, 165, 0)",
    1.63 +                             toComp: "url(\"" + document.URL +
    1.64 +                                     "#gradB\") rgb(0, 0, 0)" },
    1.65 +                           "need support for URI-based paints"),
    1.66 +    new AnimTestcaseFromTo("url(#no_grad)", "url(#gradB)",
    1.67 +                           { fromComp: "url(\"" + document.URL +
    1.68 +                                      "#no_grad\") " + "rgb(0, 0, 0)",
    1.69 +                             toComp: "url(\"" + document.URL +
    1.70 +                                     "#gradB\") rgb(0, 0, 0)" },
    1.71 +                           "need support for URI-based paints"),
    1.72 +    new AnimTestcaseFromTo("url(#no_grad) rgb(1,2,3)", "url(#gradB) blue",
    1.73 +                           { fromComp: "url(\"" + document.URL +
    1.74 +                                       "#no_grad\") " + "rgb(1, 2, 3)",
    1.75 +                             toComp: "url(\"" + document.URL +
    1.76 +                                     "#gradB\") rgb(0, 0, 255)" },
    1.77 +                           "need support for URI-based paints"),
    1.78 +  ],
    1.79 +  lengthNoUnits: [
    1.80 +    new AnimTestcaseFromTo("0",  "20", { fromComp:  "0px",
    1.81 +                                         midComp:  "10px",
    1.82 +                                         toComp:   "20px"}),
    1.83 +    new AnimTestcaseFromTo("50",  "0", { fromComp: "50px",
    1.84 +                                         midComp:  "25px",
    1.85 +                                         toComp:    "0px"}),
    1.86 +    new AnimTestcaseFromTo("30", "80", { fromComp: "30px",
    1.87 +                                         midComp:  "55px",
    1.88 +                                         toComp:   "80px"}),
    1.89 +  ],
    1.90 +  lengthNoUnitsSVG: [
    1.91 +    new AnimTestcaseFromTo("0",  "20", { fromComp:  "0",
    1.92 +                                         midComp:  "10",
    1.93 +                                         toComp:   "20"}),
    1.94 +    new AnimTestcaseFromTo("50",  "0", { fromComp: "50",
    1.95 +                                         midComp:  "25",
    1.96 +                                         toComp:    "0"}),
    1.97 +    new AnimTestcaseFromTo("30", "80", { fromComp: "30",
    1.98 +                                         midComp:  "55",
    1.99 +                                         toComp:   "80"}),
   1.100 +  ],
   1.101 +  lengthPx: [
   1.102 +    new AnimTestcaseFromTo("0px", "12px", { fromComp: "0px",
   1.103 +                                            midComp:  "6px"}),
   1.104 +    new AnimTestcaseFromTo("16px", "0px", { midComp: "8px",
   1.105 +                                            toComp:  "0px"}),
   1.106 +    new AnimTestcaseFromTo("10px", "20px", { midComp: "15px"}),
   1.107 +    new AnimTestcaseFromTo("41px", "1px", { midComp: "21px"}),
   1.108 +  ],
   1.109 +  lengthPctSVG: [
   1.110 +    new AnimTestcaseFromTo("20.5%", "0.5%", { midComp: "10.5%" }),
   1.111 +  ],
   1.112 +  lengthPxPctSVG: [
   1.113 +    new AnimTestcaseFromTo("10px", "10%", { midComp: "15px"},
   1.114 +                           "need support for interpolating between " +
   1.115 +                           "px and percent values"),
   1.116 +  ],
   1.117 +  opacity: [
   1.118 +    new AnimTestcaseFromTo("1", "0", { midComp: "0.5" }),
   1.119 +    new AnimTestcaseFromTo("0.2", "0.12", { midComp: "0.16" }),
   1.120 +    new AnimTestcaseFromTo("0.5", "0.7", { midComp: "0.6" }),
   1.121 +    new AnimTestcaseFromTo("0.5", "inherit",
   1.122 +                           { midComp: "0.75", toComp: "1" }),
   1.123 +    // Make sure we don't clamp out-of-range values before interpolation
   1.124 +    new AnimTestcaseFromTo("0.2", "1.2",
   1.125 +                           { midComp: "0.7", toComp: "1" },
   1.126 +                           "opacities with abs val >1 get clamped too early"),
   1.127 +    new AnimTestcaseFromTo("-0.2", "0.6",
   1.128 +                           { fromComp: "0", midComp: "0.2" }),
   1.129 +    new AnimTestcaseFromTo("-1.2", "1.6",
   1.130 +                           { fromComp: "0", midComp: "0.2", toComp: "1" },
   1.131 +                           "opacities with abs val >1 get clamped too early"),
   1.132 +    new AnimTestcaseFromTo("-0.6", "1.4",
   1.133 +                           { fromComp: "0", midComp: "0.4", toComp: "1" },
   1.134 +                           "opacities with abs val >1 get clamped too early"),
   1.135 +  ],
   1.136 +  URIsAndNone: [
   1.137 +    new AnimTestcaseFromTo("url(#idA)", "url(#idB)",
   1.138 +                           { fromComp: "url(\"" + document.URL + "#idA\")",
   1.139 +                             toComp: "url(\"" + document.URL + "#idB\")"}),
   1.140 +    new AnimTestcaseFromTo("none", "url(#idB)",
   1.141 +                           { toComp: "url(\"" + document.URL + "#idB\")"}),
   1.142 +    new AnimTestcaseFromTo("url(#idB)", "inherit",
   1.143 +                           { fromComp: "url(\"" + document.URL + "#idB\")",
   1.144 +                             toComp: "none"}),
   1.145 +  ],
   1.146 +};
   1.147 +
   1.148 +// List of attribute/testcase-list bundles to be tested
   1.149 +var gFromToBundles = [
   1.150 +  new TestcaseBundle(gPropList.clip, [
   1.151 +    new AnimTestcaseFromTo("rect(1px, 2px, 3px, 4px)",
   1.152 +                           "rect(11px, 22px, 33px, 44px)",
   1.153 +                           { midComp: "rect(6px, 12px, 18px, 24px)" }),
   1.154 +    new AnimTestcaseFromTo("rect(1px, auto, 3px, 4px)",
   1.155 +                           "rect(11px, auto, 33px, 44px)",
   1.156 +                           { midComp: "rect(6px, auto, 18px, 24px)" }),
   1.157 +    new AnimTestcaseFromTo("auto", "auto"),
   1.158 +    new AnimTestcaseFromTo("rect(auto, auto, auto, auto)",
   1.159 +                           "rect(auto, auto, auto, auto)"),
   1.160 +    // Interpolation not supported in these next cases (with auto --> px-value)
   1.161 +    new AnimTestcaseFromTo("rect(1px, auto, 3px, auto)",
   1.162 +                           "rect(11px, auto, 33px, 44px)"),
   1.163 +    new AnimTestcaseFromTo("rect(1px, 2px, 3px, 4px)",
   1.164 +                           "rect(11px, auto, 33px, 44px)"),
   1.165 +    new AnimTestcaseFromTo("rect(1px, 2px, 3px, 4px)", "auto"),
   1.166 +    new AnimTestcaseFromTo("auto", "rect(1px, 2px, 3px, 4px)"),
   1.167 +  ]),
   1.168 +  new TestcaseBundle(gPropList.clip_path, _fromToTestLists.URIsAndNone),
   1.169 +  new TestcaseBundle(gPropList.clip_rule, [
   1.170 +    new AnimTestcaseFromTo("nonzero", "evenodd"),
   1.171 +    new AnimTestcaseFromTo("evenodd", "inherit", { toComp: "nonzero" }),
   1.172 +  ]),
   1.173 +  new TestcaseBundle(gPropList.color,
   1.174 +                     [].concat(_fromToTestLists.color, [
   1.175 +    // Note: inherited value is rgb(50, 50, 50) (set on <svg>)
   1.176 +    new AnimTestcaseFromTo("inherit", "rgb(200, 200, 200)",
   1.177 +                           { fromComp: "rgb(50, 50, 50)",
   1.178 +                             midComp: "rgb(125, 125, 125)" }),
   1.179 +  ])),
   1.180 +  new TestcaseBundle(gPropList.color_interpolation, [
   1.181 +    new AnimTestcaseFromTo("sRGB", "auto", { fromComp: "srgb" }),
   1.182 +    new AnimTestcaseFromTo("inherit", "linearRGB",
   1.183 +                         { fromComp: "srgb", toComp: "linearrgb" }),
   1.184 +  ]),
   1.185 +  new TestcaseBundle(gPropList.color_interpolation_filters, [
   1.186 +    new AnimTestcaseFromTo("sRGB", "auto", { fromComp: "srgb" }),
   1.187 +    new AnimTestcaseFromTo("auto", "inherit",
   1.188 +                         { toComp: "linearrgb" }),
   1.189 +  ]),
   1.190 +  new TestcaseBundle(gPropList.cursor, [
   1.191 +    new AnimTestcaseFromTo("crosshair", "move"),
   1.192 +    new AnimTestcaseFromTo("url('a.cur'), url('b.cur'), nw-resize", "sw-resize",
   1.193 +                           { fromComp: "url(\"" + _testPath + "/a.cur\"), " +
   1.194 +                                       "url(\"" + _testPath + "/b.cur\"), " +
   1.195 +                                       "nw-resize"}),
   1.196 +  ]),
   1.197 +  new TestcaseBundle(gPropList.direction, [
   1.198 +    new AnimTestcaseFromTo("ltr", "rtl"),
   1.199 +    new AnimTestcaseFromTo("rtl", "inherit"),
   1.200 +  ]),
   1.201 +  new TestcaseBundle(gPropList.display, [
   1.202 +    // I'm not testing the "inherit" value for "display", because part of
   1.203 +    // my test runs with "display: none" on everything, and so the
   1.204 +    // inherited value isn't always the same.  (i.e. the computed value
   1.205 +    // of 'inherit' will be different in different tests)
   1.206 +    new AnimTestcaseFromTo("block", "table-cell"),
   1.207 +    new AnimTestcaseFromTo("inline", "inline-table"),
   1.208 +    new AnimTestcaseFromTo("table-row", "none"),
   1.209 +  ]),
   1.210 +  new TestcaseBundle(gPropList.dominant_baseline, [
   1.211 +    new AnimTestcaseFromTo("use-script", "no-change"),
   1.212 +    new AnimTestcaseFromTo("reset-size", "ideographic"),
   1.213 +    new AnimTestcaseFromTo("alphabetic", "hanging"),
   1.214 +    new AnimTestcaseFromTo("mathematical", "central"),
   1.215 +    new AnimTestcaseFromTo("middle", "text-after-edge"),
   1.216 +    new AnimTestcaseFromTo("text-before-edge", "auto"),
   1.217 +    new AnimTestcaseFromTo("use-script", "inherit", { toComp: "auto" } ),
   1.218 +  ]),
   1.219 +  // NOTE: Mozilla doesn't currently support "enable-background", but I'm
   1.220 +  // testing it here in case we ever add support for it, because it's
   1.221 +  // explicitly not animatable in the SVG spec.
   1.222 +  new TestcaseBundle(gPropList.enable_background, [
   1.223 +    new AnimTestcaseFromTo("new", "accumulate"),
   1.224 +  ]),
   1.225 +  new TestcaseBundle(gPropList.fill,
   1.226 +                     [].concat(_fromToTestLists.color,
   1.227 +                               _fromToTestLists.paintServer,
   1.228 +                               _fromToTestLists.colorFromInheritBlack)),
   1.229 +  new TestcaseBundle(gPropList.fill_opacity, _fromToTestLists.opacity),
   1.230 +  new TestcaseBundle(gPropList.fill_rule, [
   1.231 +    new AnimTestcaseFromTo("nonzero", "evenodd"),
   1.232 +    new AnimTestcaseFromTo("evenodd", "inherit", { toComp: "nonzero" }),
   1.233 +  ]),
   1.234 +  new TestcaseBundle(gPropList.filter, _fromToTestLists.URIsAndNone),
   1.235 +  new TestcaseBundle(gPropList.flood_color,
   1.236 +                     [].concat(_fromToTestLists.color,
   1.237 +                               _fromToTestLists.colorFromInheritBlack)),
   1.238 +  new TestcaseBundle(gPropList.flood_opacity, _fromToTestLists.opacity),
   1.239 +  new TestcaseBundle(gPropList.font, [
   1.240 +    // NOTE: 'line-height' is hard-wired at 10px in test_smilCSSFromTo.xhtml
   1.241 +    // because if it's not explicitly set, its value varies across platforms.
   1.242 +    // NOTE: System font values can't be tested here, because their computed
   1.243 +    // values vary from platform to platform.  However, they are tested
   1.244 +    // visually, in the reftest "anim-css-font-1.svg"
   1.245 +    new AnimTestcaseFromTo("10px serif", "30px serif",
   1.246 +                           { fromComp: "normal normal 400 10px / 10px serif",
   1.247 +                             toComp: "normal normal 400 30px / 10px serif"}),
   1.248 +    new AnimTestcaseFromTo("10px serif", "30px sans-serif",
   1.249 +                         { fromComp: "normal normal 400 10px / 10px serif",
   1.250 +                          toComp: "normal normal 400 30px / 10px sans-serif"}),
   1.251 +    new AnimTestcaseFromTo("1px / 90px cursive", "100px monospace",
   1.252 +                         { fromComp: "normal normal 400 1px / 10px cursive",
   1.253 +                           toComp: "normal normal 400 100px / 10px monospace"}),
   1.254 +    new AnimTestcaseFromTo("italic small-caps 200 1px cursive",
   1.255 +                           "100px monospace",
   1.256 +                        { fromComp: "italic small-caps 200 1px / 10px cursive",
   1.257 +                          toComp: "normal normal 400 100px / 10px monospace"}),
   1.258 +    new AnimTestcaseFromTo("oblique normal 200 30px / 10px cursive",
   1.259 +                           "normal small-caps 800 40px / 10px serif"),
   1.260 +  ]),
   1.261 +  new TestcaseBundle(gPropList.font_family, [
   1.262 +    new AnimTestcaseFromTo("serif", "sans-serif"),
   1.263 +    new AnimTestcaseFromTo("cursive", "monospace"),
   1.264 +  ]),
   1.265 +  new TestcaseBundle(gPropList.font_size,
   1.266 +                     [].concat(_fromToTestLists.lengthNoUnits,
   1.267 +                               _fromToTestLists.lengthPx, [
   1.268 +    new AnimTestcaseFromTo("10px", "40%", { midComp: "15px", toComp: "20px" }),
   1.269 +    new AnimTestcaseFromTo("160%", "80%",
   1.270 +                           { fromComp: "80px",
   1.271 +                             midComp: "60px",
   1.272 +                             toComp: "40px"}),
   1.273 +  ])),
   1.274 +  new TestcaseBundle(gPropList.font_size_adjust, [
   1.275 +    new AnimTestcaseFromTo("0.9", "0.1", { midComp: "0.5" }),
   1.276 +    new AnimTestcaseFromTo("0.5", "0.6", { midComp: "0.55" }),
   1.277 +    new AnimTestcaseFromTo("none", "0.4"),
   1.278 +  ]),
   1.279 +  new TestcaseBundle(gPropList.font_stretch, [
   1.280 +    new AnimTestcaseFromTo("normal", "wider", {},
   1.281 +                           "need support for animating between " +
   1.282 +                           "relative 'font-stretch' values"),
   1.283 +    new AnimTestcaseFromTo("narrower", "ultra-condensed", {},
   1.284 +                           "need support for animating between " +
   1.285 +                           "relative 'font-stretch' values"),
   1.286 +    new AnimTestcaseFromTo("ultra-condensed", "condensed",
   1.287 +                           { midComp: "extra-condensed" }),
   1.288 +    new AnimTestcaseFromTo("semi-condensed", "semi-expanded",
   1.289 +                           { midComp: "normal" }),
   1.290 +    new AnimTestcaseFromTo("expanded", "ultra-expanded",
   1.291 +                           { midComp: "extra-expanded" }),
   1.292 +    new AnimTestcaseFromTo("ultra-expanded", "inherit",
   1.293 +                           { midComp: "expanded", toComp: "normal" }),
   1.294 +  ]),
   1.295 +  new TestcaseBundle(gPropList.font_style, [
   1.296 +    new AnimTestcaseFromTo("italic", "inherit", { toComp: "normal" }),
   1.297 +    new AnimTestcaseFromTo("normal", "italic"),
   1.298 +    new AnimTestcaseFromTo("italic", "oblique"),
   1.299 +    new AnimTestcaseFromTo("oblique", "normal"),
   1.300 +  ]),
   1.301 +  new TestcaseBundle(gPropList.font_variant, [
   1.302 +    new AnimTestcaseFromTo("inherit", "small-caps", { fromComp: "normal" }),
   1.303 +    new AnimTestcaseFromTo("small-caps", "normal"),
   1.304 +  ]),
   1.305 +  new TestcaseBundle(gPropList.font_weight, [
   1.306 +    new AnimTestcaseFromTo("100", "900", { midComp: "500" }),
   1.307 +    new AnimTestcaseFromTo("700", "100", { midComp: "400" }),
   1.308 +    new AnimTestcaseFromTo("inherit", "200",
   1.309 +                           { fromComp: "400", midComp: "300" }),
   1.310 +    new AnimTestcaseFromTo("normal", "bold",
   1.311 +                           { fromComp: "400", midComp: "500", toComp: "700" }),
   1.312 +    new AnimTestcaseFromTo("lighter", "bolder", {},
   1.313 +                           "need support for animating between " +
   1.314 +                           "relative 'font-weight' values"),
   1.315 +  ]),
   1.316 +  // NOTE: Mozilla doesn't currently support "glyph-orientation-horizontal" or
   1.317 +  // "glyph-orientation-vertical", but I'm testing them here in case we ever
   1.318 +  // add support for them, because they're explicitly not animatable in the SVG
   1.319 +  // spec.
   1.320 +  new TestcaseBundle(gPropList.glyph_orientation_horizontal,
   1.321 +                     [ new AnimTestcaseFromTo("45deg", "60deg") ]),
   1.322 +  new TestcaseBundle(gPropList.glyph_orientation_vertical,
   1.323 +                     [ new AnimTestcaseFromTo("45deg", "60deg") ]),
   1.324 +  new TestcaseBundle(gPropList.image_rendering, [
   1.325 +    new AnimTestcaseFromTo("auto", "optimizeQuality",
   1.326 +                           { toComp: "optimizequality" }),
   1.327 +    new AnimTestcaseFromTo("optimizeQuality", "optimizeSpeed",
   1.328 +                           { fromComp: "optimizequality",
   1.329 +                             toComp: "optimizespeed" }),
   1.330 +  ]),
   1.331 +  new TestcaseBundle(gPropList.letter_spacing,
   1.332 +                     [].concat(_fromToTestLists.lengthNoUnits,
   1.333 +                               _fromToTestLists.lengthPx,
   1.334 +                               _fromToTestLists.lengthPxPctSVG)),
   1.335 +  new TestcaseBundle(gPropList.letter_spacing,
   1.336 +                     _fromToTestLists.lengthPctSVG,
   1.337 +                     "pct->pct animations don't currently work for " +
   1.338 +                     "*-spacing properties"),
   1.339 +  new TestcaseBundle(gPropList.lighting_color,
   1.340 +                     [].concat(_fromToTestLists.color,
   1.341 +                               _fromToTestLists.colorFromInheritWhite)),
   1.342 +  new TestcaseBundle(gPropList.marker, _fromToTestLists.URIsAndNone),
   1.343 +  new TestcaseBundle(gPropList.marker_end, _fromToTestLists.URIsAndNone),
   1.344 +  new TestcaseBundle(gPropList.marker_mid, _fromToTestLists.URIsAndNone),
   1.345 +  new TestcaseBundle(gPropList.marker_start, _fromToTestLists.URIsAndNone),
   1.346 +  new TestcaseBundle(gPropList.mask, _fromToTestLists.URIsAndNone),
   1.347 +  new TestcaseBundle(gPropList.opacity, _fromToTestLists.opacity),
   1.348 +  new TestcaseBundle(gPropList.overflow, [
   1.349 +    new AnimTestcaseFromTo("auto", "visible"),
   1.350 +    new AnimTestcaseFromTo("inherit", "visible", { fromComp: "hidden" }),
   1.351 +    new AnimTestcaseFromTo("scroll", "auto"),
   1.352 +  ]),
   1.353 +  new TestcaseBundle(gPropList.pointer_events, [
   1.354 +    new AnimTestcaseFromTo("visibleFill", "stroke",
   1.355 +                           { fromComp: "visiblefill" }),
   1.356 +    new AnimTestcaseFromTo("none", "visibleStroke",
   1.357 +                           { toComp: "visiblestroke" }),
   1.358 +  ]),
   1.359 +  new TestcaseBundle(gPropList.shape_rendering, [
   1.360 +    new AnimTestcaseFromTo("auto", "optimizeSpeed",
   1.361 +                           { toComp: "optimizespeed" }),
   1.362 +    new AnimTestcaseFromTo("crispEdges", "geometricPrecision",
   1.363 +                           { fromComp: "crispedges",
   1.364 +                             toComp: "geometricprecision" }),
   1.365 +  ]),
   1.366 +  new TestcaseBundle(gPropList.stop_color,
   1.367 +                        [].concat(_fromToTestLists.color,
   1.368 +                                  _fromToTestLists.colorFromInheritBlack)),
   1.369 +  new TestcaseBundle(gPropList.stop_opacity, _fromToTestLists.opacity),
   1.370 +  new TestcaseBundle(gPropList.stroke,
   1.371 +                     [].concat(_fromToTestLists.color,
   1.372 +                               _fromToTestLists.paintServer, [
   1.373 +     // Note: inherited value is "none" (the default for "stroke" property)
   1.374 +     new AnimTestcaseFromTo("inherit", "rgb(200, 200, 200)",
   1.375 +                            { fromComp: "none"})])),
   1.376 +  new TestcaseBundle(gPropList.stroke_dasharray,
   1.377 +                     [].concat(_fromToTestLists.lengthPctSVG,
   1.378 +                               [
   1.379 +    new AnimTestcaseFromTo("inherit", "20", { fromComp: "none"}),
   1.380 +    new AnimTestcaseFromTo("1", "none"),
   1.381 +    new AnimTestcaseFromTo("10", "20", { midComp: "15"}),
   1.382 +    new AnimTestcaseFromTo("1", "2, 3", { fromComp: "1, 1",
   1.383 +                                          midComp: "1.5, 2"}),
   1.384 +    new AnimTestcaseFromTo("2, 8", "6", { midComp: "4, 7"}),
   1.385 +    new AnimTestcaseFromTo("1, 3", "1, 3, 5, 7, 9",
   1.386 +                           { fromComp: "1, 3, 1, 3, 1, 3, 1, 3, 1, 3",
   1.387 +                             midComp:  "1, 3, 3, 5, 5, 2, 2, 4, 4, 6"}),
   1.388 +  ])),
   1.389 +  new TestcaseBundle(gPropList.stroke_dashoffset,
   1.390 +                     [].concat(_fromToTestLists.lengthNoUnitsSVG,
   1.391 +                               _fromToTestLists.lengthPx,
   1.392 +                               _fromToTestLists.lengthPxPctSVG,
   1.393 +                               _fromToTestLists.lengthPctSVG)),
   1.394 +  new TestcaseBundle(gPropList.stroke_linecap, [
   1.395 +    new AnimTestcaseFromTo("butt", "round"),
   1.396 +    new AnimTestcaseFromTo("round", "square"),
   1.397 +  ]),
   1.398 +  new TestcaseBundle(gPropList.stroke_linejoin, [
   1.399 +    new AnimTestcaseFromTo("miter", "round"),
   1.400 +    new AnimTestcaseFromTo("round", "bevel"),
   1.401 +  ]),
   1.402 +  new TestcaseBundle(gPropList.stroke_miterlimit, [
   1.403 +    new AnimTestcaseFromTo("1", "2", { midComp: "1.5" }),
   1.404 +    new AnimTestcaseFromTo("20.1", "10.1", { midComp: "15.1" }),
   1.405 +  ]),
   1.406 +  new TestcaseBundle(gPropList.stroke_opacity, _fromToTestLists.opacity),
   1.407 +  new TestcaseBundle(gPropList.stroke_width,
   1.408 +                     [].concat(_fromToTestLists.lengthNoUnitsSVG,
   1.409 +                               _fromToTestLists.lengthPx,
   1.410 +                               _fromToTestLists.lengthPxPctSVG,
   1.411 +                               _fromToTestLists.lengthPctSVG, [
   1.412 +    new AnimTestcaseFromTo("inherit", "7px",
   1.413 +                           { fromComp: "1px", midComp: "4px"}),
   1.414 +  ])),
   1.415 +  new TestcaseBundle(gPropList.text_anchor, [
   1.416 +    new AnimTestcaseFromTo("start", "middle"),
   1.417 +    new AnimTestcaseFromTo("middle", "end"),
   1.418 +  ]),
   1.419 +  new TestcaseBundle(gPropList.text_decoration, [
   1.420 +    new AnimTestcaseFromTo("none", "underline"),
   1.421 +    new AnimTestcaseFromTo("overline", "line-through"),
   1.422 +    new AnimTestcaseFromTo("blink", "underline"),
   1.423 +  ]),
   1.424 +  new TestcaseBundle(gPropList.text_rendering, [
   1.425 +    new AnimTestcaseFromTo("auto", "optimizeSpeed",
   1.426 +                           { toComp: "optimizespeed" }),
   1.427 +    new AnimTestcaseFromTo("optimizeSpeed", "geometricPrecision",
   1.428 +                           { fromComp: "optimizespeed",
   1.429 +                             toComp: "geometricprecision" }),
   1.430 +    new AnimTestcaseFromTo("geometricPrecision", "optimizeLegibility",
   1.431 +                           { fromComp: "geometricprecision",
   1.432 +                             toComp: "optimizelegibility" }),
   1.433 +  ]),
   1.434 +  new TestcaseBundle(gPropList.unicode_bidi, [
   1.435 +    new AnimTestcaseFromTo("embed", "bidi-override"),
   1.436 +  ]),
   1.437 +  new TestcaseBundle(gPropList.vector_effect, [
   1.438 +    new AnimTestcaseFromTo("none", "non-scaling-stroke"),
   1.439 +  ]),
   1.440 +  new TestcaseBundle(gPropList.visibility, [
   1.441 +    new AnimTestcaseFromTo("visible", "hidden"),
   1.442 +    new AnimTestcaseFromTo("hidden", "collapse"),
   1.443 +  ]),
   1.444 +  new TestcaseBundle(gPropList.word_spacing,
   1.445 +                     [].concat(_fromToTestLists.lengthNoUnits,
   1.446 +                               _fromToTestLists.lengthPx,
   1.447 +                               _fromToTestLists.lengthPxPctSVG)),
   1.448 +  new TestcaseBundle(gPropList.word_spacing,
   1.449 +                     _fromToTestLists.lengthPctSVG,
   1.450 +                     "pct->pct animations don't currently work for " +
   1.451 +                     "*-spacing properties"),
   1.452 +  // NOTE: Mozilla doesn't currently support "writing-mode", but I'm
   1.453 +  // testing it here in case we ever add support for it, because it's
   1.454 +  // explicitly not animatable in the SVG spec.
   1.455 +  new TestcaseBundle(gPropList.writing_mode, [
   1.456 +    new AnimTestcaseFromTo("lr", "rl"),
   1.457 +  ]),
   1.458 +];

mercurial