blob: 1fd1d5f982e85bb53a4186c3d1f60b64abb5f3b5 [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setDumpConsoleMessages(false);
}
window.onload = function()
{
frame = document.body.appendChild(document.createElement("iframe"));
frame.src = "about:blank";
frame.onload = function() {
frame.onload = null;
wnd = frame.contentWindow.open();
frame.src = "http://localhost:8080/security/cookies/resources/innocent-victim-with-cookies.html";
window.onmessage = function(e) {
key = e.data;
wnd.location = "javascript:('bar')";
setTimeout(finishTest, 0);
}
}
}
function finishTest()
{
document.body.textContent = wnd.document.cookie.indexOf(key) != -1 ? "FAILURE" : "SUCCESS";
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body>
</body>
</html>