Commit e479546e authored by scherkus@chromium.org's avatar scherkus@chromium.org
Browse files

2010-04-02 Andrew Scherkus <scherkus@chromium.org>

        Reviewed by Eric Carlson and Eric Seidel.

        Don't stop the playback event timer when media resource loading has suspended.
        https://bugs.webkit.org/show_bug.cgi?id=37003

        When a user agent decides to suspend media resource loading and enters the
        NETWORK_IDLE state we are supposed to only stop the progress event timer but
        keep the playback timer running.

        Test: http/tests/media/video-play-suspend.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::setNetworkState): Only stop the progress event timer.

2010-04-02  Andrew Scherkus  <scherkus@chromium.org>

        Reviewed by Eric Carlson and Eric Seidel.

        Don't stop the playback event timer when media resource loading has suspended.
        https://bugs.webkit.org/show_bug.cgi?id=37003

        When a user agent decides to suspend media resource loading and enters the
        NETWORK_IDLE state we are supposed to only stop the progress event timer but
        keep the playback timer running.

        Currently Chromium is the only platform that fires the suspend event
        hence most platforms skipping this test.

        * http/tests/media/video-play-suspend-expected.txt: Added.
        * http/tests/media/video-play-suspend.html: Added.
        * platform/gtk/Skipped: Doesn't fire a suspend event.
        * platform/mac/Skipped: Ditto.
        * platform/win/Skipped: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9a7b1ead
2010-04-02 Andrew Scherkus <scherkus@chromium.org>
Reviewed by Eric Carlson and Eric Seidel.
Don't stop the playback event timer when media resource loading has suspended.
https://bugs.webkit.org/show_bug.cgi?id=37003
When a user agent decides to suspend media resource loading and enters the
NETWORK_IDLE state we are supposed to only stop the progress event timer but
keep the playback timer running.
Currently Chromium is the only platform that fires the suspend event
hence most platforms skipping this test.
* http/tests/media/video-play-suspend-expected.txt: Added.
* http/tests/media/video-play-suspend.html: Added.
* platform/gtk/Skipped: Doesn't fire a suspend event.
* platform/mac/Skipped: Ditto.
* platform/win/Skipped: Ditto.
2010-04-02 David Levin <levin@chromium.org>
 
Reviewed by Darin Adler.
......
Test that timeupdate events are sent when media loading suspends itself.
RUN(video.play())
EVENT(loadstart)
EVENT(suspend)
EVENT(timeupdate)
END OF TEST
<html>
<head>
<script src=../../../media/media-file.js></script>
<script src=../../../media/video-test.js></script>
<script>
function start() {
findMediaElement();
var suspendCount = 0;
// Make sure we've at least reached NETWORK_LOADING before waiting for suspend.
waitForEvent('loadstart', function() {
// suspend event means the user agent has intentionally paused network usage,
// however we should still receive timeupdate events.
mediaElement.addEventListener('suspend', function () {
// timeupdate events are fired as playback progresses so only verify that at least one
// event is fired
++suspendCount;
if (suspendCount == 1) {
consoleWrite("EVENT(suspend)");
waitForEventAndEnd('timeupdate');
}
} );
} );
var mediaFile = findMediaFile("video", "resources/test");
video.src = "http://127.0.0.1:8000/media/" + mediaFile;
run("video.play()");
}
</script>
</head>
<body onload="start()">
<video></video>
<p>Test that timeupdate events are sent when media loading suspends itself.</p>
</body>
</html>
......@@ -5888,3 +5888,7 @@ http/tests/loading/state-object-security-exception.html
# No Widgets 1.0 support
fast/media/media-feature-wgt-view-mode.html
# MediaPlayerPrivateGStreamer doesn't return to NETWORK_IDLE and hence doesn't fire a suspend event
# https://bugs.webkit.org/show_bug.cgi?id=37034
http/tests/media/video-play-suspend.html
......@@ -60,6 +60,10 @@ svg/hixie/perf/002.xml
# <rdar://problem/6710625> Test media/video-error-abort.html doesn't work
http/tests/media/video-error-abort.html
# MediaPlayerPrivateQTKit doesn't return to NETWORK_IDLE and hence doesn't fire a suspend event
# https://bugs.webkit.org/show_bug.cgi?id=37036
http/tests/media/video-play-suspend.html
# This port doesn't support Geolocation.
fast/dom/Geolocation
......
......@@ -635,6 +635,10 @@ fast/events/keydown-function-keys.html
# This port doesn't support Geolocation.
fast/dom/Geolocation
# MediaPlayerPrivateQuickTimeWin doesn't return to NETWORK_IDLE and hence doesn't fire a suspend event
# https://bugs.webkit.org/show_bug.cgi?id=37035
http/tests/media/video-play-suspend.html
# These media tests regressed on the bots. Skipping to make the bots green again.
# https://bugs.webkit.org/show_bug.cgi?id=28281
http/tests/media/video-play-stall.html
......
2010-04-02 Andrew Scherkus <scherkus@chromium.org>
Reviewed by Eric Carlson and Eric Seidel.
Don't stop the playback event timer when media resource loading has suspended.
https://bugs.webkit.org/show_bug.cgi?id=37003
When a user agent decides to suspend media resource loading and enters the
NETWORK_IDLE state we are supposed to only stop the progress event timer but
keep the playback timer running.
Test: http/tests/media/video-play-suspend.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setNetworkState): Only stop the progress event timer.
2010-04-02 Darin Adler <darin@apple.com>
 
Fix mispelling that broke the build.
......@@ -801,7 +801,7 @@ void HTMLMediaElement::setNetworkState(MediaPlayer::NetworkState state)
if (state == MediaPlayer::Idle) {
if (m_networkState > NETWORK_IDLE) {
stopPeriodicTimers();
m_progressEventTimer.stop();
scheduleEvent(eventNames().suspendEvent);
}
m_networkState = NETWORK_IDLE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment