Changeset 66254 in webkit
- Timestamp:
- Aug 27, 2010 2:11:22 PM (14 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r66251 r66254 1 2010-08-27 Andy Estes <aestes@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 Try to make some xssAuditor tests less flakey. 6 https://bugs.webkit.org/show_bug.cgi?id=44749 7 8 Use postMessage() to communicate to the top window each time a 9 beforeload event fires in the iframe. When the top window has seen a 10 beforeload event from each widget in the iframe, it calls notifyDone(). 11 This prevents the test from exiting before all the widgets have had a 12 chance to load, therefore ensuring that all relevant XSS Auditor 13 messages have been emitted. 14 15 * http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt: 16 * http/tests/security/xssAuditor/object-embed-tag-control-char.html: 17 * http/tests/security/xssAuditor/object-embed-tag-expected.txt: 18 * http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt: 19 * http/tests/security/xssAuditor/object-embed-tag-null-char.html: 20 * http/tests/security/xssAuditor/object-embed-tag.html: 21 * http/tests/security/xssAuditor/object-src-inject.html: 22 * http/tests/security/xssAuditor/object-tag-javascript-url.html: 23 * http/tests/security/xssAuditor/object-tag.html: 24 * http/tests/security/xssAuditor/resources/echo-intertag.pl: 25 * http/tests/security/xssAuditor/resources/echo-object-src.pl: 26 * http/tests/security/xssAuditor/resources/utilities.js: 27 (notifyDoneAfterReceivingBeforeloadFromIds): 28 * platform/mac/Skipped: 29 1 30 2010-08-09 Jer Noble <jer.noble@apple.com> 2 31 -
trunk/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt
r51445 r66254 1 CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf". 2 1 3 CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf". 2 4 -
trunk/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char.html
r45639 r66254 2 2 <html> 3 3 <head> 4 <script src='resources/utilities.js'></script> 4 5 <script> 5 6 if (window.layoutTestController) { 6 7 layoutTestController.dumpAsText(); 7 8 layoutTestController.setXSSAuditorEnabled(true); 9 layoutTestController.waitUntilDone(); 10 notifyDoneAfterReceivingBeforeloadFromIds(["object", "embed"]); 8 11 } 9 12 </script> 10 13 </head> 11 14 <body> 12 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl? q=<object name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /><embedname='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /></object>">15 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /></object>"> 13 16 </iframe> 14 17 </body> -
trunk/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-expected.txt
r51445 r66254 1 CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf". 2 1 3 CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf". 2 4 -
trunk/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt
r61234 r66254 1 CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/sec�urity/xssAuditor/resources/dummy.swf". 2 1 3 CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/sec�urity/xssAuditor/resources/dummy.swf". 2 4 -
trunk/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char.html
r45639 r66254 2 2 <html> 3 3 <head> 4 <script src="resources/utilities.js"></script> 4 5 <script> 5 6 if (window.layoutTestController) { 6 7 layoutTestController.dumpAsText(); 7 8 layoutTestController.setXSSAuditorEnabled(true); 9 layoutTestController.waitUntilDone(); 10 notifyDoneAfterReceivingBeforeloadFromIds(["object", "embed"]); 8 11 } 9 12 </script> 10 13 </head> 11 14 <body> 12 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl? q=<object name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /><embedname='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /></object>">15 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /></object>"> 13 16 </iframe> 14 17 </body> -
trunk/LayoutTests/http/tests/security/xssAuditor/object-embed-tag.html
r45639 r66254 2 2 <html> 3 3 <head> 4 <script src="resources/utilities.js"></script> 4 5 <script> 5 6 if (window.layoutTestController) { 6 7 layoutTestController.dumpAsText(); 7 8 layoutTestController.setXSSAuditorEnabled(true); 9 layoutTestController.waitUntilDone(); 10 notifyDoneAfterReceivingBeforeloadFromIds(["object", "embed"]); 8 11 } 9 12 </script> 10 13 </head> 11 14 <body> 12 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl? q=<object name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /><embedname='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>">15 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>"> 13 16 </iframe> 14 17 </body> -
trunk/LayoutTests/http/tests/security/xssAuditor/object-src-inject.html
r50631 r66254 2 2 <html> 3 3 <head> 4 <script src="resources/utilities.js"></script> 4 5 <script> 5 6 if (window.layoutTestController) { 6 7 layoutTestController.dumpAsText(); 7 8 layoutTestController.setXSSAuditorEnabled(true); 9 layoutTestController.waitUntilDone(); 10 notifyDoneAfterReceivingBeforeloadFromIds(["object"]); 8 11 } 9 12 </script> 10 13 </head> 11 14 <body> 12 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-object-src.pl? q=http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf">15 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-object-src.pl?relay-target-ids-for-event=beforeload&q=http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf"> 13 16 </iframe> 14 17 </body> -
trunk/LayoutTests/http/tests/security/xssAuditor/object-tag-javascript-url.html
r48911 r66254 2 2 <html> 3 3 <head> 4 <script src="resources/utilities.js"></script> 4 5 <script> 5 6 if (window.layoutTestController) { 6 7 layoutTestController.dumpAsText(); 7 8 layoutTestController.setXSSAuditorEnabled(true); 9 layoutTestController.waitUntilDone(); 10 notifyDoneAfterReceivingBeforeloadFromIds(["object"]); 8 11 } 9 12 </script> 10 13 </head> 11 14 <body> 12 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl? q=<objectdata='javascript:alert(document.domain)'></object>">15 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?relay-target-ids-for-event=beforeload&q=<object id='object' data='javascript:alert(document.domain)'></object>"> 13 16 </iframe> 14 17 </body> -
trunk/LayoutTests/http/tests/security/xssAuditor/object-tag.html
r45639 r66254 2 2 <html> 3 3 <head> 4 <script src="resources/utilities.js"></script> 4 5 <script> 5 6 if (window.layoutTestController) { 6 7 layoutTestController.dumpAsText(); 7 8 layoutTestController.setXSSAuditorEnabled(true); 9 layoutTestController.waitUntilDone(); 10 notifyDoneAfterReceivingBeforeloadFromIds(["object"]); 8 11 } 9 12 </script> 10 13 </head> 11 14 <body> 12 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl? q=<objectname='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>">15 <iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>"> 13 16 </iframe> 14 17 </body> -
trunk/LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl
r56295 r66254 21 21 print "<!DOCTYPE html>\n"; 22 22 print "<html>\n"; 23 if ($cgi->param('relay-target-ids-for-event')) { 24 print "<script>\n"; 25 print "document.addEventListener('" . $cgi->param('relay-target-ids-for-event') . "', function(event) {\n"; 26 print " window.parent.postMessage(event.target.id, '*');\n"; 27 print "}, true);\n"; 28 print "</script>\n"; 29 } 23 30 print "<body>\n"; 24 31 print $cgi->param('q'); -
trunk/LayoutTests/http/tests/security/xssAuditor/resources/echo-object-src.pl
r50631 r66254 9 9 print "<!DOCTYPE html>\n"; 10 10 print "<html>\n"; 11 print "<object name=\"plugin\" type=\"application/x-webkit-test-netscape\">\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"; 12 20 print "<param name=\"movie\" value=\"".$cgi->param('q')."\" />\n"; 13 21 print "</object>\n"; -
trunk/LayoutTests/http/tests/security/xssAuditor/resources/utilities.js
r54202 r66254 36 36 frameContent.getElementById('form').submit(); 37 37 } 38 39 40 function notifyDoneAfterReceivingBeforeloadFromIds(ids) 41 { 42 var loadAttempted = 0; 43 window.addEventListener("message", function(event) { 44 var index = ids.indexOf(event.data); 45 if (index == -1) 46 return; 47 48 loadAttempted = loadAttempted | (1 << index); 49 if (loadAttempted == (1 << ids.length) - 1) 50 layoutTestController.notifyDone(); 51 }, false); 52 } 53 -
trunk/LayoutTests/platform/mac/Skipped
r66210 r66254 302 302 fast/events/tabindex-focus-blur-all.html 303 303 304 # https://bugs.webkit.org/show_bug.cgi?id=44749305 # Skipping flakey xssAuditor tests, until the bug is resolved.306 http/tests/security/xssAuditor/object-embed-tag-null-char.html307 http/tests/security/xssAuditor/object-src-inject.html
Note: See TracChangeset
for help on using the changeset viewer.