Title: [87873] trunk/Tools
Revision
87873
Author
[email protected]
Date
2011-06-01 19:09:39 -0700 (Wed, 01 Jun 2011)

Log Message

2011-06-01  Dirk Pranke  <[email protected]>

        Reviewed by Tony Chang.

        old-run-webkit-tests: add support for audio files
        https://bugs.webkit.org/show_bug.cgi?id=57992

        * Scripts/old-run-webkit-tests:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (87872 => 87873)


--- trunk/Tools/ChangeLog	2011-06-02 01:36:35 UTC (rev 87872)
+++ trunk/Tools/ChangeLog	2011-06-02 02:09:39 UTC (rev 87873)
@@ -1,3 +1,12 @@
+2011-06-01  Dirk Pranke  <[email protected]>
+
+        Reviewed by Tony Chang.
+
+        old-run-webkit-tests: add support for audio files
+        https://bugs.webkit.org/show_bug.cgi?id=57992
+
+        * Scripts/old-run-webkit-tests:
+
 2011-06-01  Jochen Eisinger  <[email protected]>
 
         Reviewed by Adam Barth.

Modified: trunk/Tools/Scripts/old-run-webkit-tests (87872 => 87873)


--- trunk/Tools/Scripts/old-run-webkit-tests	2011-06-02 01:36:35 UTC (rev 87872)
+++ trunk/Tools/Scripts/old-run-webkit-tests	2011-06-02 02:09:39 UTC (rev 87873)
@@ -65,6 +65,7 @@
 use Getopt::Long;
 use IPC::Open2;
 use IPC::Open3;
+use MIME::Base64;
 use Time::HiRes qw(time usleep);
 
 use List::Util 'shuffle';
@@ -2250,6 +2251,8 @@
         return "webarchive";
     } elsif ($mimeType eq "application/pdf") {
         return "pdf";
+    } elsif ($mimeType eq "audio/wav") {
+        return "wav";
     }
     return "txt";
 }
@@ -2271,9 +2274,11 @@
     my @error = ();
     my $status = "success";
     my $mimeType = "text/plain";
+    my $encoding = "";
     # We don't have a very good way to know when the "headers" stop
     # and the content starts, so we use this as a hack:
     my $haveSeenContentType = 0;
+    my $haveSeenContentTransferEncoding = 0;
     my $haveSeenEofIn = 0;
     my $haveSeenEofError = 0;
 
@@ -2305,7 +2310,13 @@
             if (!$haveSeenContentType && $lineIn =~ /^Content-Type: (\S+)$/) {
                 $mimeType = $1;
                 $haveSeenContentType = 1;
-            } elsif ($lineIn =~ /#EOF/) {
+            } elsif (!$haveSeenContentTransferEncoding && $lineIn =~ /^Content-Transfer-Encoding: (\S+)$/) {
+                $encoding = $1;
+                $haveSeenContentTransferEncoding = 1;
+            } elsif ($lineIn =~ /(.*)#EOF$/) {
+                if ($1 ne "") {
+                    push @output, $1;
+                }
                 $haveSeenEofIn = 1;
             } else {
                 push @output, $lineIn;
@@ -2330,8 +2341,12 @@
 
     setFileHandleNonBlocking($fhIn, 0);
     setFileHandleNonBlocking($fhError, 0);
+    my $joined_output = join("", @output);
+    if ($encoding eq "base64") {
+        $joined_output = decode_base64($joined_output);
+    }
     return {
-        output => join("", @output),
+        output => $joined_output,
         error => join("", @error),
         status => $status,
         mimeType => $mimeType,
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to