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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent.html

Issue 2425663002: Add an error page for resources blocked via XSS Auditor. (Closed)
Patch Set: 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 <html> 1 <html>
2 <body> 2 <body>
3 <script> 3 <script>
4 if (window.testRunner) { 4 if (window.testRunner) {
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 testRunner.dumpChildFramesAsText(); 6 testRunner.dumpChildFramesAsText();
7 testRunner.setDumpConsoleMessages(false); 7 testRunner.setDumpConsoleMessages(false);
8 testRunner.waitUntilDone();
8 } 9 }
9 10
10 // Ensure a user gesture happened in the main frame, but not in the iframe. 11 // Ensure a user gesture happened in the main frame, but not in the iframe.
11 if (window.eventSender) { 12 if (window.eventSender) {
12 eventSender.mouseMoveTo(0, 0); 13 eventSender.mouseMoveTo(0, 0);
13 eventSender.mouseDown(0, 0); 14 eventSender.mouseDown(0, 0);
14 eventSender.mouseUp(0, 0); 15 eventSender.mouseUp(0, 0);
15 } 16 }
17
18 window.addEventListener("message", e => {
19 if (e.data == "PASS")
20 setTimeout(_ => { testRunner.notifyDone(); }, 500); // Give the schedule blo cking navigation time to fire.
21 else
22 testRunner.testFailed("'top.location' didn't throw.");
23 });
16 </script> 24 </script>
17 <iframe src="http://localhost:8000/security/frameNavigation/resources/iframe-tha t-performs-top-navigation-without-user-gesture.html"></iframe> 25 <iframe src="http://localhost:8000/security/frameNavigation/resources/iframe-tha t-performs-top-navigation-without-user-gesture.html"></iframe>
18 </body> 26 </body>
19 </html> 27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698