The <video> and <audio> HTML5 tags and elements new in nature require extensive testing that require strictly written unit tests that, in essence, contract that the piece of code may satisfy.
Having a look at the recent video and audio test plan - recently updated here: https://wiki.mozilla.org/QA/Firefox3.1/Video_And_Audio_TestPlan; there are areas already covered with a sufficient amount of testing as well as other areas of the testing plan need to be tested.
Tests for the areas already covered may be found here: mozilla/ content/ media/ video/ test/ of which tests include:
- Test control toggle to determine if the controls appear and that the controls appear properly: test_controls.html
- Test autoplay to ensure proper default and can be set to proper values: test_autoplay.html
- Test that currentTime returns currentTime inside the video: test_currentTime.html
- Test duration of a video that is not buffered: tst_duration1.html
- Test that ended event gets sent and currentTime set properly: test_ended1.html
- Test that ended event gets sent and currentTime set properly for buffered video: test_ended1.html
- Test that playback can be restarted: test_ended2.html
- Should not be able to set networkState: test_networkState.html
- Test paused: test_paused.html
- Test cannot set readyState: test_readyState.html
- Test that volume setting works: test_volume.html
As one can observe, quite a few number of tests have already been written for the new tags. The areas of which that still need focusing that I find interesting are:
- Testing the ‘Souce Element’
- Especially now that the attribute isn’t required (i.e., http://blog.whatwg.org/this-week-in-html-5-episode-13), test will be required with and without it. The
<source type>attribute is now optional. If you aren’t sure what kind of video you’re serving, you can just throw one or more<source>elements into a<video>element and the browser will try each of them in the order specified.
- Especially now that the attribute isn’t required (i.e., http://blog.whatwg.org/this-week-in-html-5-episode-13), test will be required with and without it. The
- Testing read only Attributes
- Testing is required for read only attributes of video/audio elements that the user should not be able to mess with. For example, any read only attributes for the source tags would need testing
Testing seeking capabilities
- Tests already exists for seeking capabilities but more might be necessary in order to test odd/unusual invalid data.
These areas provide a general sense of the testing involved for both audio and video tags and provide some insight into the testing plan for this area. For my 0.3, I hope to cover some of these interesting areas.
Detailed audio/video plan: https://wiki.mozilla.org/QA/Firefox3.1/Video_And_Audio_TestPlan
Cheers,
Aaron

