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

Side by Side Diff: LayoutTests/http/tests/security/cross-frame-access-document-direct.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 <script> 1 <script>
2 if (window.testRunner) { 2 if (window.testRunner) {
3 testRunner.dumpAsText(); 3 testRunner.dumpAsText();
4 testRunner.dumpChildFramesAsText(); 4 testRunner.dumpChildFramesAsText();
5 testRunner.waitUntilDone(); 5 testRunner.waitUntilDone();
6 } 6 }
7 7
8 addEventListener("message", function() { 8 addEventListener("message", function() {
9 // Call injected function. 9 // Call injected function.
10 try { 10 try {
11 attack(); 11 attack();
12 } catch (e) { 12 } catch (e) {
13 // V8 throws a TypeError: Cannot set property 'fail' of undefined. 13 // V8 throws a TypeError: Cannot set property 'fail' of undefined.
14 } 14 }
15 15
16 // Post message to victim to check if it was accessed. 16 // Post message to victim to check if it was accessed.
17 document.getElementById('theFrame').contentWindow.postMessage("test", "* "); 17 window.frames['theFrame'].postMessage("test", "*");
18 }, false); 18 }, false);
19 </script> 19 </script>
20 <body> 20 <body>
21 <p>Test cross-origin direct document access.</p> 21 <p>Test cross-origin direct document access.</p>
22 <iframe id="theFrame" src="resources/cross-frame-iframe-for-document-direct- test.html"></iframe> 22 <iframe name="theFrame" src="resources/cross-frame-iframe-for-document-direc t-test.html"></iframe>
23 </body> 23 </body>
24 </html> 24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698