RESOLVED WORKSFORME33735
error event doesn't fire for <video><source src=doesnotexist.mp4></video>
https://bugs.webkit.org/show_bug.cgi?id=33735
Summary error event doesn't fire for <video><source src=doesnotexist.mp4></video>
Adam Roben (:aroben)
Reported 2010-01-15 13:48:39 PST
To reproduce: 1. Download the attached test to LayoutTests/media 2. run-webkit-tests media/media-no-source.html The test times out because the error event is never fired. HTML5 says we should fire an error event. See <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#concept-media-load-algorithm> step 6.10: > Failed: Queue a task to fire a simple event named error at the > candidate element, in the context of the fetching process that > was used to try to obtain candidate's corresponding media > resource in the resource fetch algorithm. Note that the error event *does* fire for <video src=doesnotexist.mp4></video>
Attachments
test case (405 bytes, text/html)
2010-01-18 06:23 PST, Adam Roben (:aroben)
no flags
Adam Roben (:aroben)
Comment 1 2010-01-15 14:30:32 PST
Adam Roben (:aroben)
Comment 2 2010-01-15 14:35:45 PST
I think we need to fire the event here <http://trac.webkit.org/browser/trunk/WebCore/html/HTMLMediaElement.cpp?rev=53146#L692>: // If we failed while trying to load a <source> element, the movie was never parsed, and there are more // <source> children, schedule the next one if (m_readyState < HAVE_METADATA && m_loadState == LoadingFromSourceElement) { m_currentSourceNode->scheduleErrorEvent(); if (havePotentialSourceChild()) scheduleNextSourceChild(); return; }
Adam Roben (:aroben)
Comment 3 2010-01-15 14:36:48 PST
This seems related to bug 33744.
Eric Carlson
Comment 4 2010-01-16 14:09:07 PST
Looks like you forgot to attach the test case.
Adam Roben (:aroben)
Comment 5 2010-01-18 06:23:10 PST
Created attachment 46816 [details] test case
Eric Carlson
Comment 6 2010-01-19 10:25:36 PST
This test is incorrect as the event listener is on the <video> element but 'error' events don't bubble. Attach the listener to the document or source element and it will be triggered.
Note You need to log in before you can comment on or make changes to this bug.