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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/xssAuditor/resources/anchor-url-dom-write-location-click.php

Issue 2524013002: XSS Auditor: Block by default. (Closed)
Patch Set: Rebase+Test Created 4 years 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
OLDNEW
1 <?php header("X-XSS-Protection: 1"); ?>
1 <!DOCTYPE html> 2 <!DOCTYPE html>
2 <html> 3 <html>
3 <head> 4 <head>
4 </head> 5 </head>
5 <body> 6 <body>
6 <script> 7 <script>
7 window.onload = function() 8 window.onload = function()
8 { 9 {
9 window.setTimeout(clickAnchorLink, 100); 10 window.setTimeout(clickAnchorLink, 100);
10 } 11 }
11 function clickAnchorLink() 12 function clickAnchorLink()
12 { 13 {
13 var event = document.createEvent('MouseEvent'); 14 var event = document.createEvent('MouseEvent');
14 event.initEvent('click', true, true); 15 event.initEvent('click', true, true);
15 document.getElementById("anchorLink").dispatchEvent(event); 16 document.getElementById("anchorLink").dispatchEvent(event);
16 17
17 if (window.testRunner) 18 if (window.testRunner)
18 testRunner.notifyDone(); 19 testRunner.notifyDone();
19 } 20 }
20 </script> 21 </script>
21 <script>document.write(unescape(window.location));</script> 22 <script>document.write(unescape(window.location));</script>
22 </body> 23 </body>
23 </html> 24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698