Bug 61573 - Update LayoutTests/media/broken-video to test for correct error codes
Summary: Update LayoutTests/media/broken-video to test for correct error codes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-26 15:53 PDT by Scott Franklin
Modified: 2011-12-21 16:25 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.50 KB, patch)
2011-05-26 15:55 PDT, Scott Franklin
no flags Details | Formatted Diff | Diff
Patch (2.12 KB, patch)
2011-05-26 16:00 PDT, Scott Franklin
no flags Details | Formatted Diff | Diff
Patch (2.25 KB, patch)
2011-07-06 13:16 PDT, Scott Franklin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Franklin 2011-05-26 15:53:26 PDT
Update LayoutTests/media/broken-video to test for correct error codes
Comment 1 Scott Franklin 2011-05-26 15:55:29 PDT
Created attachment 95062 [details]
Patch
Comment 2 Scott Franklin 2011-05-26 16:00:13 PDT
Created attachment 95064 [details]
Patch
Comment 3 Eric Carlson 2011-07-06 08:13:38 PDT
Comment on attachment 95064 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=95064&action=review

r=me with the changes suggested.

> LayoutTests/media/broken-video.html:2
> +<p>Test that QuickTime file with broken headers and content generates a SRC_NOT_SUPPORTED error.<p>

This comment is incorrect as the test will not open a QuickTime movie, the two files that can be opened are garbage.mp4 and garbage.ogv. You also added a check for networkState so you may as well mention that as well. Something like "Tests that an invalid video file generates a MEDIA_ERR_SRC_NOT_SUPPORTED error and sets networkState to NETWORK_NO_SOURCE" perhaps?

> LayoutTests/media/broken-video.html:11
> +        testExpected("video.error.code", "4");
> +        testExpected("video.networkState", "3");

I would prefer to have the named constants used here:

    testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED);
    testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE);
Comment 4 Scott Franklin 2011-07-06 13:16:32 PDT
Created attachment 99868 [details]
Patch
Comment 5 Scott Franklin 2011-07-06 13:20:41 PDT
(In reply to comment #3)
> (From update of attachment 95064 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=95064&action=review
> 
> r=me with the changes suggested.
> 
> > LayoutTests/media/broken-video.html:2
> > +<p>Test that QuickTime file with broken headers and content generates a SRC_NOT_SUPPORTED error.<p>
> 
> This comment is incorrect as the test will not open a QuickTime movie, the two files that can be opened are garbage.mp4 and garbage.ogv. You also added a check for networkState so you may as well mention that as well. Something like "Tests that an invalid video file generates a MEDIA_ERR_SRC_NOT_SUPPORTED error and sets networkState to NETWORK_NO_SOURCE" perhaps?

I thought the bit about QuickTime was weird, but I was trying to retain similarity to the original. Your suggestion is better.

> 
> > LayoutTests/media/broken-video.html:11
> > +        testExpected("video.error.code", "4");
> > +        testExpected("video.networkState", "3");
> 
> I would prefer to have the named constants used here:
> 
>     testExpected("video.error.code", MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED);
>     testExpected("video.networkState", HTMLMediaElement.NETWORK_NO_SOURCE);

I didn't realize those existed. Fixed.
Comment 6 Eric Carlson 2011-07-07 07:47:44 PDT
Comment on attachment 99868 [details]
Patch

Thanks!
Comment 7 WebKit Review Bot 2011-07-07 10:25:15 PDT
Comment on attachment 99868 [details]
Patch

Rejecting attachment 99868 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-03', '--port..." exit_code: 2

Last 500 characters of output:
b36a3fe474ec4831060744c9f3b0a94152ac3270
r90571 = 596b2635f80798fd6b8b5b058c781afb4001c10c
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.
Updating chromium port dependencies using gclient...

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://queues.webkit.org/results/8990983
Comment 8 Eric Seidel (no email) 2011-12-21 15:25:07 PST
Comment on attachment 99868 [details]
Patch

The cq bot seems sick.
Comment 9 Eric Seidel (no email) 2011-12-21 15:25:54 PST
I doubt this will land correctly given it's been 5 months.  If it fails to land we should just r- this.  The author will need to post an updated patch.
Comment 10 WebKit Review Bot 2011-12-21 16:25:38 PST
Comment on attachment 99868 [details]
Patch

Clearing flags on attachment: 99868

Committed r103472: <http://trac.webkit.org/changeset/103472>
Comment 11 WebKit Review Bot 2011-12-21 16:25:43 PST
All reviewed patches have been landed.  Closing bug.