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

Side by Side Diff: LayoutTests/http/tests/security/javascriptURL/resources/foreign-domain-javascript-url-accessor-iframe.html

Issue 196523007: Revert of id of iframe incorrectly sets window name (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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>Inner iframe on a foreign domain.</p> 3 <p>Inner iframe on a foreign domain.</p>
4 <iframe id="aFrame" name="aFrame"></iframe> 4 <iframe id="aFrame"></iframe>
5 <script> 5 <script>
6 var url = "javascript:\"<html>" 6 var url = "javascript:\"<html>"
7 + "<head>" 7 + "<head>"
8 + "<scr" + "ipt>" 8 + "<scr" + "ipt>"
9 + "window.onload = function()" 9 + "window.onload = function()"
10 + "{" 10 + "{"
11 + "try {" 11 + "try {"
12 + "top.document.getElementById('accessMe').innerHTML = 'FAIL: Cross frame access from a javascript: URL on a different domain was al lowed';" 12 + "top.document.getElementById('accessMe').innerHTML = 'FAIL: Cross frame access from a javascript: URL on a different domain was al lowed';"
13 + "} catch (e) {" 13 + "} catch (e) {"
14 + "}" 14 + "}"
15 + "if (window.testRunner)" 15 + "if (window.testRunner)"
16 + "testRunner.notifyDone();" 16 + "testRunner.notifyDone();"
17 + "}" 17 + "}"
18 + "</scr" + "ipt>" 18 + "</scr" + "ipt>"
19 + "</head>" 19 + "</head>"
20 + "<body>" 20 + "<body>"
21 + "<p>Inner-inner iframe. This iframe (which is javascript: URL and whose parent is on a foreign domain) is the frame attempting to access" 21 + "<p>Inner-inner iframe. This iframe (which is javascript: URL and whose parent is on a foreign domain) is the frame attempting to access"
22 + " the main frame. It should not have access to it.</p>" 22 + " the main frame. It should not have access to it.</p>"
23 + "</body>" 23 + "</body>"
24 + "</html>\""; 24 + "</html>\"";
25 25
26 var frame = document.getElementById('aFrame'); 26 var frame = document.getElementById('aFrame');
27 frame.src = url; 27 frame.src = url;
28 </script> 28 </script>
29 </body> 29 </body>
30 </html> 30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698