OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <meta http-equiv="x-ua-compatible" content="chrome=1" /> |
| 4 <title>FullTab mode cookie deletion test</title> |
| 5 </head> |
| 6 |
| 7 <script type="text/javascript" |
| 8 src="chrome_frame_tester_helpers.js"></script> |
| 9 |
| 10 <script type="text/javascript"> |
| 11 function onLoad() { |
| 12 if (!isRunningInChrome()) { |
| 13 onFailure("FullTab_DeleteCookieTest", 1, "Not running in Chrome"); |
| 14 return; |
| 15 } |
| 16 |
| 17 // The path of the cookie in this test is set to "/." As a result it |
| 18 // is set twice, once for the original URL and once for the |
| 19 // chrome_frame_tester_helpers.js script. We attempt to delete |
| 20 // the cookie twice and validate that the end result is null. |
| 21 // First validate that the document cookie contains the substring |
| 22 // CF_FullTabDeleteCookie=1; CF_FullTabDeleteCookie=1 |
| 23 // Then erase the first cookie and validate that it no longer contains |
| 24 // this string. |
| 25 var cookie_found = |
| 26 /CF_FullTabDeleteCookie=1; CF_FullTabDeleteCookie=1/.test( |
| 27 document.cookie); |
| 28 if (cookie_found) { |
| 29 eraseCookie("CF_FullTabDeleteCookie"); |
| 30 cookie_found = |
| 31 /CF_FullTabDeleteCookie=1; CF_FullTabDeleteCookie=1/.test( |
| 32 document.cookie); |
| 33 if (!cookie_found) { |
| 34 onSuccess("FullTab_DeleteCookieTest", 1); |
| 35 } else { |
| 36 onFailure("FullTab_DeleteCookieTest", 1, "Delete cookie failed"); |
| 37 } |
| 38 } else { |
| 39 onFailure("FullTab_DeleteCookieTest", 1, "Expected cookies not set"); |
| 40 } |
| 41 } |
| 42 </script> |
| 43 |
| 44 <body onload="onLoad();"> |
| 45 This tests whether cookies get deleted correctly in full tab mode |
| 46 </body> |
| 47 </html> |
OLD | NEW |