Friday, 19 April 2013

WebVTT Reftest Bug

For the bug 855633 in Mozilla's bug tracker.

https://bugzilla.mozilla.org/show_bug.cgi?id=855633

I've written many reftests for WebVTT. Outstanding tests include positioning cues with right-to-left test. There appears to be a bug in the specification. Overlapping cue tests need to be written. Tests for the tags ruby, class, and voice are not done. In addition, there are no tests for new CSS properties such as ::cue.

I've had to make a number of basic test changes. The first is that the height of the first line in a cue should be found using the css property height instead of line-height. Line-height returns "normal" on some browsers but height is always a number. Also, the specification wants the height of the first line not the line-height of the first line.

Another issue was that the height may not always be an integer. Decimal pixel values are valid (eg. 27.6px) so parseFloat should be used instead of parseInt.

The following tests are written.


Test the default behaviour. No particular rule. (April 17, 2013)
basic

Make sure cues do not render for the audio element. (April 17, 2013)
audio

Make sure control interface and cue do not overlap. (April 17, 2013)
controls

Ensure cues display in the correct order for multiple cues and tracks. (April 17, 2013)
2tracks-start-time-a
2tracks-start-time-b
1track-start-time-a
1track-start-time-b
2tracks-track-order-a
2tracks-track-order-b
2tracks-end-time-a
2tracks-end-time-b
1track-end-time-a
1track-end-time-b
1track-cue-order-a
1track-cue-order-b

Right to left writing direction test (April 17, 2013)
writing-direction-rtl

Writing mode vertical test (April 17, 2013)
writing-mode-vertical-lr
writing-mode-vertical-rl

Cue writing direction, alignment, and writting mode tests. (April 17, 2013)
The rules for direction, alignment, and mode depend on each other
so tests for each individually would be the identical.
There is a specification bug for positioning cues with right-to-left text. Those tests need to be done.
setting-horizontal-end-ltr
setting-horizontal-left-ltr
setting-horizontal-middle49-ltr
setting-horizontal-middle50-ltr
setting-horizontal-middle51-ltr
setting-horizontal-right-ltr
setting-horizontal-start-ltr
setting-vertical-lr-end
setting-vertical-lr-left
setting-vertical-lr-middle49
setting-vertical-lr-middle50
setting-vertical-lr-middle51
setting-vertical-lr-right
setting-vertical-lr-start
setting-vertical-rl-end
setting-vertical-rl-left
setting-vertical-rl-middle49
setting-vertical-rl-middle50
setting-vertical-rl-middle51
setting-vertical-rl-right
setting-vertical-rl-start

Snap-to-line tests
snap-to-lines-false-horizontal
snap-to-lines-false-vertical-lr
snap-to-lines-false-vertical-rl
snap-to-lines-true-horizontal
snap-to-lines-true-vertical-lr
snap-to-lines-true-vertical-rl

Text wrapping tests
wrap-balance
wrap-break-word

Cue test payload tag tests
tag-bold
tag-italic
tag-underline.vtt

No comments:

Post a Comment