Title: [124920] trunk/LayoutTests
Revision
124920
Author
[email protected]
Date
2012-08-07 14:36:49 -0700 (Tue, 07 Aug 2012)

Log Message

Share http/tests/media/video-load-and-stall.cgi for other tests
https://bugs.webkit.org/show_bug.cgi?id=93389

Reviewed by Eric Carlson.

Moving http/tests/media/video-laod-and-stall.cgi to
http/tests/resources/load-and-stall.cgi.

Also changes tests that use this file to point to the new location.

* http/tests/media/remove-while-loading.html:
* http/tests/media/video-play-stall-before-meta-data.html:
* http/tests/media/video-play-stall-seek.html:
* http/tests/media/video-play-stall.html:
* http/tests/resources/load-and-stall.cgi: Renamed from LayoutTests/http/tests/media/video-load-and-stall.cgi.
* http/tests/security/contentSecurityPolicy/media-src-allowed.html:
* http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/media-src-blocked.html:
* platform/chromium/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (124919 => 124920)


--- trunk/LayoutTests/ChangeLog	2012-08-07 21:33:31 UTC (rev 124919)
+++ trunk/LayoutTests/ChangeLog	2012-08-07 21:36:49 UTC (rev 124920)
@@ -1,3 +1,25 @@
+2012-08-07  Alpha Lam  <[email protected]>
+
+        Share http/tests/media/video-load-and-stall.cgi for other tests
+        https://bugs.webkit.org/show_bug.cgi?id=93389
+
+        Reviewed by Eric Carlson.
+
+        Moving http/tests/media/video-laod-and-stall.cgi to
+        http/tests/resources/load-and-stall.cgi.
+
+        Also changes tests that use this file to point to the new location.
+
+        * http/tests/media/remove-while-loading.html:
+        * http/tests/media/video-play-stall-before-meta-data.html:
+        * http/tests/media/video-play-stall-seek.html:
+        * http/tests/media/video-play-stall.html:
+        * http/tests/resources/load-and-stall.cgi: Renamed from LayoutTests/http/tests/media/video-load-and-stall.cgi.
+        * http/tests/security/contentSecurityPolicy/media-src-allowed.html:
+        * http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:
+        * http/tests/security/contentSecurityPolicy/media-src-blocked.html:
+        * platform/chromium/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:
+
 2012-08-07  Dean Jackson  <[email protected]>
 
         REGRESSION (r124723-r124741): 5 inspector/debugger tests failing on Apple Lion Debug WK1 (Tests)

Modified: trunk/LayoutTests/http/tests/media/remove-while-loading.html (124919 => 124920)


--- trunk/LayoutTests/http/tests/media/remove-while-loading.html	2012-08-07 21:33:31 UTC (rev 124919)
+++ trunk/LayoutTests/http/tests/media/remove-while-loading.html	2012-08-07 21:36:49 UTC (rev 124920)
@@ -12,5 +12,5 @@
 var mediaFile = findMediaFile("video", "content/test");
 var mimeType = mimeTypeForFile(mediaFile);
 
-video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000";
+video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000";
 </script>

Deleted: trunk/LayoutTests/http/tests/media/video-load-and-stall.cgi (124919 => 124920)


--- trunk/LayoutTests/http/tests/media/video-load-and-stall.cgi	2012-08-07 21:33:31 UTC (rev 124919)
+++ trunk/LayoutTests/http/tests/media/video-load-and-stall.cgi	2012-08-07 21:36:49 UTC (rev 124920)
@@ -1,30 +0,0 @@
-#!/usr/bin/perl -w
-
-use CGI;
-use File::stat;
-
-$query = new CGI;
-$name = $query->param('name');
-$stallAt = $query->param('stallAt');
-$stallFor = $query->param('stallFor');
-$mimeType = $query->param('mimeType');
-
-my $filesize = stat($name)->size;
-print "Content-type: " . $mimeType . "\n"; 
-print "Content-Length: " . $filesize . "\n\n";
-
-open FILE, $name or die;
-binmode FILE;
-$total = 0;
-my ($buf, $data, $n);
-while (($n = read FILE, $data, 1024) != 0) {
-    $total += $n;
-    if ($total > $stallAt) {
-        if (defined $stallFor) {
-            sleep($stallFor)
-        }
-        last;
-    }
-    print $data;
-}
-close(FILE);

Modified: trunk/LayoutTests/http/tests/media/video-play-stall-before-meta-data.html (124919 => 124920)


--- trunk/LayoutTests/http/tests/media/video-play-stall-before-meta-data.html	2012-08-07 21:33:31 UTC (rev 124919)
+++ trunk/LayoutTests/http/tests/media/video-play-stall-before-meta-data.html	2012-08-07 21:36:49 UTC (rev 124920)
@@ -21,6 +21,6 @@
     var mimeType = mimeTypeForFile(mediaFile);
 
     // Load should stall very early in the loading process.
-    video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=1&stallFor=4";
+    video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=1&stallFor=4";
 
 </script>

Modified: trunk/LayoutTests/http/tests/media/video-play-stall-seek.html (124919 => 124920)


--- trunk/LayoutTests/http/tests/media/video-play-stall-seek.html	2012-08-07 21:33:31 UTC (rev 124919)
+++ trunk/LayoutTests/http/tests/media/video-play-stall-seek.html	2012-08-07 21:36:49 UTC (rev 124920)
@@ -31,6 +31,6 @@
     var mediaFile = findMediaFile("video", "content/test");
     var mimeType = mimeTypeForFile(mediaFile);
 
-    video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000";
+    video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000";
     run("video.play()");
 </script>

Modified: trunk/LayoutTests/http/tests/media/video-play-stall.html (124919 => 124920)


--- trunk/LayoutTests/http/tests/media/video-play-stall.html	2012-08-07 21:33:31 UTC (rev 124919)
+++ trunk/LayoutTests/http/tests/media/video-play-stall.html	2012-08-07 21:36:49 UTC (rev 124920)
@@ -36,6 +36,6 @@
     var mediaFile = findMediaFile("video", "content/test");
     var mimeType = mimeTypeForFile(mediaFile);
 
-    video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000&stallFor=6";
+    video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000&stallFor=6";
     run("video.play()");
 </script>

Copied: trunk/LayoutTests/http/tests/resources/load-and-stall.cgi (from rev 124919, trunk/LayoutTests/http/tests/media/video-load-and-stall.cgi) (0 => 124920)


--- trunk/LayoutTests/http/tests/resources/load-and-stall.cgi	                        (rev 0)
+++ trunk/LayoutTests/http/tests/resources/load-and-stall.cgi	2012-08-07 21:36:49 UTC (rev 124920)
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -w
+
+use CGI;
+use File::stat;
+
+$query = new CGI;
+$name = $query->param('name');
+$stallAt = $query->param('stallAt');
+$stallFor = $query->param('stallFor');
+$mimeType = $query->param('mimeType');
+
+my $filesize = stat($name)->size;
+print "Content-type: " . $mimeType . "\n"; 
+print "Content-Length: " . $filesize . "\n\n";
+
+open FILE, $name or die;
+binmode FILE;
+$total = 0;
+my ($buf, $data, $n);
+while (($n = read FILE, $data, 1024) != 0) {
+    $total += $n;
+    if ($total > $stallAt) {
+        if (defined $stallFor) {
+            sleep($stallFor)
+        }
+        last;
+    }
+    print $data;
+}
+close(FILE);

Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-allowed.html (124919 => 124920)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-allowed.html	2012-08-07 21:33:31 UTC (rev 124919)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-allowed.html	2012-08-07 21:36:49 UTC (rev 124920)
@@ -12,5 +12,5 @@
 var mediaFile = findMediaFile("video", "content/test");
 var mimeType = mimeTypeForFile(mediaFile);
 
-video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000";
+video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000";
 </script>

Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt (124919 => 124920)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt	2012-08-07 21:33:31 UTC (rev 124919)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt	2012-08-07 21:36:49 UTC (rev 124920)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: Refused to load the media 'http://127.0.0.1:8000/media/video-load-and-stall.cgi?name=../../../media/content/test.mp4&mimeType=video/mp4&stallAt=100000' because it violates the following Content Security Policy directive: "media-src 'none'".
+CONSOLE MESSAGE: Refused to load the media 'http://127.0.0.1:8000/resources/load-and-stall.cgi?name=../../../media/content/test.mp4&mimeType=video/mp4&stallAt=100000' because it violates the following Content Security Policy directive: "media-src 'none'".
 
 END OF TEST
 This test passes if it doesn't alert failure.

Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked.html (124919 => 124920)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked.html	2012-08-07 21:33:31 UTC (rev 124919)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/media-src-blocked.html	2012-08-07 21:36:49 UTC (rev 124920)
@@ -14,5 +14,5 @@
 var mediaFile = findMediaFile("video", "content/test");
 var mimeType = mimeTypeForFile(mediaFile);
 
-video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000";
+video.src = "" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000";
 </script>

Modified: trunk/LayoutTests/platform/chromium/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt (124919 => 124920)


--- trunk/LayoutTests/platform/chromium/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt	2012-08-07 21:33:31 UTC (rev 124919)
+++ trunk/LayoutTests/platform/chromium/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt	2012-08-07 21:36:49 UTC (rev 124920)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: Refused to load the media 'http://127.0.0.1:8000/media/video-load-and-stall.cgi?name=../../../media/content/test.ogv&mimeType=video/ogg&stallAt=100000' because it violates the following Content Security Policy directive: "media-src 'none'".
+CONSOLE MESSAGE: Refused to load the media 'http://127.0.0.1:8000/resources/load-and-stall.cgi?name=../../../media/content/test.ogv&mimeType=video/ogg&stallAt=100000' because it violates the following Content Security Policy directive: "media-src 'none'".
 
 END OF TEST
 This test passes if it doesn't alert failure.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to