tree: 0adaf5306ceaec5c45cfa65f800a80f1c7ba92ca [path history] [tgz]
  1. parsing/
  2. reference/
  3. support/
  4. AnimationEffect-getComputedTiming.tentative.html
  5. before-DOMContentLoaded-001-expected.txt
  6. before-load-001.html
  7. changing-while-transition-001.html
  8. changing-while-transition-002.html
  9. changing-while-transition-003.html
  10. CSSPseudoElement-getAnimations.tentative-expected.txt
  11. CSSPseudoElement-getAnimations.tentative.html
  12. CSSTransition-canceling.tentative-expected.txt
  13. CSSTransition-canceling.tentative.html
  14. CSSTransition-currentTime.tentative.html
  15. CSSTransition-effect.tentative-expected.txt
  16. CSSTransition-effect.tentative.html
  17. CSSTransition-finished.tentative.html
  18. CSSTransition-ready.tentative.html
  19. CSSTransition-startTime.tentative.html
  20. CSSTransition-transitionProperty.tentative-expected.txt
  21. CSSTransition-transitionProperty.tentative.html
  22. currentcolor-animation-001.html
  23. disconnected-element-001.html
  24. Document-getAnimations.tentative-expected.txt
  25. Document-getAnimations.tentative.html
  26. Element-getAnimations.tentative-expected.txt
  27. Element-getAnimations.tentative.html
  28. event-dispatch.tentative-expected.txt
  29. event-dispatch.tentative.html
  30. events-001.html
  31. events-002.html
  32. events-003.html
  33. events-004.html
  34. events-005.html
  35. events-006.html
  36. events-007.html
  37. historical.html
  38. idlharness-expected.txt
  39. idlharness.html
  40. inherit-height-transition.html
  41. inheritance.html
  42. KeyframeEffect-getKeyframes.tentative-expected.txt
  43. KeyframeEffect-getKeyframes.tentative.html
  44. KeyframeEffect-target.tentative.html
  45. META.yml
  46. no-transition-from-ua-to-blocking-stylesheet-ref.html
  47. no-transition-from-ua-to-blocking-stylesheet.html
  48. non-rendered-element-001.html
  49. non-rendered-element-002.html
  50. properties-value-001-expected.txt
  51. properties-value-001.html
  52. properties-value-002-expected.txt
  53. properties-value-002.html
  54. properties-value-003-expected.txt
  55. properties-value-003.html
  56. properties-value-auto-001.html
  57. properties-value-implicit-001-expected.txt
  58. properties-value-implicit-001.html
  59. properties-value-inherit-001-expected.txt
  60. properties-value-inherit-001.html
  61. properties-value-inherit-002-expected.txt
  62. properties-value-inherit-002.html
  63. properties-value-inherit-003.html
  64. pseudo-elements-001.html
  65. pseudo-elements-002.html
  66. README.md
  67. starting-of-transitions-001.html
  68. transition-001.html
  69. transition-background-position-with-edge-offset.html
  70. transition-delay-000.html
  71. transition-delay-001.html
  72. transition-delay-002.html
  73. transition-delay-003.html
  74. transition-duration-001.html
  75. transition-duration-002.html
  76. transition-duration-003.html
  77. transition-duration-004.html
  78. transition-property-001.html
  79. transition-property-002-expected.txt
  80. transition-property-002.html
  81. transition-property-003.html
  82. transition-property-004.html
  83. transition-property-005.html
  84. transition-property-006.html
  85. transition-property-007.html
  86. transition-property-008.html
  87. transition-property-009.html
  88. transition-property-010.html
  89. transition-property-011.html
  90. transition-property-012.html
  91. transition-property-013.html
  92. transition-property-014.html
  93. transition-property-015.html
  94. transition-property-016.html
  95. transition-property-017.html
  96. transition-property-018.html
  97. transition-property-019.html
  98. transition-property-020.html
  99. transition-property-021.html
  100. transition-property-022.html
  101. transition-property-023.html
  102. transition-property-024.html
  103. transition-property-025.html
  104. transition-property-026.html
  105. transition-property-027.html
  106. transition-property-028.html
  107. transition-property-029.html
  108. transition-property-030.html
  109. transition-property-031.html
  110. transition-property-032.html
  111. transition-property-033.html
  112. transition-property-034.html
  113. transition-property-035.html
  114. transition-property-036.html
  115. transition-property-037.html
  116. transition-property-038.html
  117. transition-property-039.html
  118. transition-property-040.html
  119. transition-property-041.html
  120. transition-property-042.html
  121. transition-property-043.html
  122. transition-property-044.html
  123. transition-property-045.html
  124. transition-reparented.html
  125. transition-test.html
  126. transition-timing-function-001.html
  127. transition-timing-function-002.html
  128. transition-timing-function-003.html
  129. transition-timing-function-004.html
  130. transition-timing-function-005.html
  131. transition-timing-function-006.html
  132. transition-timing-function-007.html
  133. transition-timing-function-008.html
  134. transition-timing-function-009.html
  135. transition-timing-function-010.html
  136. transition-timing-function-011.html
  137. transition-timing-function-012.html
  138. transition-timing-function-013.html
  139. transitioncancel-001.html
  140. transitionevent-interface.html
  141. transitions-animatable-properties-01.html
  142. zero-duration-multiple-transition.html
third_party/blink/web_tests/external/wpt/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 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-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