Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim: set ts=2 sw=2 sts=2 et: */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | /* testcase data for simple "from-to" animations of CSS properties */ |
michael@0 | 8 | |
michael@0 | 9 | // NOTE: This js file requires db_smilCSSPropertyList.js |
michael@0 | 10 | |
michael@0 | 11 | // NOTE: I'm Including 'inherit' and 'currentColor' as interpolatable values. |
michael@0 | 12 | // According to SVG Mobile 1.2 section 16.2.9, "keywords such as inherit which |
michael@0 | 13 | // yield a numeric computed value may be included in the values list for an |
michael@0 | 14 | // interpolated animation". |
michael@0 | 15 | |
michael@0 | 16 | // Path of test URL (stripping off final slash + filename), for use in |
michael@0 | 17 | // generating computed value of 'cursor' property |
michael@0 | 18 | var _testPath = document.URL.substring(0, document.URL.lastIndexOf('/')); |
michael@0 | 19 | |
michael@0 | 20 | // Lists of testcases for re-use across multiple properties of the same type |
michael@0 | 21 | var _fromToTestLists = { |
michael@0 | 22 | color: [ |
michael@0 | 23 | new AnimTestcaseFromTo("rgb(100, 100, 100)", "rgb(200, 200, 200)", |
michael@0 | 24 | { midComp: "rgb(150, 150, 150)" }), |
michael@0 | 25 | new AnimTestcaseFromTo("#F02000", "#0080A0", |
michael@0 | 26 | { fromComp: "rgb(240, 32, 0)", |
michael@0 | 27 | midComp: "rgb(120, 80, 80)", |
michael@0 | 28 | toComp: "rgb(0, 128, 160)" }), |
michael@0 | 29 | new AnimTestcaseFromTo("crimson", "lawngreen", |
michael@0 | 30 | { fromComp: "rgb(220, 20, 60)", |
michael@0 | 31 | midComp: "rgb(172, 136, 30)", |
michael@0 | 32 | toComp: "rgb(124, 252, 0)" }), |
michael@0 | 33 | new AnimTestcaseFromTo("currentColor", "rgb(100, 100, 100)", |
michael@0 | 34 | { fromComp: "rgb(50, 50, 50)", |
michael@0 | 35 | midComp: "rgb(75, 75, 75)" }), |
michael@0 | 36 | ], |
michael@0 | 37 | colorFromInheritBlack: [ |
michael@0 | 38 | new AnimTestcaseFromTo("inherit", "rgb(200, 200, 200)", |
michael@0 | 39 | { fromComp: "rgb(0, 0, 0)", |
michael@0 | 40 | midComp: "rgb(100, 100, 100)" }), |
michael@0 | 41 | ], |
michael@0 | 42 | colorFromInheritWhite: [ |
michael@0 | 43 | new AnimTestcaseFromTo("inherit", "rgb(205, 205, 205)", |
michael@0 | 44 | { fromComp: "rgb(255, 255, 255)", |
michael@0 | 45 | midComp: "rgb(230, 230, 230)" }), |
michael@0 | 46 | ], |
michael@0 | 47 | paintServer: [ |
michael@0 | 48 | new AnimTestcaseFromTo("none", "none"), |
michael@0 | 49 | new AnimTestcaseFromTo("none", "blue", { toComp : "rgb(0, 0, 255)" }), |
michael@0 | 50 | new AnimTestcaseFromTo("rgb(50, 50, 50)", "none"), |
michael@0 | 51 | new AnimTestcaseFromTo("url(#gradA)", "url(#gradB) currentColor", |
michael@0 | 52 | { fromComp: "url(\"" + document.URL + |
michael@0 | 53 | "#gradA\") rgb(0, 0, 0)", |
michael@0 | 54 | toComp: "url(\"" + document.URL + |
michael@0 | 55 | "#gradB\") rgb(50, 50, 50)" }, |
michael@0 | 56 | "need support for URI-based paints"), |
michael@0 | 57 | new AnimTestcaseFromTo("url(#gradA) orange", "url(#gradB)", |
michael@0 | 58 | { fromComp: "url(\"" + document.URL + |
michael@0 | 59 | "#gradA\") rgb(255, 165, 0)", |
michael@0 | 60 | toComp: "url(\"" + document.URL + |
michael@0 | 61 | "#gradB\") rgb(0, 0, 0)" }, |
michael@0 | 62 | "need support for URI-based paints"), |
michael@0 | 63 | new AnimTestcaseFromTo("url(#no_grad)", "url(#gradB)", |
michael@0 | 64 | { fromComp: "url(\"" + document.URL + |
michael@0 | 65 | "#no_grad\") " + "rgb(0, 0, 0)", |
michael@0 | 66 | toComp: "url(\"" + document.URL + |
michael@0 | 67 | "#gradB\") rgb(0, 0, 0)" }, |
michael@0 | 68 | "need support for URI-based paints"), |
michael@0 | 69 | new AnimTestcaseFromTo("url(#no_grad) rgb(1,2,3)", "url(#gradB) blue", |
michael@0 | 70 | { fromComp: "url(\"" + document.URL + |
michael@0 | 71 | "#no_grad\") " + "rgb(1, 2, 3)", |
michael@0 | 72 | toComp: "url(\"" + document.URL + |
michael@0 | 73 | "#gradB\") rgb(0, 0, 255)" }, |
michael@0 | 74 | "need support for URI-based paints"), |
michael@0 | 75 | ], |
michael@0 | 76 | lengthNoUnits: [ |
michael@0 | 77 | new AnimTestcaseFromTo("0", "20", { fromComp: "0px", |
michael@0 | 78 | midComp: "10px", |
michael@0 | 79 | toComp: "20px"}), |
michael@0 | 80 | new AnimTestcaseFromTo("50", "0", { fromComp: "50px", |
michael@0 | 81 | midComp: "25px", |
michael@0 | 82 | toComp: "0px"}), |
michael@0 | 83 | new AnimTestcaseFromTo("30", "80", { fromComp: "30px", |
michael@0 | 84 | midComp: "55px", |
michael@0 | 85 | toComp: "80px"}), |
michael@0 | 86 | ], |
michael@0 | 87 | lengthNoUnitsSVG: [ |
michael@0 | 88 | new AnimTestcaseFromTo("0", "20", { fromComp: "0", |
michael@0 | 89 | midComp: "10", |
michael@0 | 90 | toComp: "20"}), |
michael@0 | 91 | new AnimTestcaseFromTo("50", "0", { fromComp: "50", |
michael@0 | 92 | midComp: "25", |
michael@0 | 93 | toComp: "0"}), |
michael@0 | 94 | new AnimTestcaseFromTo("30", "80", { fromComp: "30", |
michael@0 | 95 | midComp: "55", |
michael@0 | 96 | toComp: "80"}), |
michael@0 | 97 | ], |
michael@0 | 98 | lengthPx: [ |
michael@0 | 99 | new AnimTestcaseFromTo("0px", "12px", { fromComp: "0px", |
michael@0 | 100 | midComp: "6px"}), |
michael@0 | 101 | new AnimTestcaseFromTo("16px", "0px", { midComp: "8px", |
michael@0 | 102 | toComp: "0px"}), |
michael@0 | 103 | new AnimTestcaseFromTo("10px", "20px", { midComp: "15px"}), |
michael@0 | 104 | new AnimTestcaseFromTo("41px", "1px", { midComp: "21px"}), |
michael@0 | 105 | ], |
michael@0 | 106 | lengthPctSVG: [ |
michael@0 | 107 | new AnimTestcaseFromTo("20.5%", "0.5%", { midComp: "10.5%" }), |
michael@0 | 108 | ], |
michael@0 | 109 | lengthPxPctSVG: [ |
michael@0 | 110 | new AnimTestcaseFromTo("10px", "10%", { midComp: "15px"}, |
michael@0 | 111 | "need support for interpolating between " + |
michael@0 | 112 | "px and percent values"), |
michael@0 | 113 | ], |
michael@0 | 114 | opacity: [ |
michael@0 | 115 | new AnimTestcaseFromTo("1", "0", { midComp: "0.5" }), |
michael@0 | 116 | new AnimTestcaseFromTo("0.2", "0.12", { midComp: "0.16" }), |
michael@0 | 117 | new AnimTestcaseFromTo("0.5", "0.7", { midComp: "0.6" }), |
michael@0 | 118 | new AnimTestcaseFromTo("0.5", "inherit", |
michael@0 | 119 | { midComp: "0.75", toComp: "1" }), |
michael@0 | 120 | // Make sure we don't clamp out-of-range values before interpolation |
michael@0 | 121 | new AnimTestcaseFromTo("0.2", "1.2", |
michael@0 | 122 | { midComp: "0.7", toComp: "1" }, |
michael@0 | 123 | "opacities with abs val >1 get clamped too early"), |
michael@0 | 124 | new AnimTestcaseFromTo("-0.2", "0.6", |
michael@0 | 125 | { fromComp: "0", midComp: "0.2" }), |
michael@0 | 126 | new AnimTestcaseFromTo("-1.2", "1.6", |
michael@0 | 127 | { fromComp: "0", midComp: "0.2", toComp: "1" }, |
michael@0 | 128 | "opacities with abs val >1 get clamped too early"), |
michael@0 | 129 | new AnimTestcaseFromTo("-0.6", "1.4", |
michael@0 | 130 | { fromComp: "0", midComp: "0.4", toComp: "1" }, |
michael@0 | 131 | "opacities with abs val >1 get clamped too early"), |
michael@0 | 132 | ], |
michael@0 | 133 | URIsAndNone: [ |
michael@0 | 134 | new AnimTestcaseFromTo("url(#idA)", "url(#idB)", |
michael@0 | 135 | { fromComp: "url(\"" + document.URL + "#idA\")", |
michael@0 | 136 | toComp: "url(\"" + document.URL + "#idB\")"}), |
michael@0 | 137 | new AnimTestcaseFromTo("none", "url(#idB)", |
michael@0 | 138 | { toComp: "url(\"" + document.URL + "#idB\")"}), |
michael@0 | 139 | new AnimTestcaseFromTo("url(#idB)", "inherit", |
michael@0 | 140 | { fromComp: "url(\"" + document.URL + "#idB\")", |
michael@0 | 141 | toComp: "none"}), |
michael@0 | 142 | ], |
michael@0 | 143 | }; |
michael@0 | 144 | |
michael@0 | 145 | // List of attribute/testcase-list bundles to be tested |
michael@0 | 146 | var gFromToBundles = [ |
michael@0 | 147 | new TestcaseBundle(gPropList.clip, [ |
michael@0 | 148 | new AnimTestcaseFromTo("rect(1px, 2px, 3px, 4px)", |
michael@0 | 149 | "rect(11px, 22px, 33px, 44px)", |
michael@0 | 150 | { midComp: "rect(6px, 12px, 18px, 24px)" }), |
michael@0 | 151 | new AnimTestcaseFromTo("rect(1px, auto, 3px, 4px)", |
michael@0 | 152 | "rect(11px, auto, 33px, 44px)", |
michael@0 | 153 | { midComp: "rect(6px, auto, 18px, 24px)" }), |
michael@0 | 154 | new AnimTestcaseFromTo("auto", "auto"), |
michael@0 | 155 | new AnimTestcaseFromTo("rect(auto, auto, auto, auto)", |
michael@0 | 156 | "rect(auto, auto, auto, auto)"), |
michael@0 | 157 | // Interpolation not supported in these next cases (with auto --> px-value) |
michael@0 | 158 | new AnimTestcaseFromTo("rect(1px, auto, 3px, auto)", |
michael@0 | 159 | "rect(11px, auto, 33px, 44px)"), |
michael@0 | 160 | new AnimTestcaseFromTo("rect(1px, 2px, 3px, 4px)", |
michael@0 | 161 | "rect(11px, auto, 33px, 44px)"), |
michael@0 | 162 | new AnimTestcaseFromTo("rect(1px, 2px, 3px, 4px)", "auto"), |
michael@0 | 163 | new AnimTestcaseFromTo("auto", "rect(1px, 2px, 3px, 4px)"), |
michael@0 | 164 | ]), |
michael@0 | 165 | new TestcaseBundle(gPropList.clip_path, _fromToTestLists.URIsAndNone), |
michael@0 | 166 | new TestcaseBundle(gPropList.clip_rule, [ |
michael@0 | 167 | new AnimTestcaseFromTo("nonzero", "evenodd"), |
michael@0 | 168 | new AnimTestcaseFromTo("evenodd", "inherit", { toComp: "nonzero" }), |
michael@0 | 169 | ]), |
michael@0 | 170 | new TestcaseBundle(gPropList.color, |
michael@0 | 171 | [].concat(_fromToTestLists.color, [ |
michael@0 | 172 | // Note: inherited value is rgb(50, 50, 50) (set on <svg>) |
michael@0 | 173 | new AnimTestcaseFromTo("inherit", "rgb(200, 200, 200)", |
michael@0 | 174 | { fromComp: "rgb(50, 50, 50)", |
michael@0 | 175 | midComp: "rgb(125, 125, 125)" }), |
michael@0 | 176 | ])), |
michael@0 | 177 | new TestcaseBundle(gPropList.color_interpolation, [ |
michael@0 | 178 | new AnimTestcaseFromTo("sRGB", "auto", { fromComp: "srgb" }), |
michael@0 | 179 | new AnimTestcaseFromTo("inherit", "linearRGB", |
michael@0 | 180 | { fromComp: "srgb", toComp: "linearrgb" }), |
michael@0 | 181 | ]), |
michael@0 | 182 | new TestcaseBundle(gPropList.color_interpolation_filters, [ |
michael@0 | 183 | new AnimTestcaseFromTo("sRGB", "auto", { fromComp: "srgb" }), |
michael@0 | 184 | new AnimTestcaseFromTo("auto", "inherit", |
michael@0 | 185 | { toComp: "linearrgb" }), |
michael@0 | 186 | ]), |
michael@0 | 187 | new TestcaseBundle(gPropList.cursor, [ |
michael@0 | 188 | new AnimTestcaseFromTo("crosshair", "move"), |
michael@0 | 189 | new AnimTestcaseFromTo("url('a.cur'), url('b.cur'), nw-resize", "sw-resize", |
michael@0 | 190 | { fromComp: "url(\"" + _testPath + "/a.cur\"), " + |
michael@0 | 191 | "url(\"" + _testPath + "/b.cur\"), " + |
michael@0 | 192 | "nw-resize"}), |
michael@0 | 193 | ]), |
michael@0 | 194 | new TestcaseBundle(gPropList.direction, [ |
michael@0 | 195 | new AnimTestcaseFromTo("ltr", "rtl"), |
michael@0 | 196 | new AnimTestcaseFromTo("rtl", "inherit"), |
michael@0 | 197 | ]), |
michael@0 | 198 | new TestcaseBundle(gPropList.display, [ |
michael@0 | 199 | // I'm not testing the "inherit" value for "display", because part of |
michael@0 | 200 | // my test runs with "display: none" on everything, and so the |
michael@0 | 201 | // inherited value isn't always the same. (i.e. the computed value |
michael@0 | 202 | // of 'inherit' will be different in different tests) |
michael@0 | 203 | new AnimTestcaseFromTo("block", "table-cell"), |
michael@0 | 204 | new AnimTestcaseFromTo("inline", "inline-table"), |
michael@0 | 205 | new AnimTestcaseFromTo("table-row", "none"), |
michael@0 | 206 | ]), |
michael@0 | 207 | new TestcaseBundle(gPropList.dominant_baseline, [ |
michael@0 | 208 | new AnimTestcaseFromTo("use-script", "no-change"), |
michael@0 | 209 | new AnimTestcaseFromTo("reset-size", "ideographic"), |
michael@0 | 210 | new AnimTestcaseFromTo("alphabetic", "hanging"), |
michael@0 | 211 | new AnimTestcaseFromTo("mathematical", "central"), |
michael@0 | 212 | new AnimTestcaseFromTo("middle", "text-after-edge"), |
michael@0 | 213 | new AnimTestcaseFromTo("text-before-edge", "auto"), |
michael@0 | 214 | new AnimTestcaseFromTo("use-script", "inherit", { toComp: "auto" } ), |
michael@0 | 215 | ]), |
michael@0 | 216 | // NOTE: Mozilla doesn't currently support "enable-background", but I'm |
michael@0 | 217 | // testing it here in case we ever add support for it, because it's |
michael@0 | 218 | // explicitly not animatable in the SVG spec. |
michael@0 | 219 | new TestcaseBundle(gPropList.enable_background, [ |
michael@0 | 220 | new AnimTestcaseFromTo("new", "accumulate"), |
michael@0 | 221 | ]), |
michael@0 | 222 | new TestcaseBundle(gPropList.fill, |
michael@0 | 223 | [].concat(_fromToTestLists.color, |
michael@0 | 224 | _fromToTestLists.paintServer, |
michael@0 | 225 | _fromToTestLists.colorFromInheritBlack)), |
michael@0 | 226 | new TestcaseBundle(gPropList.fill_opacity, _fromToTestLists.opacity), |
michael@0 | 227 | new TestcaseBundle(gPropList.fill_rule, [ |
michael@0 | 228 | new AnimTestcaseFromTo("nonzero", "evenodd"), |
michael@0 | 229 | new AnimTestcaseFromTo("evenodd", "inherit", { toComp: "nonzero" }), |
michael@0 | 230 | ]), |
michael@0 | 231 | new TestcaseBundle(gPropList.filter, _fromToTestLists.URIsAndNone), |
michael@0 | 232 | new TestcaseBundle(gPropList.flood_color, |
michael@0 | 233 | [].concat(_fromToTestLists.color, |
michael@0 | 234 | _fromToTestLists.colorFromInheritBlack)), |
michael@0 | 235 | new TestcaseBundle(gPropList.flood_opacity, _fromToTestLists.opacity), |
michael@0 | 236 | new TestcaseBundle(gPropList.font, [ |
michael@0 | 237 | // NOTE: 'line-height' is hard-wired at 10px in test_smilCSSFromTo.xhtml |
michael@0 | 238 | // because if it's not explicitly set, its value varies across platforms. |
michael@0 | 239 | // NOTE: System font values can't be tested here, because their computed |
michael@0 | 240 | // values vary from platform to platform. However, they are tested |
michael@0 | 241 | // visually, in the reftest "anim-css-font-1.svg" |
michael@0 | 242 | new AnimTestcaseFromTo("10px serif", "30px serif", |
michael@0 | 243 | { fromComp: "normal normal 400 10px / 10px serif", |
michael@0 | 244 | toComp: "normal normal 400 30px / 10px serif"}), |
michael@0 | 245 | new AnimTestcaseFromTo("10px serif", "30px sans-serif", |
michael@0 | 246 | { fromComp: "normal normal 400 10px / 10px serif", |
michael@0 | 247 | toComp: "normal normal 400 30px / 10px sans-serif"}), |
michael@0 | 248 | new AnimTestcaseFromTo("1px / 90px cursive", "100px monospace", |
michael@0 | 249 | { fromComp: "normal normal 400 1px / 10px cursive", |
michael@0 | 250 | toComp: "normal normal 400 100px / 10px monospace"}), |
michael@0 | 251 | new AnimTestcaseFromTo("italic small-caps 200 1px cursive", |
michael@0 | 252 | "100px monospace", |
michael@0 | 253 | { fromComp: "italic small-caps 200 1px / 10px cursive", |
michael@0 | 254 | toComp: "normal normal 400 100px / 10px monospace"}), |
michael@0 | 255 | new AnimTestcaseFromTo("oblique normal 200 30px / 10px cursive", |
michael@0 | 256 | "normal small-caps 800 40px / 10px serif"), |
michael@0 | 257 | ]), |
michael@0 | 258 | new TestcaseBundle(gPropList.font_family, [ |
michael@0 | 259 | new AnimTestcaseFromTo("serif", "sans-serif"), |
michael@0 | 260 | new AnimTestcaseFromTo("cursive", "monospace"), |
michael@0 | 261 | ]), |
michael@0 | 262 | new TestcaseBundle(gPropList.font_size, |
michael@0 | 263 | [].concat(_fromToTestLists.lengthNoUnits, |
michael@0 | 264 | _fromToTestLists.lengthPx, [ |
michael@0 | 265 | new AnimTestcaseFromTo("10px", "40%", { midComp: "15px", toComp: "20px" }), |
michael@0 | 266 | new AnimTestcaseFromTo("160%", "80%", |
michael@0 | 267 | { fromComp: "80px", |
michael@0 | 268 | midComp: "60px", |
michael@0 | 269 | toComp: "40px"}), |
michael@0 | 270 | ])), |
michael@0 | 271 | new TestcaseBundle(gPropList.font_size_adjust, [ |
michael@0 | 272 | new AnimTestcaseFromTo("0.9", "0.1", { midComp: "0.5" }), |
michael@0 | 273 | new AnimTestcaseFromTo("0.5", "0.6", { midComp: "0.55" }), |
michael@0 | 274 | new AnimTestcaseFromTo("none", "0.4"), |
michael@0 | 275 | ]), |
michael@0 | 276 | new TestcaseBundle(gPropList.font_stretch, [ |
michael@0 | 277 | new AnimTestcaseFromTo("normal", "wider", {}, |
michael@0 | 278 | "need support for animating between " + |
michael@0 | 279 | "relative 'font-stretch' values"), |
michael@0 | 280 | new AnimTestcaseFromTo("narrower", "ultra-condensed", {}, |
michael@0 | 281 | "need support for animating between " + |
michael@0 | 282 | "relative 'font-stretch' values"), |
michael@0 | 283 | new AnimTestcaseFromTo("ultra-condensed", "condensed", |
michael@0 | 284 | { midComp: "extra-condensed" }), |
michael@0 | 285 | new AnimTestcaseFromTo("semi-condensed", "semi-expanded", |
michael@0 | 286 | { midComp: "normal" }), |
michael@0 | 287 | new AnimTestcaseFromTo("expanded", "ultra-expanded", |
michael@0 | 288 | { midComp: "extra-expanded" }), |
michael@0 | 289 | new AnimTestcaseFromTo("ultra-expanded", "inherit", |
michael@0 | 290 | { midComp: "expanded", toComp: "normal" }), |
michael@0 | 291 | ]), |
michael@0 | 292 | new TestcaseBundle(gPropList.font_style, [ |
michael@0 | 293 | new AnimTestcaseFromTo("italic", "inherit", { toComp: "normal" }), |
michael@0 | 294 | new AnimTestcaseFromTo("normal", "italic"), |
michael@0 | 295 | new AnimTestcaseFromTo("italic", "oblique"), |
michael@0 | 296 | new AnimTestcaseFromTo("oblique", "normal"), |
michael@0 | 297 | ]), |
michael@0 | 298 | new TestcaseBundle(gPropList.font_variant, [ |
michael@0 | 299 | new AnimTestcaseFromTo("inherit", "small-caps", { fromComp: "normal" }), |
michael@0 | 300 | new AnimTestcaseFromTo("small-caps", "normal"), |
michael@0 | 301 | ]), |
michael@0 | 302 | new TestcaseBundle(gPropList.font_weight, [ |
michael@0 | 303 | new AnimTestcaseFromTo("100", "900", { midComp: "500" }), |
michael@0 | 304 | new AnimTestcaseFromTo("700", "100", { midComp: "400" }), |
michael@0 | 305 | new AnimTestcaseFromTo("inherit", "200", |
michael@0 | 306 | { fromComp: "400", midComp: "300" }), |
michael@0 | 307 | new AnimTestcaseFromTo("normal", "bold", |
michael@0 | 308 | { fromComp: "400", midComp: "500", toComp: "700" }), |
michael@0 | 309 | new AnimTestcaseFromTo("lighter", "bolder", {}, |
michael@0 | 310 | "need support for animating between " + |
michael@0 | 311 | "relative 'font-weight' values"), |
michael@0 | 312 | ]), |
michael@0 | 313 | // NOTE: Mozilla doesn't currently support "glyph-orientation-horizontal" or |
michael@0 | 314 | // "glyph-orientation-vertical", but I'm testing them here in case we ever |
michael@0 | 315 | // add support for them, because they're explicitly not animatable in the SVG |
michael@0 | 316 | // spec. |
michael@0 | 317 | new TestcaseBundle(gPropList.glyph_orientation_horizontal, |
michael@0 | 318 | [ new AnimTestcaseFromTo("45deg", "60deg") ]), |
michael@0 | 319 | new TestcaseBundle(gPropList.glyph_orientation_vertical, |
michael@0 | 320 | [ new AnimTestcaseFromTo("45deg", "60deg") ]), |
michael@0 | 321 | new TestcaseBundle(gPropList.image_rendering, [ |
michael@0 | 322 | new AnimTestcaseFromTo("auto", "optimizeQuality", |
michael@0 | 323 | { toComp: "optimizequality" }), |
michael@0 | 324 | new AnimTestcaseFromTo("optimizeQuality", "optimizeSpeed", |
michael@0 | 325 | { fromComp: "optimizequality", |
michael@0 | 326 | toComp: "optimizespeed" }), |
michael@0 | 327 | ]), |
michael@0 | 328 | new TestcaseBundle(gPropList.letter_spacing, |
michael@0 | 329 | [].concat(_fromToTestLists.lengthNoUnits, |
michael@0 | 330 | _fromToTestLists.lengthPx, |
michael@0 | 331 | _fromToTestLists.lengthPxPctSVG)), |
michael@0 | 332 | new TestcaseBundle(gPropList.letter_spacing, |
michael@0 | 333 | _fromToTestLists.lengthPctSVG, |
michael@0 | 334 | "pct->pct animations don't currently work for " + |
michael@0 | 335 | "*-spacing properties"), |
michael@0 | 336 | new TestcaseBundle(gPropList.lighting_color, |
michael@0 | 337 | [].concat(_fromToTestLists.color, |
michael@0 | 338 | _fromToTestLists.colorFromInheritWhite)), |
michael@0 | 339 | new TestcaseBundle(gPropList.marker, _fromToTestLists.URIsAndNone), |
michael@0 | 340 | new TestcaseBundle(gPropList.marker_end, _fromToTestLists.URIsAndNone), |
michael@0 | 341 | new TestcaseBundle(gPropList.marker_mid, _fromToTestLists.URIsAndNone), |
michael@0 | 342 | new TestcaseBundle(gPropList.marker_start, _fromToTestLists.URIsAndNone), |
michael@0 | 343 | new TestcaseBundle(gPropList.mask, _fromToTestLists.URIsAndNone), |
michael@0 | 344 | new TestcaseBundle(gPropList.opacity, _fromToTestLists.opacity), |
michael@0 | 345 | new TestcaseBundle(gPropList.overflow, [ |
michael@0 | 346 | new AnimTestcaseFromTo("auto", "visible"), |
michael@0 | 347 | new AnimTestcaseFromTo("inherit", "visible", { fromComp: "hidden" }), |
michael@0 | 348 | new AnimTestcaseFromTo("scroll", "auto"), |
michael@0 | 349 | ]), |
michael@0 | 350 | new TestcaseBundle(gPropList.pointer_events, [ |
michael@0 | 351 | new AnimTestcaseFromTo("visibleFill", "stroke", |
michael@0 | 352 | { fromComp: "visiblefill" }), |
michael@0 | 353 | new AnimTestcaseFromTo("none", "visibleStroke", |
michael@0 | 354 | { toComp: "visiblestroke" }), |
michael@0 | 355 | ]), |
michael@0 | 356 | new TestcaseBundle(gPropList.shape_rendering, [ |
michael@0 | 357 | new AnimTestcaseFromTo("auto", "optimizeSpeed", |
michael@0 | 358 | { toComp: "optimizespeed" }), |
michael@0 | 359 | new AnimTestcaseFromTo("crispEdges", "geometricPrecision", |
michael@0 | 360 | { fromComp: "crispedges", |
michael@0 | 361 | toComp: "geometricprecision" }), |
michael@0 | 362 | ]), |
michael@0 | 363 | new TestcaseBundle(gPropList.stop_color, |
michael@0 | 364 | [].concat(_fromToTestLists.color, |
michael@0 | 365 | _fromToTestLists.colorFromInheritBlack)), |
michael@0 | 366 | new TestcaseBundle(gPropList.stop_opacity, _fromToTestLists.opacity), |
michael@0 | 367 | new TestcaseBundle(gPropList.stroke, |
michael@0 | 368 | [].concat(_fromToTestLists.color, |
michael@0 | 369 | _fromToTestLists.paintServer, [ |
michael@0 | 370 | // Note: inherited value is "none" (the default for "stroke" property) |
michael@0 | 371 | new AnimTestcaseFromTo("inherit", "rgb(200, 200, 200)", |
michael@0 | 372 | { fromComp: "none"})])), |
michael@0 | 373 | new TestcaseBundle(gPropList.stroke_dasharray, |
michael@0 | 374 | [].concat(_fromToTestLists.lengthPctSVG, |
michael@0 | 375 | [ |
michael@0 | 376 | new AnimTestcaseFromTo("inherit", "20", { fromComp: "none"}), |
michael@0 | 377 | new AnimTestcaseFromTo("1", "none"), |
michael@0 | 378 | new AnimTestcaseFromTo("10", "20", { midComp: "15"}), |
michael@0 | 379 | new AnimTestcaseFromTo("1", "2, 3", { fromComp: "1, 1", |
michael@0 | 380 | midComp: "1.5, 2"}), |
michael@0 | 381 | new AnimTestcaseFromTo("2, 8", "6", { midComp: "4, 7"}), |
michael@0 | 382 | new AnimTestcaseFromTo("1, 3", "1, 3, 5, 7, 9", |
michael@0 | 383 | { fromComp: "1, 3, 1, 3, 1, 3, 1, 3, 1, 3", |
michael@0 | 384 | midComp: "1, 3, 3, 5, 5, 2, 2, 4, 4, 6"}), |
michael@0 | 385 | ])), |
michael@0 | 386 | new TestcaseBundle(gPropList.stroke_dashoffset, |
michael@0 | 387 | [].concat(_fromToTestLists.lengthNoUnitsSVG, |
michael@0 | 388 | _fromToTestLists.lengthPx, |
michael@0 | 389 | _fromToTestLists.lengthPxPctSVG, |
michael@0 | 390 | _fromToTestLists.lengthPctSVG)), |
michael@0 | 391 | new TestcaseBundle(gPropList.stroke_linecap, [ |
michael@0 | 392 | new AnimTestcaseFromTo("butt", "round"), |
michael@0 | 393 | new AnimTestcaseFromTo("round", "square"), |
michael@0 | 394 | ]), |
michael@0 | 395 | new TestcaseBundle(gPropList.stroke_linejoin, [ |
michael@0 | 396 | new AnimTestcaseFromTo("miter", "round"), |
michael@0 | 397 | new AnimTestcaseFromTo("round", "bevel"), |
michael@0 | 398 | ]), |
michael@0 | 399 | new TestcaseBundle(gPropList.stroke_miterlimit, [ |
michael@0 | 400 | new AnimTestcaseFromTo("1", "2", { midComp: "1.5" }), |
michael@0 | 401 | new AnimTestcaseFromTo("20.1", "10.1", { midComp: "15.1" }), |
michael@0 | 402 | ]), |
michael@0 | 403 | new TestcaseBundle(gPropList.stroke_opacity, _fromToTestLists.opacity), |
michael@0 | 404 | new TestcaseBundle(gPropList.stroke_width, |
michael@0 | 405 | [].concat(_fromToTestLists.lengthNoUnitsSVG, |
michael@0 | 406 | _fromToTestLists.lengthPx, |
michael@0 | 407 | _fromToTestLists.lengthPxPctSVG, |
michael@0 | 408 | _fromToTestLists.lengthPctSVG, [ |
michael@0 | 409 | new AnimTestcaseFromTo("inherit", "7px", |
michael@0 | 410 | { fromComp: "1px", midComp: "4px"}), |
michael@0 | 411 | ])), |
michael@0 | 412 | new TestcaseBundle(gPropList.text_anchor, [ |
michael@0 | 413 | new AnimTestcaseFromTo("start", "middle"), |
michael@0 | 414 | new AnimTestcaseFromTo("middle", "end"), |
michael@0 | 415 | ]), |
michael@0 | 416 | new TestcaseBundle(gPropList.text_decoration, [ |
michael@0 | 417 | new AnimTestcaseFromTo("none", "underline"), |
michael@0 | 418 | new AnimTestcaseFromTo("overline", "line-through"), |
michael@0 | 419 | new AnimTestcaseFromTo("blink", "underline"), |
michael@0 | 420 | ]), |
michael@0 | 421 | new TestcaseBundle(gPropList.text_rendering, [ |
michael@0 | 422 | new AnimTestcaseFromTo("auto", "optimizeSpeed", |
michael@0 | 423 | { toComp: "optimizespeed" }), |
michael@0 | 424 | new AnimTestcaseFromTo("optimizeSpeed", "geometricPrecision", |
michael@0 | 425 | { fromComp: "optimizespeed", |
michael@0 | 426 | toComp: "geometricprecision" }), |
michael@0 | 427 | new AnimTestcaseFromTo("geometricPrecision", "optimizeLegibility", |
michael@0 | 428 | { fromComp: "geometricprecision", |
michael@0 | 429 | toComp: "optimizelegibility" }), |
michael@0 | 430 | ]), |
michael@0 | 431 | new TestcaseBundle(gPropList.unicode_bidi, [ |
michael@0 | 432 | new AnimTestcaseFromTo("embed", "bidi-override"), |
michael@0 | 433 | ]), |
michael@0 | 434 | new TestcaseBundle(gPropList.vector_effect, [ |
michael@0 | 435 | new AnimTestcaseFromTo("none", "non-scaling-stroke"), |
michael@0 | 436 | ]), |
michael@0 | 437 | new TestcaseBundle(gPropList.visibility, [ |
michael@0 | 438 | new AnimTestcaseFromTo("visible", "hidden"), |
michael@0 | 439 | new AnimTestcaseFromTo("hidden", "collapse"), |
michael@0 | 440 | ]), |
michael@0 | 441 | new TestcaseBundle(gPropList.word_spacing, |
michael@0 | 442 | [].concat(_fromToTestLists.lengthNoUnits, |
michael@0 | 443 | _fromToTestLists.lengthPx, |
michael@0 | 444 | _fromToTestLists.lengthPxPctSVG)), |
michael@0 | 445 | new TestcaseBundle(gPropList.word_spacing, |
michael@0 | 446 | _fromToTestLists.lengthPctSVG, |
michael@0 | 447 | "pct->pct animations don't currently work for " + |
michael@0 | 448 | "*-spacing properties"), |
michael@0 | 449 | // NOTE: Mozilla doesn't currently support "writing-mode", but I'm |
michael@0 | 450 | // testing it here in case we ever add support for it, because it's |
michael@0 | 451 | // explicitly not animatable in the SVG spec. |
michael@0 | 452 | new TestcaseBundle(gPropList.writing_mode, [ |
michael@0 | 453 | new AnimTestcaseFromTo("lr", "rl"), |
michael@0 | 454 | ]), |
michael@0 | 455 | ]; |