RESOLVED FIXED 55414
Fix race condition in 4 media tests
https://bugs.webkit.org/show_bug.cgi?id=55414
Summary Fix race condition in 4 media tests
Tony Gentilcore
Reported 2011-02-28 14:55:24 PST
Fix race condition in 4 media tests
Attachments
Patch (7.35 KB, patch)
2011-02-28 15:22 PST, Tony Gentilcore
no flags
Patch for landing (7.42 KB, patch)
2011-02-28 15:46 PST, Tony Gentilcore
no flags
Tony Gentilcore
Comment 1 2011-02-28 15:22:41 PST
Darin Adler
Comment 2 2011-02-28 15:28:05 PST
Comment on attachment 84134 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=84134&action=review Looks OK as long as the waitForEvent function is only ever used on events that are unique enough. > LayoutTests/media/video-test.js:3 > -var mediaElement = null; > +var mediaElement = document; This is pretty strange; expedient but pretty unclear! Probably needs a comment.
Tony Gentilcore
Comment 3 2011-02-28 15:36:08 PST
(In reply to comment #2) > (From update of attachment 84134 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=84134&action=review > > Looks OK as long as the waitForEvent function is only ever used on events that are unique enough. They are all unique to media elements except for 'error.' I don't think this is a big problem as other errors on the page should be unexpected. But if you think it is a good idea, I could also check the target of the event and only dispatch the callback if it is a media element. > > > LayoutTests/media/video-test.js:3 > > -var mediaElement = null; > > +var mediaElement = document; > > This is pretty strange; expedient but pretty unclear! Probably needs a comment. It ends up being strange because of these special "video" and "mediaElement" global variables. Would be much more clear if they were arguments to the method, but that is more refactoring that I want to do here. Will add a comment.
Tony Gentilcore
Comment 4 2011-02-28 15:46:56 PST
Created attachment 84136 [details] Patch for landing
WebKit Commit Bot
Comment 5 2011-02-28 17:31:52 PST
Comment on attachment 84136 [details] Patch for landing Clearing flags on attachment: 84136 Committed r79949: <http://trac.webkit.org/changeset/79949>
WebKit Commit Bot
Comment 6 2011-02-28 17:31:57 PST
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 7 2011-02-28 18:03:32 PST
http://trac.webkit.org/changeset/79949 might have broken SnowLeopard Intel Release (Build)
Note You need to log in before you can comment on or make changes to this bug.