| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script> | |
| 4 var frames = 2; | |
| 5 if (window.testRunner) { | |
| 6 testRunner.dumpAsText(); | |
| 7 testRunner.dumpChildFramesAsText(); | |
| 8 testRunner.setPrivateBrowsingEnabled(true); | |
| 9 testRunner.waitUntilDone(); | |
| 10 internals.settings.setStorageBlockingPolicy('BlockThirdParty'); | |
| 11 } | |
| 12 | |
| 13 function decrement() { | |
| 14 --frames; | |
| 15 if (!frames) { | |
| 16 if (window.testRunner) | |
| 17 testRunner.setPrivateBrowsingEnabled(false); | |
| 18 for (var i = 0; i < 2; ++i) { | |
| 19 var frame = document.getElementsByTagName('iframe')[i].c
ontentWindow; | |
| 20 frame.postMessage('loaded', '*'); | |
| 21 } | |
| 22 frames = 2; | |
| 23 } | |
| 24 } | |
| 25 | |
| 26 window.onmessage = function() { | |
| 27 --frames; | |
| 28 if (window.testRunner) { | |
| 29 internals.settings.setStorageBlockingPolicy('AllowAll'); | |
| 30 testRunner.notifyDone(); | |
| 31 } | |
| 32 } | |
| 33 </script> | |
| 34 <body> | |
| 35 <p>This iframe should have private browsing enabled:</p> | |
| 36 <iframe src="http://localhost:8000/security/resources/cross-origin-iframe-for-pl
ugin-async.html" onload="decrement()"></iframe> | |
| 37 <p>This iframe should not have private browsing enabled:</p> | |
| 38 <iframe src="http://127.0.0.1:8000/security/resources/cross-origin-iframe-for-pl
ugin-async.html" onload="decrement()"></iframe> | |
| 39 </body> | |
| 40 </html> | |
| OLD | NEW |