[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

hclam at chromium.org hclam at chromium.org
Thu Apr 8 00:31:40 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 933b0a466fccda1cfa5003e559070c3bc8e5969e
Author: hclam at chromium.org <hclam at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 10 23:28:58 2009 +0000

    Layout test for video element on HTTP
    https://bugs.webkit.org/show_bug.cgi?id=32333
    
    Reviewed by Eric Carlson.
    
    Added a new layout test that tests video element on HTTP protocol.
    This test load the same video file twice. The first load will cache
    the video file if caching is supported. The second load ensure
    the cache works correctly.
    
    * http/tests/media/resources/test.mp4: Copied from LayoutTests/media/content/test.mp4.
    * http/tests/media/resources/test.ogv: Copied from LayoutTests/media/content/test.ogv.
    The above two files are copied from LayoutTests/media/content because the HTTP
    server is rooted at LayoutTests/http/tests. And we don't want to serve these
    files with cgi because that will ruin the HTTP headers.
    * http/tests/media/video-load-twice-expected.txt: Added.
    * http/tests/media/video-load-twice.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d883cfa..a62e4d3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2009-12-10  Alpha Lam  <hclam at chromium.org>
+
+        Reviewed by Eric Carlson.
+
+        Layout test for video element on HTTP
+        https://bugs.webkit.org/show_bug.cgi?id=32333
+
+        Added a new layout test that tests video element on HTTP protocol.
+        This test load the same video file twice. The first load will cache
+        the video file if caching is supported. The second load ensure
+        the cache works correctly.
+
+        * http/tests/media/resources/test.mp4: Copied from LayoutTests/media/content/test.mp4.
+        * http/tests/media/resources/test.ogv: Copied from LayoutTests/media/content/test.ogv.
+        The above two files are copied from LayoutTests/media/content because the HTTP
+        server is rooted at LayoutTests/http/tests. And we don't want to serve these
+        files with cgi because that will ruin the HTTP headers.
+        * http/tests/media/video-load-twice-expected.txt: Added.
+        * http/tests/media/video-load-twice.html: Added.
+
 2009-12-10  Enrica Casucci  <enrica at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/media/content/test.mp4 b/LayoutTests/http/tests/media/resources/test.mp4
similarity index 100%
copy from LayoutTests/media/content/test.mp4
copy to LayoutTests/http/tests/media/resources/test.mp4
diff --git a/LayoutTests/media/content/test.ogv b/LayoutTests/http/tests/media/resources/test.ogv
similarity index 100%
copy from LayoutTests/media/content/test.ogv
copy to LayoutTests/http/tests/media/resources/test.ogv
diff --git a/LayoutTests/http/tests/media/video-load-twice-expected.txt b/LayoutTests/http/tests/media/video-load-twice-expected.txt
new file mode 100644
index 0000000..9d08efb
--- /dev/null
+++ b/LayoutTests/http/tests/media/video-load-twice-expected.txt
@@ -0,0 +1,12 @@
+RUN(video.src = file)
+EVENT(loadedmetadata)
+EVENT(loadeddata)
+EVENT(canplay)
+EVENT(canplaythrough)
+RUN(video.src = file)
+EVENT(loadedmetadata)
+EVENT(loadeddata)
+EVENT(canplay)
+EVENT(canplaythrough)
+END OF TEST
+
diff --git a/LayoutTests/http/tests/media/video-load-twice.html b/LayoutTests/http/tests/media/video-load-twice.html
new file mode 100644
index 0000000..8a0542f
--- /dev/null
+++ b/LayoutTests/http/tests/media/video-load-twice.html
@@ -0,0 +1,33 @@
+<html>
+<head>
+<script src=../../../media/media-file.js></script>
+<script src=../../../media/video-test.js></script>
+<script>
+    var file = findMediaFile("video", "http://127.0.0.1:8000/media/resources/test");
+
+    function createVideo() {
+        var video = document.createElement("video");
+        document.body.appendChild(video);
+        findMediaElement();
+        waitForEvent('loadedmetadata');
+        waitForEvent('loadeddata');
+        waitForEvent('canplay');
+    }
+
+    function firstCanPlayThrough() {
+        document.body.removeChild(video);
+        createVideo();
+        waitForEvent('canplaythrough', endTest);
+        run("video.src = file");
+    }
+
+    function init() {
+        createVideo();
+        waitForEvent('canplaythrough', firstCanPlayThrough);
+        run("video.src = file");
+    }
+</script>
+</head>
+<body onload="init()">
+</body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list