Try to make some xssAuditor tests less flakey.
[webkit:qtwebkit.git] / LayoutTests / http / tests / security / xssAuditor / resources / echo-object-src.pl
1 #!/usr/bin/perl -wT
2 use strict;
3 use CGI;
4
5 my $cgi = new CGI;
6
7 print "Content-Type: text/html; charset=UTF-8\n\n";
8
9 print "<!DOCTYPE html>\n";
10 print "<html>\n";
11 if ($cgi->param('relay-target-ids-for-event')) {
12     print "<script>\n";
13     print "document.addEventListener('" . $cgi->param('relay-target-ids-for-event') . "', function(event) {\n";
14     print "    window.parent.postMessage(event.target.id, '*');\n";
15     print "}, true);\n";
16     print "</script>\n";
17 }
18 print "<body>\n";
19 print "<object id=\"object\" name=\"plugin\" type=\"application/x-webkit-test-netscape\">\n";
20 print "<param name=\"movie\" value=\"".$cgi->param('q')."\" />\n";
21 print "</object>\n";
22 print "</body>\n";
23 print "</html>\n";