| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.dumpChildFramesAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function iframeDone() |
| { |
| document.getElementById("logger").innerHTML += "After the iframe, document.cookie is '" + document.cookie + "'<br>"; |
| |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| function imageDone() |
| { |
| document.getElementById("logger").innerHTML += "After the image, document.cookie is '" + document.cookie + "'<br>"; |
| document.getElementById("iframe").onload = iframeDone; |
| document.getElementById("iframe").src = "http://127.0.0.1:8000/cookies/resources/echo-cookies.php"; |
| } |
| |
| |
| </script> |
| |
| This test loads a resource that sets a cookie, then verifies that the cookie is not sent out when it should be blocked.<br> |
| <div id="logger"></div> |
| <img src="http://127.0.0.1:8000/cookies/resources/cookie-utility.php?queryfunction=setFooCookie" onerror="imageDone();"> |
| <iframe id="iframe" name="iframe"></iframe> |