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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/iframe-that-performs-parent-navigation.html

Issue 2092293002: Block framebusts without a user gesture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better flag description Created 4 years, 3 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 function loaded() 4 function loaded()
5 { 5 {
6 document.getElementsByTagName('h4')[0].innerHTML = document.domain; 6 document.getElementsByTagName('h4')[0].innerHTML = document.domain;
7 // Allow the user to click the button during manuel runs. 7 }
8 if (window.testRunner) 8
9 performTest(); 9 function startTest(event)
10 {
11 // A manual click should navigate.
12 if (window.eventSender) {
13 var button = document.getElementById("b");
14 eventSender.mouseMoveTo(button.offsetLeft + event.data.x + 2, bu tton.offsetTop + event.data.y + 2);
15 eventSender.mouseDown();
16 eventSender.mouseUp();
17 }
10 } 18 }
11 19
12 function performTest() 20 function performTest()
13 { 21 {
14 parent.location = "http://localhost:8000/security/frameNavigation/re sources/navigation-changed-iframe.html"; 22 parent.location = "http://localhost:8000/security/frameNavigation/re sources/navigation-changed-iframe.html";
15 } 23 }
24
25 window.addEventListener("message", startTest, false);
16 </script> 26 </script>
17 </head> 27 </head>
18 <body onload="loaded();"> 28 <body onload="loaded();">
19 <h4>DOMAIN</h4> 29 <h4>DOMAIN</h4>
20 <button onclick="performTest();">Perform Test</button> 30 <button id="b" onclick="performTest();">Perform Test</button>
21 </body> 31 </body>
22 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698