Specification link: 19.2 Animation elements

animate-elem-60-t ← index → animate-elem-62-t

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

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

## Operator Script

Run the test. Observe the document for a least six seconds. Then, click on the left square in the "2 event base" row and wait for another six seconds while observing. Then, press "a" on the keyboard and wait for another six seconds while observing.

## Pass Criteria

The test passes if all of the following conditions are met:

- The red squares in the top three rows and the bottom row are in the relevant column according to the times written above the columns: in left column for the first second of the document, in the right column between 1s and 2s, in the left column again between 2s and 4s, in the right column again between 4s and 5s, and finally revert to the left column at 5s.
- Once the red square in the "2 event base" row is clicked, it must follow the same movements as the earlier animated squares, except that the times above the columns indicate offsets from the time of the click, rather than from the start of the document. Thus, the red square must be in the left column in the first second after being clicked, in the right column between 1s and 2s after being clicked, in the left column again between 2s and 4s after being clicked, in the right column again between 4s and 5s after being clicked, and finally must revert to the left column 5s after being clicked.
- Once the "a" key is pressed, the red square in the "2 accessKeys" row must follow the same movements as the first set of animated squares, except that the times above the columns indicate offsets from the time of the keypress, rather than from the start of the document. Thus, the red square must be in the left column in the first second after the keypress, in the right column between 1s and 2s after the keypress, in the left column again between 2s and 4s after the keypress, in the right column again between 4s and 5s after the keypress, and finally must revert to the left column 5s after the keypress.

## Test Description

This tests validates multiple begin conditions in the begin attribute, assuming support for the <set> element and setting the fill attribute on a <rect> element.

The test validates the various possibilities for the begin attribute value: multiple offset values, multiple event base values, multiple sync base values, multiple repeat values, and multiple accessKey values. Finally, the test validates that begin values of different kinds can be mixed.

The test shows 6 rows where a red rectangle' s x attribute is animated with <set> elements.

On the first three rows, the red rectangles should show on the left from 0 to 1s. From 1 to 2s, the rectangles should show on the right. Then the rectangles should show on the left from 2 to 4s, then on the right again from 4 to 5s and come back to the left position and stay there after 5s.

On the fourth row, the rectangle's begin condition is event based and requires a user click. After the user clicks on the rectangle, the rectangle should move to the right position for 1s, then move back to the left position for 3 seconds, move again to the right position for 1 second before going back to the left position.

On the fifth row, the rectangle's begin condition is accessKey based and requires a user to press the 'a' key. After the user presses that key the rectangle should move to the right position for 1s, then move back to the left position for 3 seconds, move again to the right position for 1 second before going back to the left position.

The last row's rectangle has a begin condition with two offset values (1s;4s) and should behave like the rectangles of the first three rows for the first 5 seconds of the document's timeline. In addition, the begin condition has a click event base and thus, the rectangle should move to the right position for one second every time the user clicks on it. Finally, the begin condition also has an accessKey condition for the 'b' character. Thus, the rectangle should move to the right position every time the user presses the 'b' key.

animate-elem-60-t ← index → animate-elem-62-t