| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="resources/cross-frame-access.js"></script> | |
| 4 <script> | |
| 5 function loaded() { | |
| 6 if (!window.testRunner) { | |
| 7 log("This test must be run in the DumpRenderTree to work."); | |
| 8 return; | |
| 9 } | |
| 10 | |
| 11 testRunner.dumpAsText(); | |
| 12 testRunner.dumpChildFramesAsText(); | |
| 13 testRunner.waitUntilDone(); | |
| 14 | |
| 15 // Poll until the subframe has finished loading. | |
| 16 setTimeout(waitForFlag, 1); | |
| 17 function waitForFlag() { | |
| 18 if (!testRunner.globalFlag) { | |
| 19 setTimeout(waitForFlag, 1); | |
| 20 return; | |
| 21 } | |
| 22 runTest(); | |
| 23 } | |
| 24 } | |
| 25 | |
| 26 function runTest() { | |
| 27 var subFrame = window.frames[0]; | |
| 28 testRunner.setPrivateBrowsingEnabled(true); | |
| 29 | |
| 30 try { | |
| 31 log("Attempting to violate the same-origin policy with private b
rowsing enabled. If this succeeds the console should not log the violation."); | |
| 32 // Access the document to violate the same-origin policy. | |
| 33 var doc = subFrame.document; | |
| 34 } catch(e) { | |
| 35 } | |
| 36 | |
| 37 testRunner.notifyDone(); | |
| 38 } | |
| 39 </script> | |
| 40 </head> | |
| 41 <body onload="loaded();"> | |
| 42 <p>This test checks cross-frame access security checks don't log when privat
e browsing is enabled (rdar://problem/5394877).</p> | |
| 43 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe.htm
l"></iframe> | |
| 44 <pre id="console"></pre> | |
| 45 </body> | |
| 46 </html> | |
| OLD | NEW |