2009-04-15 Eric Carlson <eric.carlson@apple.com>
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Apr 2009 17:26:11 +0000 (17:26 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Apr 2009 17:26:11 +0000 (17:26 +0000)
        Reviewed by Alexey Proskuryakov.

        Use a media file inside of LayoutTests/http/ so a cgi isn't necessary to load
        it. Fixes a test failure introduced in r42533.

        * http/tests/resources/silence.mpg: Added.
        * http/tests/security/local-video-source-from-remote-expected.txt:
        * http/tests/security/local-video-source-from-remote.html: change the
        remote url, update a comment.
        * http/tests/security/resources/load-media.cgi: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@42543 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/resources/silence.mpg [new file with mode: 0644]
LayoutTests/http/tests/security/local-video-source-from-remote-expected.txt
LayoutTests/http/tests/security/local-video-source-from-remote.html
LayoutTests/http/tests/security/resources/load-media.cgi [deleted file]

index a40afaa..c727ee5 100644 (file)
@@ -1,3 +1,16 @@
+2009-04-15  Eric Carlson  <eric.carlson@apple.com>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Use a media file inside of LayoutTests/http/ so a cgi isn't necessary to load 
+        it. Fixes a test failure introduced in r42533.
+
+        * http/tests/resources/silence.mpg: Added.
+        * http/tests/security/local-video-source-from-remote-expected.txt:
+        * http/tests/security/local-video-source-from-remote.html: change the
+        remote url, update a comment.
+        * http/tests/security/resources/load-media.cgi: Removed.
+
 2009-04-14  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Cameron Zwarich.
diff --git a/LayoutTests/http/tests/resources/silence.mpg b/LayoutTests/http/tests/resources/silence.mpg
new file mode 100644 (file)
index 0000000..b6bbf20
Binary files /dev/null and b/LayoutTests/http/tests/resources/silence.mpg differ
index e4b126c..5011403 100644 (file)
@@ -4,7 +4,7 @@ Test that a remote video element will not use a local <source>, and will use ano
 This test only works in DRT
 
 EVENT(loadedmetadata)
-url http://localhost:8000/security/resources/load-media.cgi?url=/../../media/content/test.mp4 loaded.
+url http://localhost:8000/resources/silence.mpg loaded.
 
 SUCCESS: remote movie loaded, local movie failed to load
 
index 6537b69..91c411e 100644 (file)
@@ -61,7 +61,8 @@
             }
 
             var localMovie = "file:///tmp/LayoutTests/media/content/scaled-matrix.mov";
-            var remoteUrl = "http://localhost:8000/security/resources/load-media.cgi?url=/../../media/content/test.mp4";
+            var remoteUrl = "http://localhost:8000/resources/silence.mpg";
+
             function loadedmetadata(evt) 
             { 
                 var src = video.currentSrc;
         <p>Test that a remote video element will not use a local &lt;source&gt;, and will
         use another remote &lt;source&gt;</p>
 
-        <p>This test only works in DRT</p>
+        <p>This test only behaves correctly in DRT</p>
 
     </body>
 </html>
diff --git a/LayoutTests/http/tests/security/resources/load-media.cgi b/LayoutTests/http/tests/security/resources/load-media.cgi
deleted file mode 100644 (file)
index 6edb573..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/perl -w
-
-use CGI;
-use File::stat;
-
-$query = new CGI;
-
-my $serverPath = $ENV {'DOCUMENT_ROOT'};
-$serverPath =~ s/\/$//;
-
-my $type = $query->param('type');
-if (!$type) {
-    $type = "video/mp4";
-}
-
-## get the url to load (relative to server root, not cgi)
-my $url = $query->param('url');
-$url = $serverPath . $url;
-
-my $filesize = stat($url)->size;
-open FILE, $url or die;
-binmode FILE;
-
-print "Content-type: " . $type . "\n";
-print "Content-Length: " . $filesize . "\n\n";
-
-my ($buf, $data, $n);
-while (($n = read FILE, $data, 1024) != 0) {
-    print $data;
-}
-close(FILE);