Diff
Modified: trunk/LayoutTests/ChangeLog (133659 => 133660)
--- trunk/LayoutTests/ChangeLog 2012-11-06 20:44:40 UTC (rev 133659)
+++ trunk/LayoutTests/ChangeLog 2012-11-06 21:08:35 UTC (rev 133660)
@@ -1,3 +1,19 @@
+2012-11-06 John Griggs <jgri...@rim.com>
+
+ Implement MediaPlayerPrivate::didLoadingProgress for BlackBerry platform
+ https://bugs.webkit.org/show_bug.cgi?id=100378
+
+ Reviewed by Eric Carlson.
+
+ Implement this method for BlackBerry platform.
+
+ New test: LayoutTests/media/progress-events-generated-correctly.html
+
+ * media/progress-events-generated-correctly-expected.txt: Added.
+ * media/progress-events-generated-correctly.html: Added.
+ * platform/chromium/TestExpectations:
+ * platform/mac/TestExpectations:
+
2012-11-06 Joshua Bell <jsb...@chromium.org>
[Chromium] Unreviewed gardening.
Added: trunk/LayoutTests/media/progress-events-generated-correctly-expected.txt (0 => 133660)
--- trunk/LayoutTests/media/progress-events-generated-correctly-expected.txt (rev 0)
+++ trunk/LayoutTests/media/progress-events-generated-correctly-expected.txt 2012-11-06 21:08:35 UTC (rev 133660)
@@ -0,0 +1,8 @@
+Test that progress events are generated during loading of media resource.
+
+EVENT(canplaythrough)
+EVENT(playing)
+EVENT(ended)
+EXPECTED (progressCount > '1') OK
+END OF TEST
+
Added: trunk/LayoutTests/media/progress-events-generated-correctly.html (0 => 133660)
--- trunk/LayoutTests/media/progress-events-generated-correctly.html (rev 0)
+++ trunk/LayoutTests/media/progress-events-generated-correctly.html 2012-11-06 21:08:35 UTC (rev 133660)
@@ -0,0 +1,50 @@
+<html>
+ <meta name="viewport" content="width=device-width">
+ <title>Progress Events Generated Correctly During Loading</title>
+ <body>
+ <p>Test that progress events are generated during loading of media resource.</p>
+
+ <script src=""
+ <script src=""
+ <script>
+ function errorListener(event)
+ {
+ logResult(false, "Caught 'error' event, media.error.code = " + this.error.code);
+ endTest();
+ }
+
+ function canplaythroughListener(event)
+ {
+ consoleWrite("EVENT(canplaythrough)");
+ this.play();
+ }
+
+ function playingListener(event)
+ {
+ consoleWrite("EVENT(playing)");
+ }
+
+ function progressListener(event)
+ {
+ ++progressCount;
+ }
+
+ function endedListener(event)
+ {
+ consoleWrite("EVENT(ended)");
+ testExpected("progressCount", 1, ">");
+ endTest();
+ }
+
+ document.write("<video controls></video>");
+ var videoElement = document.getElementsByTagName('video')[0];
+ var progressCount = 0;
+ videoElement.addEventListener('error', errorListener);
+ videoElement.addEventListener('canplaythrough', canplaythroughListener);
+ videoElement.addEventListener('playing', playingListener);
+ videoElement.addEventListener('ended', endedListener);
+ videoElement.src = "" "./content/counting");
+ videoElement.addEventListener('progress', progressListener);
+ </script>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (133659 => 133660)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-11-06 20:44:40 UTC (rev 133659)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-11-06 21:08:35 UTC (rev 133660)
@@ -192,6 +192,9 @@
# CSS image-resolution is not yet enabled.
webkit.org/b/85262 fast/css/image-resolution
+# Requires generation of progress events during loading
+webkit.org/b/100985 media/progress-events-generated-correctly.html
+
# Resolution media query is not yet enabled.
webkit.org/b/85262 fast/media/mq-resolution.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac/TestExpectations (133659 => 133660)
--- trunk/LayoutTests/platform/mac/TestExpectations 2012-11-06 20:44:40 UTC (rev 133659)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2012-11-06 21:08:35 UTC (rev 133660)
@@ -28,6 +28,10 @@
# This test requires media controls has a volume slider.
media/video-volume-slider.html
+# This test requires generation of progress events during loading
+# https://bugs.webkit.org/show_bug.cgi?id=100984
+media/progress-events-generated-correctly.html
+
# This port doesn't support detecting slow unload handlers.
fast/dom/Window/slow-unload-handler.html
fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
Modified: trunk/Source/WebCore/ChangeLog (133659 => 133660)
--- trunk/Source/WebCore/ChangeLog 2012-11-06 20:44:40 UTC (rev 133659)
+++ trunk/Source/WebCore/ChangeLog 2012-11-06 21:08:35 UTC (rev 133660)
@@ -1,3 +1,20 @@
+2012-11-06 John Griggs <jgri...@rim.com>
+
+ Implement MediaPlayerPrivate::didLoadingProgress for BlackBerry platform
+ https://bugs.webkit.org/show_bug.cgi?id=100378
+
+ Reviewed by Eric Carlson.
+
+ Implement this method for BlackBerry platform.
+
+ New test: LayoutTests/media/progress-events-generated-correctly.html
+
+ * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
+ (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+ (WebCore::MediaPlayerPrivate::didLoadingProgress):
+ * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
+ (MediaPlayerPrivate):
+
2012-11-06 Adam Barth <aba...@webkit.org>
DOMImplementation should use ScriptWrappable
Modified: trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp (133659 => 133660)
--- trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp 2012-11-06 20:44:40 UTC (rev 133659)
+++ trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp 2012-11-06 21:08:35 UTC (rev 133660)
@@ -114,6 +114,7 @@
#endif
, m_userDrivenSeekTimer(this, &MediaPlayerPrivate::userDrivenSeekTimerFired)
, m_lastSeekTime(0)
+ , m_lastLoadingTime(0)
, m_lastSeekTimePending(false)
, m_isAuthenticationChallenging(false)
, m_waitMetadataTimer(this, &MediaPlayerPrivate::waitMetadataTimerFired)
@@ -340,8 +341,15 @@
bool MediaPlayerPrivate::didLoadingProgress() const
{
- notImplemented();
- return false;
+ if (!m_platformPlayer)
+ return false;
+
+ float bufferLoaded = m_platformPlayer->bufferLoaded();
+ if (bufferLoaded == m_lastLoadingTime)
+ return false;
+
+ m_lastLoadingTime = bufferLoaded;
+ return true;
}
void MediaPlayerPrivate::setSize(const IntSize&)
Modified: trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h (133659 => 133660)
--- trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h 2012-11-06 20:44:40 UTC (rev 133659)
+++ trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h 2012-11-06 21:08:35 UTC (rev 133660)
@@ -174,6 +174,7 @@
void userDrivenSeekTimerFired(Timer<MediaPlayerPrivate>*);
Timer<MediaPlayerPrivate> m_userDrivenSeekTimer;
float m_lastSeekTime;
+ mutable float m_lastLoadingTime;
bool m_lastSeekTimePending;
bool m_isAuthenticationChallenging;
void waitMetadataTimerFired(Timer<MediaPlayerPrivate>*);