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

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

Issue 2392773002: Reenable framebusting deprecation, change it to allow navigation if iframe has ever had a user gestu (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 } 7 }
8 8
9 function startTest(event) 9 function startTest(event)
10 { 10 {
11 // A manual click should navigate. 11 // A manual click should navigate.
12 if (window.eventSender) { 12 if (window.eventSender) {
13 var button = document.getElementById("b"); 13 var button = document.getElementById("b");
14 eventSender.mouseMoveTo(button.offsetLeft + event.data.x + 2, bu tton.offsetTop + event.data.y + 2); 14 eventSender.mouseMoveTo(button.offsetLeft + event.data.x + 2, bu tton.offsetTop + event.data.y + 2);
15 eventSender.mouseDown(); 15 eventSender.mouseDown();
16 eventSender.mouseUp(); 16 eventSender.mouseUp();
17 } 17 }
18 } 18 }
19 19
20 function performTest() 20 function performTest()
21 { 21 {
22 parent.location = "http://localhost:8000/security/frameNavigation/re sources/navigation-changed-iframe.html"; 22 // User gestures are propagated through a single setTimeout(), but
23 // not nested setTimeout()s. Ensure that the user gesture token
24 // doesn't propagate, but that the navigation goes through anyway,
25 // because there was a user gesture in this iframe previously.
26 setTimeout(function() {
27 setTimeout(function() {
28 parent.location = "http://localhost:8000/security/frameNavig ation/resources/navigation-changed-iframe.html";
29 }, 0);
30 }, 0);
23 } 31 }
24 32
25 window.addEventListener("message", startTest, false); 33 window.addEventListener("message", startTest, false);
26 </script> 34 </script>
27 </head> 35 </head>
28 <body onload="loaded();"> 36 <body onload="loaded();">
29 <h4>DOMAIN</h4> 37 <h4>DOMAIN</h4>
30 <button id="b" onclick="performTest();">Perform Test</button> 38 <button id="b" onclick="performTest();">Perform Test</button>
31 </body> 39 </body>
32 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698