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

Side by Side Diff: LayoutTests/http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-sub-frame-2-level.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 inside another java script: URL loaded iframe has access to the main frame.</p> 3 <p>This tests that a javascript: URL loaded in an iframe inside another java script: URL loaded iframe has access to the main frame.</p>
4 <iframe id="aFrame" style="width: 500px; height: 300px;"></iframe> 4 <iframe id="aFrame" name="aFrame" style="width: 500px; height: 300px;"></ifr ame>
5 <p id='accessMe'>FAIL: Cross frame access from a javascript: URL inside anot her javascript: URL was denied.</p> 5 <p id='accessMe'>FAIL: Cross frame access from a javascript: URL inside anot her 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 innerURL = 'javascript:\\\"<html>' 12 var innerURL = 'javascript:\\\"<html>'
13 + "<scr" + "ipt>" 13 + "<scr" + "ipt>"
14 + 'top.document.getElementById(\\\\\\\"accessMe\\\\\\\").innerHT ML = \\\\\\\"PASS: Cross frame access from a javascript: URL inside another java script: URL was allowed!\\\\\\\";' 14 + 'top.document.getElementById(\\\\\\\"accessMe\\\\\\\").innerHT ML = \\\\\\\"PASS: Cross frame access from a javascript: URL inside another java script: URL was allowed!\\\\\\\";'
15 + "</scri" + "pt>" 15 + "</scri" + "pt>"
16 + "<body>" 16 + "<body>"
17 + "<p>Inner-inner iframe.</p>" 17 + "<p>Inner-inner iframe.</p>"
18 + "</body>" 18 + "</body>"
19 + '</html>\\\"'; 19 + '</html>\\\"';
20 20
21 var url = "javascript:\"<html>" 21 var url = "javascript:\"<html>"
22 + "<body>" 22 + "<body>"
23 + "<iframe src='" + innerURL + "'></iframe>" 23 + "<iframe src='" + innerURL + "'></iframe>"
24 + "<p>Inner iframe.</p>" 24 + "<p>Inner iframe.</p>"
25 + "</body>" 25 + "</body>"
26 + "</html>\""; 26 + "</html>\"";
27 27
28 var iframe = document.getElementById("aFrame"); 28 var iframe = document.getElementById("aFrame");
29 iframe.src = url; 29 iframe.src = url;
30 </script> 30 </script>
31 </body> 31 </body>
32 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698