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

Side by Side Diff: LayoutTests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame.html

Issue 187103002: id of iframe incorrectly sets window name (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add back no-referrer-subframe.html Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <body> 2 <body>
3 <p>This tests that a javascript: URL loaded in an iframe has access to its p arent's frame</p> 3 <p>This tests that a javascript: URL loaded in an iframe has access to its p arent's frame</p>
4 <iframe id="aFrame"></iframe> 4 <iframe id="aFrame" name="aFrame"></iframe>
5 <p id='accessMe'>FAIL: Cross frame access from a javascript: URL was denied. </p> 5 <p id='accessMe'>FAIL: Cross frame access from a javascript: URL was denied. </p>
6 <script> 6 <script>
7 if (window.testRunner) { 7 if (window.testRunner) {
8 testRunner.dumpAsText(); 8 testRunner.dumpAsText();
9 testRunner.dumpChildFramesAsText(); 9 testRunner.dumpChildFramesAsText();
10 } 10 }
11 11
12 var url = "javascript:\"<html>" 12 var url = "javascript:\"<html>"
13 + "<scr" + "ipt>" 13 + "<scr" + "ipt>"
14 + "parent.document.getElementById('accessMe').innerHTML = 'PASS: Cross frame access from a javascript: URL was allowed!';" 14 + "parent.document.getElementById('accessMe').innerHTML = 'PASS: Cross frame access from a javascript: URL was allowed!';"
15 + "</scri" + "pt>" 15 + "</scri" + "pt>"
16 + "<body>" 16 + "<body>"
17 + "<p>Inner iframe.</p>" 17 + "<p>Inner iframe.</p>"
18 + "</body>" 18 + "</body>"
19 + "</html>\""; 19 + "</html>\"";
20 20
21 var iframe = document.getElementById("aFrame"); 21 var iframe = document.getElementById("aFrame");
22 iframe.src = url; 22 iframe.src = url;
23 </script> 23 </script>
24 </body> 24 </body>
25 </html> 25 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698