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

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

Issue 2696703010: Rename the flag of 'allow-top-navigation-with-user-activation' to 'allow-top-navigation-by-user-act… (Closed)
Patch Set: Change the tests to be testharness-based for the merging into web-platform-tests. Created 3 years, 10 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 } 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 try {
23 parent.location = "http://localhost:8000/security/frameNavigatio n/resources/navigation-changed-iframe.html";
24 parent.postMessage("PASS", "*");
25 } catch(e) {
26 parent.postMessage("FAIL", "*");
27 }
23 } 28 }
24 29
25 window.addEventListener("message", startTest, false); 30 window.addEventListener("message", startTest, false);
26 </script> 31 </script>
27 </head> 32 </head>
28 <body onload="loaded();"> 33 <body onload="loaded();">
29 <h4>DOMAIN</h4> 34 <h4>DOMAIN</h4>
30 <button id="b" onclick="performTest();">Perform Test</button> 35 <button id="b" onclick="performTest();">Perform Test</button>
31 </body> 36 </body>
32 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698