Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/resources/reflected-xss-and-xss-protection.js

Issue 420603003: Better distinguish between blocked and empty pages in XSS filter tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove stray file. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 if (window.testRunner) { 1 if (window.testRunner) {
2 testRunner.dumpAsText(); 2 testRunner.dumpAsText();
3 testRunner.dumpChildFramesAsText();
3 testRunner.setXSSAuditorEnabled(true); 4 testRunner.setXSSAuditorEnabled(true);
4 testRunner.waitUntilDone(); 5 testRunner.waitUntilDone();
5 } 6 }
6 7
7 function testMixedHeader(csp, xssProtection) { 8 function testMixedHeader(csp, xssProtection) {
8 var params = [ 9 var params = [
9 'q=<script>alert(String.fromCharCode(0x58,0x53,0x53))<' + '/script>' 10 'q=<script>alert(String.fromCharCode(0x58,0x53,0x53))<' + '/script>'
10 ]; 11 ];
11 if (csp != 'unset') 12 if (csp != 'unset')
12 params.push('csp='+csp); 13 params.push('csp='+csp);
(...skipping 18 matching lines...) Expand all
31 var frame = document.querySelector('iframe'); 32 var frame = document.querySelector('iframe');
32 try { 33 try {
33 alert('Loaded ' + frame.contentWindow.location.href + ' into the IFrame.') ; 34 alert('Loaded ' + frame.contentWindow.location.href + ' into the IFrame.') ;
34 } catch (e) { 35 } catch (e) {
35 alert('Loaded cross-origin frame.'); 36 alert('Loaded cross-origin frame.');
36 } 37 }
37 testRunner.notifyDone(); 38 testRunner.notifyDone();
38 } 39 }
39 40
40 window.onload = frameLoaded; 41 window.onload = frameLoaded;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698