blob: b3ca014ba133fea4a129e95a09d612d851922494 [file] [log] [blame]
<!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 &lt;<a href="https://bugs.webkit.org/show_bug.cgi?id=86067">https://bugs.webkit.org/show_bug.cgi?id=86067</a>&gt; [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>