2014-06-24 22:12:07 -07:00
|
|
|
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
2009-10-02 14:37:25 -07:00
|
|
|
/* vim: set ts=2 sw=2 sts=2 et: */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-10-02 14:37:25 -07:00
|
|
|
|
|
|
|
/* testcase data for simple "from-to" animations of CSS properties */
|
|
|
|
|
|
|
|
// NOTE: This js file requires db_smilCSSPropertyList.js
|
|
|
|
|
|
|
|
// NOTE: I'm Including 'inherit' and 'currentColor' as interpolatable values.
|
|
|
|
// According to SVG Mobile 1.2 section 16.2.9, "keywords such as inherit which
|
|
|
|
// yield a numeric computed value may be included in the values list for an
|
|
|
|
// interpolated animation".
|
|
|
|
|
|
|
|
// Path of test URL (stripping off final slash + filename), for use in
|
|
|
|
// generating computed value of 'cursor' property
|
|
|
|
var _testPath = document.URL.substring(0, document.URL.lastIndexOf('/'));
|
|
|
|
|
|
|
|
// Lists of testcases for re-use across multiple properties of the same type
|
|
|
|
var _fromToTestLists = {
|
|
|
|
color: [
|
|
|
|
new AnimTestcaseFromTo("rgb(100, 100, 100)", "rgb(200, 200, 200)",
|
|
|
|
{ midComp: "rgb(150, 150, 150)" }),
|
|
|
|
new AnimTestcaseFromTo("#F02000", "#0080A0",
|
|
|
|
{ fromComp: "rgb(240, 32, 0)",
|
|
|
|
midComp: "rgb(120, 80, 80)",
|
|
|
|
toComp: "rgb(0, 128, 160)" }),
|
|
|
|
new AnimTestcaseFromTo("crimson", "lawngreen",
|
|
|
|
{ fromComp: "rgb(220, 20, 60)",
|
|
|
|
midComp: "rgb(172, 136, 30)",
|
|
|
|
toComp: "rgb(124, 252, 0)" }),
|
|
|
|
new AnimTestcaseFromTo("currentColor", "rgb(100, 100, 100)",
|
|
|
|
{ fromComp: "rgb(50, 50, 50)",
|
|
|
|
midComp: "rgb(75, 75, 75)" }),
|
|
|
|
],
|
|
|
|
colorFromInheritBlack: [
|
2010-01-19 13:40:22 -08:00
|
|
|
new AnimTestcaseFromTo("inherit", "rgb(200, 200, 200)",
|
|
|
|
{ fromComp: "rgb(0, 0, 0)",
|
|
|
|
midComp: "rgb(100, 100, 100)" }),
|
2009-10-02 14:37:25 -07:00
|
|
|
],
|
|
|
|
colorFromInheritWhite: [
|
2010-01-19 13:40:22 -08:00
|
|
|
new AnimTestcaseFromTo("inherit", "rgb(205, 205, 205)",
|
|
|
|
{ fromComp: "rgb(255, 255, 255)",
|
|
|
|
midComp: "rgb(230, 230, 230)" }),
|
2009-10-02 14:37:25 -07:00
|
|
|
],
|
|
|
|
paintServer: [
|
2009-10-20 09:55:37 -07:00
|
|
|
new AnimTestcaseFromTo("none", "none"),
|
2009-10-03 15:16:16 -07:00
|
|
|
new AnimTestcaseFromTo("none", "blue", { toComp : "rgb(0, 0, 255)" }),
|
|
|
|
new AnimTestcaseFromTo("rgb(50, 50, 50)", "none"),
|
2009-10-02 14:37:25 -07:00
|
|
|
new AnimTestcaseFromTo("url(#gradA)", "url(#gradB) currentColor",
|
|
|
|
{ fromComp: "url(\"" + document.URL +
|
|
|
|
"#gradA\") rgb(0, 0, 0)",
|
|
|
|
toComp: "url(\"" + document.URL +
|
|
|
|
"#gradB\") rgb(50, 50, 50)" },
|
|
|
|
"need support for URI-based paints"),
|
|
|
|
new AnimTestcaseFromTo("url(#gradA) orange", "url(#gradB)",
|
|
|
|
{ fromComp: "url(\"" + document.URL +
|
|
|
|
"#gradA\") rgb(255, 165, 0)",
|
|
|
|
toComp: "url(\"" + document.URL +
|
|
|
|
"#gradB\") rgb(0, 0, 0)" },
|
|
|
|
"need support for URI-based paints"),
|
|
|
|
new AnimTestcaseFromTo("url(#no_grad)", "url(#gradB)",
|
|
|
|
{ fromComp: "url(\"" + document.URL +
|
|
|
|
"#no_grad\") " + "rgb(0, 0, 0)",
|
|
|
|
toComp: "url(\"" + document.URL +
|
|
|
|
"#gradB\") rgb(0, 0, 0)" },
|
|
|
|
"need support for URI-based paints"),
|
|
|
|
new AnimTestcaseFromTo("url(#no_grad) rgb(1,2,3)", "url(#gradB) blue",
|
|
|
|
{ fromComp: "url(\"" + document.URL +
|
|
|
|
"#no_grad\") " + "rgb(1, 2, 3)",
|
|
|
|
toComp: "url(\"" + document.URL +
|
|
|
|
"#gradB\") rgb(0, 0, 255)" },
|
|
|
|
"need support for URI-based paints"),
|
|
|
|
],
|
2010-11-06 12:13:01 -07:00
|
|
|
lengthNoUnits: [
|
|
|
|
new AnimTestcaseFromTo("0", "20", { fromComp: "0px",
|
|
|
|
midComp: "10px",
|
|
|
|
toComp: "20px"}),
|
|
|
|
new AnimTestcaseFromTo("50", "0", { fromComp: "50px",
|
|
|
|
midComp: "25px",
|
|
|
|
toComp: "0px"}),
|
|
|
|
new AnimTestcaseFromTo("30", "80", { fromComp: "30px",
|
|
|
|
midComp: "55px",
|
|
|
|
toComp: "80px"}),
|
|
|
|
],
|
|
|
|
lengthNoUnitsSVG: [
|
2010-12-30 09:59:33 -08:00
|
|
|
new AnimTestcaseFromTo("0", "20", { fromComp: "0",
|
2010-11-06 12:13:01 -07:00
|
|
|
midComp: "10",
|
|
|
|
toComp: "20"}),
|
|
|
|
new AnimTestcaseFromTo("50", "0", { fromComp: "50",
|
|
|
|
midComp: "25",
|
2010-12-30 09:59:33 -08:00
|
|
|
toComp: "0"}),
|
2010-11-06 12:13:01 -07:00
|
|
|
new AnimTestcaseFromTo("30", "80", { fromComp: "30",
|
|
|
|
midComp: "55",
|
|
|
|
toComp: "80"}),
|
|
|
|
],
|
2009-10-02 14:37:25 -07:00
|
|
|
lengthPx: [
|
2010-12-30 09:59:33 -08:00
|
|
|
new AnimTestcaseFromTo("0px", "12px", { fromComp: "0px",
|
|
|
|
midComp: "6px"}),
|
|
|
|
new AnimTestcaseFromTo("16px", "0px", { midComp: "8px",
|
|
|
|
toComp: "0px"}),
|
2009-10-02 14:37:25 -07:00
|
|
|
new AnimTestcaseFromTo("10px", "20px", { midComp: "15px"}),
|
|
|
|
new AnimTestcaseFromTo("41px", "1px", { midComp: "21px"}),
|
|
|
|
],
|
|
|
|
lengthPctSVG: [
|
|
|
|
new AnimTestcaseFromTo("20.5%", "0.5%", { midComp: "10.5%" }),
|
|
|
|
],
|
|
|
|
lengthPxPctSVG: [
|
|
|
|
new AnimTestcaseFromTo("10px", "10%", { midComp: "15px"},
|
|
|
|
"need support for interpolating between " +
|
|
|
|
"px and percent values"),
|
|
|
|
],
|
|
|
|
opacity: [
|
|
|
|
new AnimTestcaseFromTo("1", "0", { midComp: "0.5" }),
|
|
|
|
new AnimTestcaseFromTo("0.2", "0.12", { midComp: "0.16" }),
|
|
|
|
new AnimTestcaseFromTo("0.5", "0.7", { midComp: "0.6" }),
|
|
|
|
new AnimTestcaseFromTo("0.5", "inherit",
|
|
|
|
{ midComp: "0.75", toComp: "1" }),
|
|
|
|
// Make sure we don't clamp out-of-range values before interpolation
|
|
|
|
new AnimTestcaseFromTo("0.2", "1.2",
|
|
|
|
{ midComp: "0.7", toComp: "1" },
|
|
|
|
"opacities with abs val >1 get clamped too early"),
|
|
|
|
new AnimTestcaseFromTo("-0.2", "0.6",
|
|
|
|
{ fromComp: "0", midComp: "0.2" }),
|
|
|
|
new AnimTestcaseFromTo("-1.2", "1.6",
|
|
|
|
{ fromComp: "0", midComp: "0.2", toComp: "1" },
|
|
|
|
"opacities with abs val >1 get clamped too early"),
|
|
|
|
new AnimTestcaseFromTo("-0.6", "1.4",
|
|
|
|
{ fromComp: "0", midComp: "0.4", toComp: "1" },
|
|
|
|
"opacities with abs val >1 get clamped too early"),
|
|
|
|
],
|
|
|
|
URIsAndNone: [
|
|
|
|
new AnimTestcaseFromTo("url(#idA)", "url(#idB)",
|
|
|
|
{ fromComp: "url(\"" + document.URL + "#idA\")",
|
2009-12-10 09:26:27 -08:00
|
|
|
toComp: "url(\"" + document.URL + "#idB\")"}),
|
2009-10-02 14:37:25 -07:00
|
|
|
new AnimTestcaseFromTo("none", "url(#idB)",
|
2009-12-10 09:26:27 -08:00
|
|
|
{ toComp: "url(\"" + document.URL + "#idB\")"}),
|
2009-10-02 14:37:25 -07:00
|
|
|
new AnimTestcaseFromTo("url(#idB)", "inherit",
|
|
|
|
{ fromComp: "url(\"" + document.URL + "#idB\")",
|
2009-12-10 09:26:27 -08:00
|
|
|
toComp: "none"}),
|
2009-10-02 14:37:25 -07:00
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
// List of attribute/testcase-list bundles to be tested
|
|
|
|
var gFromToBundles = [
|
|
|
|
new TestcaseBundle(gPropList.clip, [
|
|
|
|
new AnimTestcaseFromTo("rect(1px, 2px, 3px, 4px)",
|
|
|
|
"rect(11px, 22px, 33px, 44px)",
|
|
|
|
{ midComp: "rect(6px, 12px, 18px, 24px)" }),
|
2010-01-04 16:32:11 -08:00
|
|
|
new AnimTestcaseFromTo("rect(1px, auto, 3px, 4px)",
|
|
|
|
"rect(11px, auto, 33px, 44px)",
|
|
|
|
{ midComp: "rect(6px, auto, 18px, 24px)" }),
|
|
|
|
new AnimTestcaseFromTo("auto", "auto"),
|
|
|
|
new AnimTestcaseFromTo("rect(auto, auto, auto, auto)",
|
|
|
|
"rect(auto, auto, auto, auto)"),
|
|
|
|
// Interpolation not supported in these next cases (with auto --> px-value)
|
|
|
|
new AnimTestcaseFromTo("rect(1px, auto, 3px, auto)",
|
|
|
|
"rect(11px, auto, 33px, 44px)"),
|
|
|
|
new AnimTestcaseFromTo("rect(1px, 2px, 3px, 4px)",
|
|
|
|
"rect(11px, auto, 33px, 44px)"),
|
|
|
|
new AnimTestcaseFromTo("rect(1px, 2px, 3px, 4px)", "auto"),
|
|
|
|
new AnimTestcaseFromTo("auto", "rect(1px, 2px, 3px, 4px)"),
|
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.clip_path, _fromToTestLists.URIsAndNone),
|
|
|
|
new TestcaseBundle(gPropList.clip_rule, [
|
|
|
|
new AnimTestcaseFromTo("nonzero", "evenodd"),
|
|
|
|
new AnimTestcaseFromTo("evenodd", "inherit", { toComp: "nonzero" }),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.color,
|
|
|
|
[].concat(_fromToTestLists.color, [
|
|
|
|
// Note: inherited value is rgb(50, 50, 50) (set on <svg>)
|
|
|
|
new AnimTestcaseFromTo("inherit", "rgb(200, 200, 200)",
|
|
|
|
{ fromComp: "rgb(50, 50, 50)",
|
|
|
|
midComp: "rgb(125, 125, 125)" }),
|
|
|
|
])),
|
|
|
|
new TestcaseBundle(gPropList.color_interpolation, [
|
|
|
|
new AnimTestcaseFromTo("sRGB", "auto", { fromComp: "srgb" }),
|
|
|
|
new AnimTestcaseFromTo("inherit", "linearRGB",
|
|
|
|
{ fromComp: "srgb", toComp: "linearrgb" }),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.color_interpolation_filters, [
|
|
|
|
new AnimTestcaseFromTo("sRGB", "auto", { fromComp: "srgb" }),
|
|
|
|
new AnimTestcaseFromTo("auto", "inherit",
|
|
|
|
{ toComp: "linearrgb" }),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.cursor, [
|
|
|
|
new AnimTestcaseFromTo("crosshair", "move"),
|
|
|
|
new AnimTestcaseFromTo("url('a.cur'), url('b.cur'), nw-resize", "sw-resize",
|
|
|
|
{ fromComp: "url(\"" + _testPath + "/a.cur\"), " +
|
|
|
|
"url(\"" + _testPath + "/b.cur\"), " +
|
2009-12-10 09:26:28 -08:00
|
|
|
"nw-resize"}),
|
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.direction, [
|
|
|
|
new AnimTestcaseFromTo("ltr", "rtl"),
|
|
|
|
new AnimTestcaseFromTo("rtl", "inherit"),
|
|
|
|
]),
|
|
|
|
new TestcaseBundle(gPropList.display, [
|
|
|
|
// I'm not testing the "inherit" value for "display", because part of
|
|
|
|
// my test runs with "display: none" on everything, and so the
|
|
|
|
// inherited value isn't always the same. (i.e. the computed value
|
|
|
|
// of 'inherit' will be different in different tests)
|
2009-10-21 14:57:57 -07:00
|
|
|
new AnimTestcaseFromTo("block", "table-cell"),
|
|
|
|
new AnimTestcaseFromTo("inline", "inline-table"),
|
|
|
|
new AnimTestcaseFromTo("table-row", "none"),
|
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.dominant_baseline, [
|
|
|
|
new AnimTestcaseFromTo("use-script", "no-change"),
|
|
|
|
new AnimTestcaseFromTo("reset-size", "ideographic"),
|
2009-10-21 14:57:57 -07:00
|
|
|
new AnimTestcaseFromTo("alphabetic", "hanging"),
|
|
|
|
new AnimTestcaseFromTo("mathematical", "central"),
|
|
|
|
new AnimTestcaseFromTo("middle", "text-after-edge"),
|
|
|
|
new AnimTestcaseFromTo("text-before-edge", "auto"),
|
|
|
|
new AnimTestcaseFromTo("use-script", "inherit", { toComp: "auto" } ),
|
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
// NOTE: Mozilla doesn't currently support "enable-background", but I'm
|
|
|
|
// testing it here in case we ever add support for it, because it's
|
|
|
|
// explicitly not animatable in the SVG spec.
|
|
|
|
new TestcaseBundle(gPropList.enable_background, [
|
|
|
|
new AnimTestcaseFromTo("new", "accumulate"),
|
|
|
|
]),
|
|
|
|
new TestcaseBundle(gPropList.fill,
|
|
|
|
[].concat(_fromToTestLists.color,
|
|
|
|
_fromToTestLists.paintServer,
|
|
|
|
_fromToTestLists.colorFromInheritBlack)),
|
2009-10-08 18:30:50 -07:00
|
|
|
new TestcaseBundle(gPropList.fill_opacity, _fromToTestLists.opacity),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.fill_rule, [
|
|
|
|
new AnimTestcaseFromTo("nonzero", "evenodd"),
|
|
|
|
new AnimTestcaseFromTo("evenodd", "inherit", { toComp: "nonzero" }),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.filter, _fromToTestLists.URIsAndNone),
|
|
|
|
new TestcaseBundle(gPropList.flood_color,
|
|
|
|
[].concat(_fromToTestLists.color,
|
|
|
|
_fromToTestLists.colorFromInheritBlack)),
|
2009-10-08 18:30:50 -07:00
|
|
|
new TestcaseBundle(gPropList.flood_opacity, _fromToTestLists.opacity),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.font, [
|
|
|
|
// NOTE: 'line-height' is hard-wired at 10px in test_smilCSSFromTo.xhtml
|
|
|
|
// because if it's not explicitly set, its value varies across platforms.
|
|
|
|
// NOTE: System font values can't be tested here, because their computed
|
|
|
|
// values vary from platform to platform. However, they are tested
|
|
|
|
// visually, in the reftest "anim-css-font-1.svg"
|
|
|
|
new AnimTestcaseFromTo("10px serif", "30px serif",
|
|
|
|
{ fromComp: "normal normal 400 10px / 10px serif",
|
|
|
|
toComp: "normal normal 400 30px / 10px serif"}),
|
|
|
|
new AnimTestcaseFromTo("10px serif", "30px sans-serif",
|
|
|
|
{ fromComp: "normal normal 400 10px / 10px serif",
|
|
|
|
toComp: "normal normal 400 30px / 10px sans-serif"}),
|
|
|
|
new AnimTestcaseFromTo("1px / 90px cursive", "100px monospace",
|
|
|
|
{ fromComp: "normal normal 400 1px / 10px cursive",
|
|
|
|
toComp: "normal normal 400 100px / 10px monospace"}),
|
|
|
|
new AnimTestcaseFromTo("italic small-caps 200 1px cursive",
|
|
|
|
"100px monospace",
|
|
|
|
{ fromComp: "italic small-caps 200 1px / 10px cursive",
|
|
|
|
toComp: "normal normal 400 100px / 10px monospace"}),
|
|
|
|
new AnimTestcaseFromTo("oblique normal 200 30px / 10px cursive",
|
|
|
|
"normal small-caps 800 40px / 10px serif"),
|
2009-12-10 09:26:28 -08:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.font_family, [
|
|
|
|
new AnimTestcaseFromTo("serif", "sans-serif"),
|
|
|
|
new AnimTestcaseFromTo("cursive", "monospace"),
|
2009-12-10 09:26:27 -08:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.font_size,
|
2010-11-06 12:13:01 -07:00
|
|
|
[].concat(_fromToTestLists.lengthNoUnits,
|
|
|
|
_fromToTestLists.lengthPx, [
|
2009-10-02 14:37:25 -07:00
|
|
|
new AnimTestcaseFromTo("10px", "40%", { midComp: "15px", toComp: "20px" }),
|
|
|
|
new AnimTestcaseFromTo("160%", "80%",
|
|
|
|
{ fromComp: "80px",
|
|
|
|
midComp: "60px",
|
|
|
|
toComp: "40px"}),
|
|
|
|
])),
|
|
|
|
new TestcaseBundle(gPropList.font_size_adjust, [
|
|
|
|
new AnimTestcaseFromTo("0.9", "0.1", { midComp: "0.5" }),
|
|
|
|
new AnimTestcaseFromTo("0.5", "0.6", { midComp: "0.55" }),
|
|
|
|
new AnimTestcaseFromTo("none", "0.4"),
|
2009-10-08 18:30:53 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.font_stretch, [
|
2009-11-17 22:08:19 -08:00
|
|
|
new AnimTestcaseFromTo("normal", "wider", {},
|
|
|
|
"need support for animating between " +
|
|
|
|
"relative 'font-stretch' values"),
|
|
|
|
new AnimTestcaseFromTo("narrower", "ultra-condensed", {},
|
|
|
|
"need support for animating between " +
|
|
|
|
"relative 'font-stretch' values"),
|
|
|
|
new AnimTestcaseFromTo("ultra-condensed", "condensed",
|
|
|
|
{ midComp: "extra-condensed" }),
|
|
|
|
new AnimTestcaseFromTo("semi-condensed", "semi-expanded",
|
|
|
|
{ midComp: "normal" }),
|
|
|
|
new AnimTestcaseFromTo("expanded", "ultra-expanded",
|
|
|
|
{ midComp: "extra-expanded" }),
|
|
|
|
new AnimTestcaseFromTo("ultra-expanded", "inherit",
|
|
|
|
{ midComp: "expanded", toComp: "normal" }),
|
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.font_style, [
|
2009-10-21 14:57:57 -07:00
|
|
|
new AnimTestcaseFromTo("italic", "inherit", { toComp: "normal" }),
|
2009-10-02 14:37:25 -07:00
|
|
|
new AnimTestcaseFromTo("normal", "italic"),
|
|
|
|
new AnimTestcaseFromTo("italic", "oblique"),
|
2009-10-21 14:57:57 -07:00
|
|
|
new AnimTestcaseFromTo("oblique", "normal"),
|
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.font_variant, [
|
|
|
|
new AnimTestcaseFromTo("inherit", "small-caps", { fromComp: "normal" }),
|
2009-10-21 14:57:57 -07:00
|
|
|
new AnimTestcaseFromTo("small-caps", "normal"),
|
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.font_weight, [
|
2009-11-17 22:08:19 -08:00
|
|
|
new AnimTestcaseFromTo("100", "900", { midComp: "500" }),
|
|
|
|
new AnimTestcaseFromTo("700", "100", { midComp: "400" }),
|
2009-10-02 14:37:25 -07:00
|
|
|
new AnimTestcaseFromTo("inherit", "200",
|
2009-11-17 22:08:19 -08:00
|
|
|
{ fromComp: "400", midComp: "300" }),
|
2009-10-02 14:37:25 -07:00
|
|
|
new AnimTestcaseFromTo("normal", "bold",
|
2009-11-17 22:08:19 -08:00
|
|
|
{ fromComp: "400", midComp: "500", toComp: "700" }),
|
|
|
|
new AnimTestcaseFromTo("lighter", "bolder", {},
|
|
|
|
"need support for animating between " +
|
|
|
|
"relative 'font-weight' values"),
|
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
// NOTE: Mozilla doesn't currently support "glyph-orientation-horizontal" or
|
|
|
|
// "glyph-orientation-vertical", but I'm testing them here in case we ever
|
|
|
|
// add support for them, because they're explicitly not animatable in the SVG
|
|
|
|
// spec.
|
|
|
|
new TestcaseBundle(gPropList.glyph_orientation_horizontal,
|
|
|
|
[ new AnimTestcaseFromTo("45deg", "60deg") ]),
|
|
|
|
new TestcaseBundle(gPropList.glyph_orientation_vertical,
|
|
|
|
[ new AnimTestcaseFromTo("45deg", "60deg") ]),
|
|
|
|
new TestcaseBundle(gPropList.image_rendering, [
|
|
|
|
new AnimTestcaseFromTo("auto", "optimizeQuality",
|
|
|
|
{ toComp: "optimizequality" }),
|
|
|
|
new AnimTestcaseFromTo("optimizeQuality", "optimizeSpeed",
|
|
|
|
{ fromComp: "optimizequality",
|
|
|
|
toComp: "optimizespeed" }),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.letter_spacing,
|
2010-11-06 12:13:01 -07:00
|
|
|
[].concat(_fromToTestLists.lengthNoUnits,
|
|
|
|
_fromToTestLists.lengthPx,
|
2009-10-02 14:37:25 -07:00
|
|
|
_fromToTestLists.lengthPxPctSVG)),
|
|
|
|
new TestcaseBundle(gPropList.letter_spacing,
|
|
|
|
_fromToTestLists.lengthPctSVG,
|
|
|
|
"pct->pct animations don't currently work for " +
|
|
|
|
"*-spacing properties"),
|
|
|
|
new TestcaseBundle(gPropList.lighting_color,
|
|
|
|
[].concat(_fromToTestLists.color,
|
|
|
|
_fromToTestLists.colorFromInheritWhite)),
|
2009-12-10 09:26:28 -08:00
|
|
|
new TestcaseBundle(gPropList.marker, _fromToTestLists.URIsAndNone),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.marker_end, _fromToTestLists.URIsAndNone),
|
|
|
|
new TestcaseBundle(gPropList.marker_mid, _fromToTestLists.URIsAndNone),
|
|
|
|
new TestcaseBundle(gPropList.marker_start, _fromToTestLists.URIsAndNone),
|
|
|
|
new TestcaseBundle(gPropList.mask, _fromToTestLists.URIsAndNone),
|
2009-10-08 18:30:50 -07:00
|
|
|
new TestcaseBundle(gPropList.opacity, _fromToTestLists.opacity),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.overflow, [
|
|
|
|
new AnimTestcaseFromTo("auto", "visible"),
|
2009-12-10 09:26:28 -08:00
|
|
|
new AnimTestcaseFromTo("inherit", "visible", { fromComp: "hidden" }),
|
2009-10-02 14:37:25 -07:00
|
|
|
new AnimTestcaseFromTo("scroll", "auto"),
|
2009-12-10 09:26:28 -08:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.pointer_events, [
|
|
|
|
new AnimTestcaseFromTo("visibleFill", "stroke",
|
|
|
|
{ fromComp: "visiblefill" }),
|
|
|
|
new AnimTestcaseFromTo("none", "visibleStroke",
|
|
|
|
{ toComp: "visiblestroke" }),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.shape_rendering, [
|
|
|
|
new AnimTestcaseFromTo("auto", "optimizeSpeed",
|
|
|
|
{ toComp: "optimizespeed" }),
|
|
|
|
new AnimTestcaseFromTo("crispEdges", "geometricPrecision",
|
|
|
|
{ fromComp: "crispedges",
|
|
|
|
toComp: "geometricprecision" }),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.stop_color,
|
|
|
|
[].concat(_fromToTestLists.color,
|
|
|
|
_fromToTestLists.colorFromInheritBlack)),
|
2009-10-08 18:30:50 -07:00
|
|
|
new TestcaseBundle(gPropList.stop_opacity, _fromToTestLists.opacity),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.stroke,
|
|
|
|
[].concat(_fromToTestLists.color,
|
|
|
|
_fromToTestLists.paintServer, [
|
2009-10-03 15:16:16 -07:00
|
|
|
// Note: inherited value is "none" (the default for "stroke" property)
|
2009-10-02 14:37:25 -07:00
|
|
|
new AnimTestcaseFromTo("inherit", "rgb(200, 200, 200)",
|
2009-10-03 15:16:16 -07:00
|
|
|
{ fromComp: "none"})])),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.stroke_dasharray,
|
2009-12-10 09:26:27 -08:00
|
|
|
[].concat(_fromToTestLists.lengthPctSVG,
|
2009-10-02 14:37:25 -07:00
|
|
|
[
|
2009-12-10 09:26:27 -08:00
|
|
|
new AnimTestcaseFromTo("inherit", "20", { fromComp: "none"}),
|
|
|
|
new AnimTestcaseFromTo("1", "none"),
|
|
|
|
new AnimTestcaseFromTo("10", "20", { midComp: "15"}),
|
|
|
|
new AnimTestcaseFromTo("1", "2, 3", { fromComp: "1, 1",
|
|
|
|
midComp: "1.5, 2"}),
|
|
|
|
new AnimTestcaseFromTo("2, 8", "6", { midComp: "4, 7"}),
|
|
|
|
new AnimTestcaseFromTo("1, 3", "1, 3, 5, 7, 9",
|
|
|
|
{ fromComp: "1, 3, 1, 3, 1, 3, 1, 3, 1, 3",
|
|
|
|
midComp: "1, 3, 3, 5, 5, 2, 2, 4, 4, 6"}),
|
|
|
|
])),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.stroke_dashoffset,
|
2010-11-06 12:13:01 -07:00
|
|
|
[].concat(_fromToTestLists.lengthNoUnitsSVG,
|
|
|
|
_fromToTestLists.lengthPx,
|
2009-10-02 14:37:25 -07:00
|
|
|
_fromToTestLists.lengthPxPctSVG,
|
|
|
|
_fromToTestLists.lengthPctSVG)),
|
|
|
|
new TestcaseBundle(gPropList.stroke_linecap, [
|
|
|
|
new AnimTestcaseFromTo("butt", "round"),
|
|
|
|
new AnimTestcaseFromTo("round", "square"),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.stroke_linejoin, [
|
|
|
|
new AnimTestcaseFromTo("miter", "round"),
|
|
|
|
new AnimTestcaseFromTo("round", "bevel"),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.stroke_miterlimit, [
|
|
|
|
new AnimTestcaseFromTo("1", "2", { midComp: "1.5" }),
|
|
|
|
new AnimTestcaseFromTo("20.1", "10.1", { midComp: "15.1" }),
|
2009-10-08 18:30:50 -07:00
|
|
|
]),
|
|
|
|
new TestcaseBundle(gPropList.stroke_opacity, _fromToTestLists.opacity),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.stroke_width,
|
2010-11-06 12:13:01 -07:00
|
|
|
[].concat(_fromToTestLists.lengthNoUnitsSVG,
|
|
|
|
_fromToTestLists.lengthPx,
|
2009-10-02 14:37:25 -07:00
|
|
|
_fromToTestLists.lengthPxPctSVG,
|
|
|
|
_fromToTestLists.lengthPctSVG, [
|
|
|
|
new AnimTestcaseFromTo("inherit", "7px",
|
|
|
|
{ fromComp: "1px", midComp: "4px"}),
|
|
|
|
])),
|
|
|
|
new TestcaseBundle(gPropList.text_anchor, [
|
|
|
|
new AnimTestcaseFromTo("start", "middle"),
|
|
|
|
new AnimTestcaseFromTo("middle", "end"),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.text_decoration, [
|
|
|
|
new AnimTestcaseFromTo("none", "underline"),
|
|
|
|
new AnimTestcaseFromTo("overline", "line-through"),
|
|
|
|
new AnimTestcaseFromTo("blink", "underline"),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.text_rendering, [
|
|
|
|
new AnimTestcaseFromTo("auto", "optimizeSpeed",
|
|
|
|
{ toComp: "optimizespeed" }),
|
|
|
|
new AnimTestcaseFromTo("optimizeSpeed", "geometricPrecision",
|
|
|
|
{ fromComp: "optimizespeed",
|
|
|
|
toComp: "geometricprecision" }),
|
|
|
|
new AnimTestcaseFromTo("geometricPrecision", "optimizeLegibility",
|
|
|
|
{ fromComp: "geometricprecision",
|
|
|
|
toComp: "optimizelegibility" }),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.unicode_bidi, [
|
|
|
|
new AnimTestcaseFromTo("embed", "bidi-override"),
|
|
|
|
]),
|
2012-05-18 01:34:25 -07:00
|
|
|
new TestcaseBundle(gPropList.vector_effect, [
|
|
|
|
new AnimTestcaseFromTo("none", "non-scaling-stroke"),
|
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.visibility, [
|
|
|
|
new AnimTestcaseFromTo("visible", "hidden"),
|
|
|
|
new AnimTestcaseFromTo("hidden", "collapse"),
|
2009-10-21 14:57:57 -07:00
|
|
|
]),
|
2009-10-02 14:37:25 -07:00
|
|
|
new TestcaseBundle(gPropList.word_spacing,
|
2010-11-06 12:13:01 -07:00
|
|
|
[].concat(_fromToTestLists.lengthNoUnits,
|
|
|
|
_fromToTestLists.lengthPx,
|
2009-10-02 14:37:25 -07:00
|
|
|
_fromToTestLists.lengthPxPctSVG)),
|
|
|
|
new TestcaseBundle(gPropList.word_spacing,
|
|
|
|
_fromToTestLists.lengthPctSVG,
|
|
|
|
"pct->pct animations don't currently work for " +
|
|
|
|
"*-spacing properties"),
|
|
|
|
// NOTE: Mozilla doesn't currently support "writing-mode", but I'm
|
|
|
|
// testing it here in case we ever add support for it, because it's
|
|
|
|
// explicitly not animatable in the SVG spec.
|
|
|
|
new TestcaseBundle(gPropList.writing_mode, [
|
|
|
|
new AnimTestcaseFromTo("lr", "rl"),
|
|
|
|
]),
|
|
|
|
];
|