tree: 91719fd19f974cc8a58bcf55120df2814c718059 [path history] [tgz]
  1. animations/
  2. crashtests/
  3. parsing/
  4. support/
  5. AnimationEffect-getComputedTiming.tentative-expected.txt
  6. AnimationEffect-getComputedTiming.tentative.html
  7. before-load-001-expected.txt
  8. before-load-001.html
  9. changing-while-transition-001-expected.txt
  10. changing-while-transition-001.html
  11. changing-while-transition-002-expected.txt
  12. changing-while-transition-002.html
  13. changing-while-transition-003-expected.txt
  14. changing-while-transition-003.html
  15. changing-while-transition-004-expected.txt
  16. changing-while-transition-004.html
  17. CSSTransition-canceling.tentative-expected.txt
  18. CSSTransition-canceling.tentative.html
  19. CSSTransition-currentTime.tentative-expected.txt
  20. CSSTransition-currentTime.tentative.html
  21. CSSTransition-effect.tentative-expected.txt
  22. CSSTransition-effect.tentative.html
  23. CSSTransition-finished.tentative-expected.txt
  24. CSSTransition-finished.tentative.html
  25. CSSTransition-ready.tentative-expected.txt
  26. CSSTransition-ready.tentative.html
  27. CSSTransition-startTime.tentative-expected.txt
  28. CSSTransition-startTime.tentative.html
  29. CSSTransition-transitionProperty.tentative-expected.txt
  30. CSSTransition-transitionProperty.tentative.html
  31. currentcolor-animation-001-expected.txt
  32. currentcolor-animation-001.html
  33. disconnected-element-001-expected.txt
  34. disconnected-element-001.html
  35. Document-getAnimations.tentative-expected.txt
  36. Document-getAnimations.tentative.html
  37. Element-getAnimations.tentative-expected.txt
  38. Element-getAnimations.tentative.html
  39. event-dispatch.tentative-expected.txt
  40. event-dispatch.tentative.html
  41. events-001-expected.txt
  42. events-001.html
  43. events-002-expected.txt
  44. events-002.html
  45. events-003-expected.txt
  46. events-003.html
  47. events-004-expected.txt
  48. events-004.html
  49. events-005-expected.txt
  50. events-005.html
  51. events-006-expected.txt
  52. events-006.html
  53. events-007-expected.txt
  54. events-007.html
  55. historical-expected.txt
  56. historical.html
  57. idlharness-expected.txt
  58. idlharness.html
  59. inherit-height-transition-expected.txt
  60. inherit-height-transition.html
  61. inheritance-expected.txt
  62. inheritance.html
  63. KeyframeEffect-getKeyframes.tentative-expected.txt
  64. KeyframeEffect-getKeyframes.tentative.html
  65. KeyframeEffect-setKeyframes.tentative-expected.txt
  66. KeyframeEffect-setKeyframes.tentative.html
  67. KeyframeEffect-target.tentative-expected.txt
  68. KeyframeEffect-target.tentative.html
  69. META.yml
  70. no-transition-from-ua-to-blocking-stylesheet-expected.html
  71. no-transition-from-ua-to-blocking-stylesheet-ref.html
  72. no-transition-from-ua-to-blocking-stylesheet.html
  73. non-rendered-element-001-expected.txt
  74. non-rendered-element-001.html
  75. non-rendered-element-002-expected.txt
  76. non-rendered-element-002.html
  77. non-rendered-element-004.tentative-expected.txt
  78. non-rendered-element-004.tentative.html
  79. properties-value-001-expected.txt
  80. properties-value-001.html
  81. properties-value-002-expected.txt
  82. properties-value-002.html
  83. properties-value-003-expected.txt
  84. properties-value-003.html
  85. properties-value-implicit-001-expected.txt
  86. properties-value-implicit-001.html
  87. properties-value-inherit-001-expected.txt
  88. properties-value-inherit-001.html
  89. properties-value-inherit-002-expected.txt
  90. properties-value-inherit-002.html
  91. properties-value-inherit-003-expected.txt
  92. properties-value-inherit-003.html
  93. pseudo-elements-001-expected.txt
  94. pseudo-elements-001.html
  95. pseudo-elements-002-expected.txt
  96. pseudo-elements-002.html
  97. README.md
  98. retargetted-transition-with-box-sizing-expected.txt
  99. retargetted-transition-with-box-sizing.html
  100. root-color-transition-expected.html
  101. root-color-transition-ref.html
  102. root-color-transition.html
  103. starting-of-transitions-001-expected.txt
  104. starting-of-transitions-001.html
  105. transition-001-expected.txt
  106. transition-001.html
  107. transition-after-animation-001-expected.txt
  108. transition-after-animation-001.html
  109. transition-background-position-with-edge-offset-expected.txt
  110. transition-background-position-with-edge-offset.html
  111. transition-base-response-001-expected.txt
  112. transition-base-response-001.html
  113. transition-base-response-002-expected.txt
  114. transition-base-response-002.html
  115. transition-base-response-003-expected.txt
  116. transition-base-response-003.html
  117. transition-delay-001-expected.txt
  118. transition-delay-001.html
  119. transition-duration-001-expected.txt
  120. transition-duration-001.html
  121. transition-duration-shorthand-expected.txt
  122. transition-duration-shorthand.html
  123. transition-property-001-expected.txt
  124. transition-property-001.html
  125. transition-property-002-expected.txt
  126. transition-property-002.html
  127. transition-reparented-expected.txt
  128. transition-reparented.html
  129. transition-test-expected.html
  130. transition-test.html
  131. transitioncancel-001-expected.txt
  132. transitioncancel-001.html
  133. transitioncancel-002-expected.txt
  134. transitioncancel-002.html
  135. transitionevent-interface-expected.txt
  136. transitionevent-interface.html
  137. w3c-import.log
  138. zero-duration-multiple-transition-expected.txt
  139. zero-duration-multiple-transition.html
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/README.md

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 immediately 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-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