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.


git-svn-id: svn://svn.chromium.org/blink/trunk@42543 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 380569ae
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> 2009-04-14 Oliver Hunt <oliver@apple.com>
Reviewed by Cameron Zwarich. Reviewed by Cameron Zwarich.
......
...@@ -4,7 +4,7 @@ Test that a remote video element will not use a local <source>, and will use ano ...@@ -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 This test only works in DRT
EVENT(loadedmetadata) 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 SUCCESS: remote movie loaded, local movie failed to load
......
...@@ -61,7 +61,8 @@ ...@@ -61,7 +61,8 @@
} }
var localMovie = "file:///tmp/LayoutTests/media/content/scaled-matrix.mov"; 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) function loadedmetadata(evt)
{ {
var src = video.currentSrc; var src = video.currentSrc;
...@@ -114,7 +115,7 @@ ...@@ -114,7 +115,7 @@
<p>Test that a remote video element will not use a local &lt;source&gt;, and will <p>Test that a remote video element will not use a local &lt;source&gt;, and will
use another remote &lt;source&gt;</p> 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> </body>
</html> </html>
#!/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);
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