Title: [89615] trunk/LayoutTests
Revision
89615
Author
eric.carl...@apple.com
Date
2011-06-23 14:36:59 -0700 (Thu, 23 Jun 2011)

Log Message

2011-06-23  Eric Carlson  <eric.carl...@apple.com>

        Reviewed by Simon Fraser.

        Add a test with a single <source> element
        https://bugs.webkit.org/show_bug.cgi?id=63285

        * media/video-single-valid-source-expected.txt: Added.
        * media/video-single-valid-source.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89614 => 89615)


--- trunk/LayoutTests/ChangeLog	2011-06-23 21:35:50 UTC (rev 89614)
+++ trunk/LayoutTests/ChangeLog	2011-06-23 21:36:59 UTC (rev 89615)
@@ -1,3 +1,13 @@
+2011-06-23  Eric Carlson  <eric.carl...@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Add a test with a single <source> element
+        https://bugs.webkit.org/show_bug.cgi?id=63285
+
+        * media/video-single-valid-source-expected.txt: Added.
+        * media/video-single-valid-source.html: Added.
+
 2011-06-23  Gavin Barraclough  <barraclo...@apple.com>
 
         Reviewed by Oliver Hunt.

Added: trunk/LayoutTests/media/video-single-valid-source-expected.txt (0 => 89615)


--- trunk/LayoutTests/media/video-single-valid-source-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/media/video-single-valid-source-expected.txt	2011-06-23 21:36:59 UTC (rev 89615)
@@ -0,0 +1,6 @@
+Test that a single valid <source> element loads correctly
+
+
+EVENT(loadedmetadata)
+END OF TEST
+

Added: trunk/LayoutTests/media/video-single-valid-source.html (0 => 89615)


--- trunk/LayoutTests/media/video-single-valid-source.html	                        (rev 0)
+++ trunk/LayoutTests/media/video-single-valid-source.html	2011-06-23 21:36:59 UTC (rev 89615)
@@ -0,0 +1,47 @@
+<!doctype html>
+<html>
+    <head>
+        <script src=""
+        <script src=""
+        
+        <script>
+    
+            function errorEvent()
+            {
+                logResult(false, "*** \"" + relativeURL(video.currentSrc) + "\" should not have been processed!" );
+                consoleWrite("");
+                endTest();
+            }
+    
+            function setup()
+            {
+                video = document.createElement("video");
+                video.setAttribute("controls", "controls");
+
+                // The first source should load.
+                var source = document.createElement("source");
+                source.setAttribute("src", findMediaFile("video", "content/test"));
+                source.setAttribute("type", mimeTypeForFile(source.getAttribute("src")));
+                video.appendChild(source);
+
+                // The second source is bogus and won't load, but it should never be processed.
+                source = document.createElement("source");
+                source.setAttribute("src", findMediaFile("video", "content/does-not-exist"));
+                source.setAttribute("type", mimeTypeForFile(source.getAttribute("src")));
+                video.appendChild(source);
+
+                document.body.appendChild(video);
+
+                waitForEvent('error', errorEvent);
+                waitForEvent('loadedmetadata', endTest);
+                consoleWrite("");
+            }
+
+        </script>
+    </head>
+<body _onload_="setup()">
+
+    <p>Test that a single valid &lt;source&gt; element loads correctly</p>
+
+</body>
+</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to