Title: [153953] trunk/LayoutTests
Revision
153953
Author
[email protected]
Date
2013-08-12 12:24:58 -0700 (Mon, 12 Aug 2013)

Log Message

Multiple CSP tests complain about undefined strings in echo-object-data.pl and echo-script-src.pl
https://bugs.webkit.org/show_bug.cgi?id=119692

Reviewed by Darin Adler.

* http/tests/security/contentSecurityPolicy/resources/echo-object-data.pl:
* http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl:
Check whether optional CGI parameters are provided.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (153952 => 153953)


--- trunk/LayoutTests/ChangeLog	2013-08-12 19:13:34 UTC (rev 153952)
+++ trunk/LayoutTests/ChangeLog	2013-08-12 19:24:58 UTC (rev 153953)
@@ -1,3 +1,14 @@
+2013-08-12  Alexey Proskuryakov  <[email protected]>
+
+        Multiple CSP tests complain about undefined strings in echo-object-data.pl and echo-script-src.pl
+        https://bugs.webkit.org/show_bug.cgi?id=119692
+
+        Reviewed by Darin Adler.
+
+        * http/tests/security/contentSecurityPolicy/resources/echo-object-data.pl:
+        * http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl:
+        Check whether optional CGI parameters are provided.
+
 2013-08-12  Dean Jackson  <[email protected]>
 
         Shadows don't support viewport units

Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/echo-object-data.pl (153952 => 153953)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/echo-object-data.pl	2013-08-12 19:13:34 UTC (rev 153952)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/echo-object-data.pl	2013-08-12 19:24:58 UTC (rev 153953)
@@ -5,19 +5,20 @@
 my $cgi = new CGI;
 
 print "Content-Type: text/html; charset=UTF-8\n";
-if ($cgi->param('experimental') eq 'true') {
-    print "X-WebKit-CSP: ".$cgi->param('csp')."\n\n";
+my $experimental = $cgi->param('experimental') || "";
+if ($experimental eq 'true') {
+    print "X-WebKit-CSP: " . $cgi->param('csp') . "\n\n";
 } else {
-    print "Content-Security-Policy: ".$cgi->param('csp')."\n\n";
+    print "Content-Security-Policy: " . $cgi->param('csp') . "\n\n";
 }
 
 print "<!DOCTYPE html>\n";
 print "<html>\n";
 print "<body>\n";
 print "<script src=""
-print "<object data=""
-print "        log=\"".$cgi->param('log')."\"\n" if $cgi->param('log');
-print "        type=\"".$cgi->param('type')."\"\n" if $cgi->param('type');
+print "<object data="" . $cgi->param('plugin') . "\"\n";
+print "        log=\"" . $cgi->param('log') . "\"\n" if $cgi->param('log');
+print "        type=\"" . $cgi->param('type') . "\"\n" if $cgi->param('type');
 print "></object>\n";
 print "</body>\n";
 print "</html>\n";

Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl (153952 => 153953)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl	2013-08-12 19:13:34 UTC (rev 153952)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/echo-script-src.pl	2013-08-12 19:24:58 UTC (rev 153953)
@@ -5,18 +5,19 @@
 my $cgi = new CGI;
 
 print "Content-Type: text/html; charset=UTF-8\n";
-if ($cgi->param('experimental') eq 'true') {
-    print "X-WebKit-CSP: ".$cgi->param('csp')."\n\n";
+my $experimental = $cgi->param('experimental') || "";
+if ($experimental eq 'true') {
+    print "X-WebKit-CSP: " . $cgi->param('csp') . "\n\n";
 } else {
-    print "Content-Security-Policy: ".$cgi->param('csp')."\n\n";
+    print "Content-Security-Policy: " . $cgi->param('csp') . "\n\n";
 }
 
 my ($text, $replacement) = ("FAIL", "PASS");
 ($text, $replacement) = ($replacement, $text) if $cgi->param('should_run') eq 'no';
 
-my $nonce = "";
-if ($cgi->param('nonce') ne '') {
-  $nonce = "nonce='".$cgi->param('nonce')."'";
+my $nonce = $cgi->param('nonce') || "";
+if ($nonce ne "") {
+    $nonce = "nonce='" . $nonce . "'";
 }
 
 
@@ -26,6 +27,6 @@
 print "<div id=\"result\" text=\"$replacement\">\n";
 print "$text\n";
 print "</div>\n";
-print "<script $nonce src=""
+print "<script $nonce src="" . $cgi->param('q') . "\"></script>\n";
 print "</body>\n";
 print "</html>\n";
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to