Audio element doesn't emit the 'playing' event every time it starts playing, after it has finished playing.
https://bugs.webkit.org/show_bug.cgi?id=60972

Patch by Arun Patole <bmf834@motorola.com> on 2011-09-27
Reviewed by Philippe Normand.

Source/WebCore:

The paused attribute should be set to true and the media element should emit a 'paused' at the end of playback.
WHATWG revision r6562: http://html5.org/tools/web-apps-tracker?from=6561&to=6562

Test: media/media-element-play-after-eos.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged): set m_paused to true and schedule 'pause' event when playback ended.

LayoutTests:

Update media tests as the 'pause' event should be fired
and 'paused' should be set to true at the end of playback.

* media/event-attributes-expected.txt:
* media/event-attributes.html:
* media/media-element-play-after-eos-expected.txt: Added.
* media/media-element-play-after-eos.html: Added.
* media/video-loop-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8 files changed