| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../cookies/resources/resetCookies.js"></script> | |
| 4 <script> | |
| 5 resetCookies(); | |
| 6 | |
| 7 if (window.testRunner) { | |
| 8 testRunner.dumpAsText(); | |
| 9 testRunner.waitUntilDone(); | |
| 10 } | |
| 11 | |
| 12 </script> | |
| 13 <body> | |
| 14 <embed id="plugin" type="application/x-webkit-test-netscape"></embed> | |
| 15 <script> | |
| 16 | |
| 17 var plugin = document.getElementById("plugin"); | |
| 18 | |
| 19 if (window.testRunner) | |
| 20 testRunner.setAlwaysAcceptCookies(true); | |
| 21 plugin.getURLNotify("http://localhost:8000/cookies/resources/cookie-utility.php?
queryfunction=deleteCookies", null, "trySetCookie"); | |
| 22 | |
| 23 function trySetCookie() | |
| 24 { | |
| 25 alert("Cookies should be clear, and are: '" + document.cookie + "'"); | |
| 26 alert("About to set a cookie, but on localhost instead of 127.0.0.1, which is
our main document domain - This should fail."); | |
| 27 if (window.testRunner) | |
| 28 testRunner.setAlwaysAcceptCookies(false); | |
| 29 plugin.getURLNotify("http://localhost:8000/cookies/resources/cookie-utility.p
hp?queryfunction=setFooCookie", null, "completeTest"); | |
| 30 } | |
| 31 | |
| 32 function completeTest() | |
| 33 { | |
| 34 alert("Cookies should still be clear, and are: '" + document.cookie + "'"); | |
| 35 resetCookies(); | |
| 36 if (window.testRunner) | |
| 37 testRunner.notifyDone(); | |
| 38 } | |
| 39 | |
| 40 </script> | |
| 41 </body> | |
| 42 </html> | |
| OLD | NEW |