| <!DOCTYPE html> |
| <html> |
| <head> |
| <link rel="stylesheet" href="resources/cookies-test-style.css"> |
| <script src="resources/cookies-test-pre.js"></script> |
| </head> |
| <body> |
| <p id="description"></p> |
| <div id="console"></div> |
| <script> |
| description( |
| 'Test for <<a href="https://bugs.webkit.org/show_bug.cgi?id=86067">https://bugs.webkit.org/show_bug.cgi?id=86067</a>> [BlackBerry] Possible to clobber httpOnly cookie.' |
| ); |
| |
| clearAllCookies(); |
| |
| debug("Check that we can't get or set httpOnly Cookies by JavaScript."); |
| setCookies("httpOnlyCookie=value; Max-Age=900000000; path=/; httpOnly"); |
| |
| if (document.cookie == "httpOnlyCookie=value") |
| testFailed("We shouldn't get httpOnly cookies by JavaScript."); |
| else |
| testPassed("We can't get httpOnly cookies by JavaScript."); |
| |
| document.cookie = "httpOnlyCookie=changedValue; path=/"; |
| if (document.cookie == "httpOnlyCookie=changedValue") |
| testFailed("We shouldn't set httpOnly cookies by JavaScript."); |
| else |
| testPassed("We can't set httpOnly cookies by JavaScript."); |
| |
| clearCookies(); |
| |
| successfullyParsed = true; |
| </script> |
| <script src="resources/cookies-test-post.js"></script> |
| </body> |
| </html> |