Update LayoutTests/media/broken-video to test for correct error codes
Created attachment 95062 [details] Patch
Created attachment 95064 [details] Patch
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);
Created attachment 99868 [details] Patch
(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 on attachment 99868 [details] Patch Thanks!
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 on attachment 99868 [details] Patch The cq bot seems sick.
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 on attachment 99868 [details] Patch Clearing flags on attachment: 99868 Committed r103472: <http://trac.webkit.org/changeset/103472>
All reviewed patches have been landed. Closing bug.