We should test that a <video> element with a single <source> element loads correctly.
Created attachment 98395 [details] Proposed patch.
Comment on attachment 98395 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=98395&action=review > LayoutTests/media/video-single-source.html:27 > + // The second source is bogus and won't load, but it should never be processed. But the name of the tests is "single source". Perhaps you should name it "Single valid source". > LayoutTests/media/video-single-source.html:36 > + waitForEvent('error', errorEvent); You say that "The second source is bogus and won't load, but it should never be processed." -> processed you mean rendered or whatever, because here you expect an error on the last source as the spec says. I'm nitpicking.
(In reply to comment #2) > (From update of attachment 98395 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=98395&action=review > > > LayoutTests/media/video-single-source.html:27 > > + // The second source is bogus and won't load, but it should never be processed. > > But the name of the tests is "single source". Perhaps you should name it "Single valid source". > OK. > > LayoutTests/media/video-single-source.html:36 > > + waitForEvent('error', errorEvent); > > You say that "The second source is bogus and won't load, but it should never be processed." -> processed you mean rendered or whatever, because here you expect an error on the last source as the spec says. I'm nitpicking. Not quite. If HTMLMediaElement processes the <source> at all, it will pass the url to the media engine based on the MIME type. The file doesn't exist so the load will fail and an error event will be posted, and errorEvent will fail the test with a message about what went wrong.
Created attachment 98406 [details] Updated patch
http://trac.webkit.org/changeset/89615