dom/smil/test/db_smilCSSFromTo.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

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

mercurial