blob: 3f19593a8af2014cabe0cb685a41a97240f1c40b [file] [log] [blame]
<html>
<head>
<script>
var frames = 2;
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
testRunner.setPrivateBrowsingEnabled_DEPRECATED(true);
testRunner.waitUntilDone();
internals.settings.setStorageBlockingPolicy('BlockThirdParty');
}
function decrement() {
--frames;
if (!frames) {
if (window.testRunner)
testRunner.setPrivateBrowsingEnabled_DEPRECATED(false);
for (var i = 0; i < 2; ++i) {
var frame = document.getElementsByTagName('iframe')[i].contentWindow;
frame.postMessage('loaded', '*');
}
frames = 2;
}
}
window.onmessage = function() {
--frames;
if (window.testRunner) {
internals.settings.setStorageBlockingPolicy('AllowAll');
testRunner.notifyDone();
}
}
</script>
<body>
<p>This iframe should have private browsing enabled:</p>
<iframe src="http://localhost:8000/security/resources/cross-origin-iframe-for-plugin-async.html" onload="decrement()"></iframe>
<p>This iframe should not have private browsing enabled:</p>
<iframe src="http://127.0.0.1:8000/security/resources/cross-origin-iframe-for-plugin-async.html" onload="decrement()"></iframe>
</body>
</html>