gecko-dev/testing/web-platform/tests/css/css-transitions
Sergio Villar Senin 20e6065a94 Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly
Automatic update from web-platform-tests
Add <meta name=timeout content=long> to WPT in SlowTests

This is the 2nd step in the process of banning external/wpt from
SlowTests. After cleaning up the wtp entries we're marking them as
slow by using wpt idioms, i.e.:

1) Add <meta name="timeout" content="long"> to .html files
2) Add // META: timeout=long to .js files

Bug: 765026
Change-Id: Iaf051104f419524916e19324996cc36ee37d5426
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497005
Commit-Queue: Sergio Villar <svillar@igalia.com>
Reviewed-by: Andy Paicu <andypaicu@chromium.org>
Reviewed-by: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643402}

--

wpt-commits: 7287608f90f6b9530635d10086fd2ab386faab38
wpt-pr: 15630
2019-04-24 11:19:30 +01:00
..
parsing
reference
support Bug 1545707 - Rework hidden-container-001.html CSS transitions tests; r=hiro 2019-04-22 00:53:49 +00:00
AnimationEffect-getComputedTiming.tentative.html
before-DOMContentLoaded-001.html Bug 1510617 [wpt PR 14273] - Remove timeout from async_test for argument form., a=testonly 2018-12-14 13:53:53 +00:00
before-load-001.html Bug 1510617 [wpt PR 14273] - Remove timeout from async_test for argument form., a=testonly 2018-12-14 13:53:53 +00:00
changing-while-transition.html Bug 1510617 [wpt PR 14273] - Remove timeout from async_test for argument form., a=testonly 2018-12-14 13:53:53 +00:00
CSSPseudoElement-getAnimations.tentative.html
CSSTransition-canceling.tentative.html
CSSTransition-currentTime.tentative.html
CSSTransition-effect.tentative.html
CSSTransition-finished.tentative.html
CSSTransition-ready.tentative.html
CSSTransition-startTime.tentative.html
CSSTransition-transitionProperty.tentative.html
currentcolor-animation-001.html Bug 1505370 [wpt PR 13966] - Make testharness tests run in a top-level browsing context, a=testonly 2019-01-23 10:54:57 +00:00
disconnected-element-001.html Bug 1545689 - Fix disconnected-element-001.html to reflect that addDiv adds its element to the document; r=hiro 2019-04-19 09:09:49 +00:00
Document-getAnimations.tentative.html Bug 1545707 - Add tests for animation of ::marker pseudo-elements; r=mats 2019-04-22 00:54:09 +00:00
Element-getAnimations.tentative.html
event-dispatch.tentative.html Bug 1526551 [wpt PR 15206] - Add custom timeout to EventWatcher to get better failures on wpt test., a=testonly 2019-02-14 11:38:52 +00:00
events-001.html
events-002.html
events-003.html
events-004.html
events-005.html
events-006.html
events-007.html
historical.html
idlharness.html
inheritance.html
KeyframeEffect-getKeyframes.tentative.html
KeyframeEffect-target.tentative.html
META.yml
non-rendered-element-001.html Bug 1545707 - Rework hidden-container-001.html CSS transitions tests; r=hiro 2019-04-22 00:53:49 +00:00
non-rendered-element-002.html Bug 1545707 - Add tests for animation of ::marker pseudo-elements; r=mats 2019-04-22 00:54:09 +00:00
properties-value-001.html Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
properties-value-002.html Bug 1510617 [wpt PR 14273] - Remove timeout from async_test for argument form., a=testonly 2018-12-14 13:53:53 +00:00
properties-value-003.html Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
properties-value-auto-001.html Bug 1510617 [wpt PR 14273] - Remove timeout from async_test for argument form., a=testonly 2018-12-14 13:53:53 +00:00
properties-value-implicit-001.html Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
properties-value-inherit-001.html Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
properties-value-inherit-002.html Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
properties-value-inherit-003.html Bug 1510617 [wpt PR 14273] - Remove timeout from async_test for argument form., a=testonly 2018-12-14 13:53:53 +00:00
pseudo-elements-001.html Bug 1510617 [wpt PR 14273] - Remove timeout from async_test for argument form., a=testonly 2018-12-14 13:53:53 +00:00
pseudo-elements-002.html
README.md
transition-001.html
transition-background-position-with-edge-offset.html
transition-delay-000.html
transition-delay-001.html
transition-delay-002.html
transition-delay-003.html
transition-duration-001.html
transition-duration-002.html
transition-duration-003.html
transition-duration-004.html
transition-property-001.html
transition-property-002.html
transition-property-003.html
transition-property-004.html
transition-property-005.html
transition-property-006.html
transition-property-007.html
transition-property-008.html
transition-property-009.html
transition-property-010.html
transition-property-011.html
transition-property-012.html
transition-property-013.html
transition-property-014.html
transition-property-015.html
transition-property-016.html
transition-property-017.html
transition-property-018.html
transition-property-019.html
transition-property-020.html
transition-property-021.html
transition-property-022.html
transition-property-023.html
transition-property-024.html
transition-property-025.html
transition-property-026.html
transition-property-027.html
transition-property-028.html
transition-property-029.html
transition-property-030.html
transition-property-031.html
transition-property-032.html
transition-property-033.html
transition-property-034.html
transition-property-035.html
transition-property-036.html
transition-property-037.html
transition-property-038.html
transition-property-039.html
transition-property-040.html
transition-property-041.html
transition-property-042.html
transition-property-043.html
transition-property-044.html
transition-property-045.html
transition-reparented.html Bug 1513766 [wpt PR 14486] - [CSS Transitions] Add test for reparenting, a=testonly 2019-01-23 10:56:10 +00:00
transition-test.html
transition-timing-function-001.html
transition-timing-function-002.html
transition-timing-function-003.html
transition-timing-function-004.html
transition-timing-function-005.html
transition-timing-function-006.html
transition-timing-function-007.html
transition-timing-function-008.html
transition-timing-function-009.html
transition-timing-function-010.html
transition-timing-function-011.html
transition-timing-function-012.html
transition-timing-function-013.html
transitioncancel-001.html Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
transitionevent-interface.html
transitions-animatable-properties-01.html Bug 1512574 [wpt PR 14409] - Remove test-level assert property from tests, a=testonly 2018-12-14 13:54:42 +00:00
zero-duration-multiple-transition.html

CSSWG Compatible Tests

Hints

  • en/disable vendor-prefixing in ./support/helper.js see addVendorPrefixes
  • remove extra <length> values to reduce test cases (and thus execution duration) in ./support.properties.js, see values.length

General Properties Test Concept

Using support/property.js test suites compile a list of animatable properties. getPropertyTests() (and the like) will expand the specification's width: length, percentage to width: 1em, 1ex, 1px, … 1% in order to test all possible value types. The propertyTests returned by support/property.js have the following general structure:

{
  // name of the test
  "name": "background-color color(rgba)",
  // property that is being tested
  "property": "background-color",
  // styles to set on the parent container (usually #container)
  "parentStyle": {},
  // initial styles to set on the transition element (usually #transition)
  // may contain additional properties such as position: absolute; as required
  "from": {
    "background-color": "rgba(100,100,100,1)"
  },
  // styles to transition to
  "to": {
    "background-color": "rgba(10,10,10,0.4)"
  },
  // flags classifying property types,
  // currently only {discrete:true} for visbility
  "flags": {}
}

For each compiled test case the test runner identifies computed initial and target values. If they match, no transition will take place, because the property couldn't be parsed. If after starting the transition the computed style matches the target value, the browser applied that value immedately and no transition will take place. During the transition the computed style may match neither initial nor target value (unless it's a discrete transition), or there was no transition.

Besides value-assertions, the suites compare received TransitionEnd events. While the values are only matched against computed initial and target values, expected TransitionEnd events are declared explicitly. This can (and will) lead to some test failures that are arguably not a failure (mainly because the specification didn't cover the specific case). Transitioning color may (or not, depending on browser) also run a transition for background-color, as the latter's default value is currentColor. This suite considers those implicit transitions a failure. If it truly is a failure or not, should be decided in the specification (and tests updated accordingly).

Browsers supporting requestAnimationFrame can run a test in 100ms. Browsers that don't need a wider time frame to allow the not very dead-on-target setTimeout() to be triggered between TransitionStart and TransitionEnd. Low-end CPU devices also benefit from slower transitions. Since a 300 hundred tests, each lasting 500ms would require 2.5 minutes to run, tests are run concurrently, as they cannot affect each other. For low-end devices (e.g. iPad) too many parallel tests lead to global failure, because a single requestAnimationFrame() would have to iterate too many nodes, which is why the suite shards into slices of 50 parallel tests. Tests are run in an off-viewport container, to prevent you from having seizures.

To make individual tests a bit more readable, a lot of the test-functionality has been moved to external JavaScript files. All assertions reside within the test file itsel, though. Although they are mostly exact duplicates of other tests, it should help understanding what a test does (while abstracting away how it does it.)

Debugging

  1. reduce to the tests you want to take a closer look at - see filterPropertyTests() in support/properties.js
  2. disable final cleanup by commenting out done and teardown callbacks
  3. possibly increase the duration and disable the #offscreen (by simply naming it #off-screen)

Unspecified Behavior

the following suites test behavior that is not covered in CSS3 Transitions (as of today):

  • properties-value-002.html - verify value types transitionable but not specified for properties
  • properties-value-003.html - verify transitionable properties thus far not specified at all
  • properties-value-implicit-001.html - verify behavior for em based <length> properties when font-size is changed
  • events-006.html - expect TransitionEnd event to be triggered and event.pseudoElement to be set properly
  • before-DOMContentLoaded-001.html - expect transitions to be performed before DOM is ready
  • before-load-001.html - expect transitions to be performed before document is fully loaded
  • hidden-container-001.html - expect transitions to NOT be performed if they happen within hidden elements
  • detached-container-001.html - expect transitions to NOT be performed if they happen outside of the document

Yet To Be Tested

These are topics I have identifed in need of testing, but haven gotten around to testing them.

  • Anything involving <svg>
    • well, maybe some day...
  • proper execution of timing-functions - are the right property values set at a given time?
    • how exactly do I pinpoint a specific time to verify a property's value at time t?
    • need to implement cubic-bezier to actually calculate a property's value at time t?
  • selector:hover:before {}
    • I have no clue how to trigger that from script