Bug 63285 - Add a test with a single <source> element
Summary: Add a test with a single <source> element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-23 13:56 PDT by Eric Carlson
Modified: 2011-06-23 14:37 PDT (History)
0 users

See Also:


Attachments
Proposed patch. (2.89 KB, patch)
2011-06-23 14:04 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Updated patch (2.91 KB, patch)
2011-06-23 14:30 PDT, Eric Carlson
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2011-06-23 13:56:18 PDT
We should test that a <video> element with a single <source> element loads correctly.
Comment 1 Eric Carlson 2011-06-23 14:04:09 PDT
Created attachment 98395 [details]
Proposed patch.
Comment 2 Alexis Menard (darktears) 2011-06-23 14:13:11 PDT
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.
Comment 3 Eric Carlson 2011-06-23 14:23:23 PDT
(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.
Comment 4 Eric Carlson 2011-06-23 14:30:46 PDT
Created attachment 98406 [details]
Updated patch
Comment 5 Eric Carlson 2011-06-23 14:37:16 PDT
http://trac.webkit.org/changeset/89615