Specification link: 19.2 Animation elements

animate-elem-66-t ← index → animate-elem-68-t

Tests that contain the draft-watermark are under development and may be incorrectly testing a feature.

# animate-elem-67-t.svg
SVG Image | PNG Image

## Operator Script

Run the test and observe it for at least six seconds. No interaction required.

## Pass Criteria

The test passes if for the first five seconds after the document loads, the red squares in each row (two in the third row, and one each in the remaining rows) are in the right column, and after the five seconds, they all move to the left column.

## Test Description

This tests performs basic tests on restart attribute.

Each row in the test shows different rectangles subject to <set> animations with different configurations with regards to the restart attribute. For each row, the animation should be active during the first 5 seconds of the animations where the red rectangle should show in the right column. At five seconds into the animation, all the rectangles should move to their left position.

On the first row, the <set> animation has a begin attribute set to '0s;1s' and a dur attribute set to 4s. This should result in a first interval of (0s <= t < 4s) which should be superceeded, at 1s, by a new interval of (1s <= t < 5s) because the default restart behavior is 'always'. Consequently, the rectangle should be in the right position during the (0s <= t < 5s) interval and move to the left position at 5s.

On the second row, the <set> animation has a begin attribute set to '0s;1s', a dur attribute set to 4s and a restart attribute set to always. The behavior should be the same as for the first row.

On the third row, the first (left most) rectangle's <set> animation has a begin attribute set to '0s;1s', a dur set to 5s and a restart attribute set to whenNotActive. Because of the rules for computing intervals, the animation's interval is (0s <= t < 5s) and is not superseded by a (1s <= t < 6s) interval because of the restart value. The second (right most) red rectangle's <set> animation has a begin attribute set to '0s;2.5s' and a dur attribute set to 2.5s. This results in a first interval (0s <= t < 2.5s) which is followed by a (2.5s <= t < 5s) interval. Consequently, the rectangle stays on its right position for the first five seconds before it definitively moves to the left position.

On the fourth row, the <set> animation has a begin attribute set to '0s;5s' and a dur attribute set to 5s. This results in a first interval of (0s <= t < 5s). Because the restart attribute is set to 'never', the following possible interval, (5s <= t < 10s) does not apply and the animation is only active for the first 5 seconds.

The fifth row shows a simple animated red rectangle which lasts for 5 seconds. It shows a reference of how the other animations should behave visually: all red rectangles should have the same horizontal position as the one on the reference row, at any time during the animation.

animate-elem-66-t ← index → animate-elem-68-t