summaryrefslogtreecommitdiff
path: root/Base
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-04-14 10:16:59 -0400
committerAndreas Kling <kling@serenityos.org>2021-04-15 09:46:49 +0200
commit82c53178fadefce10bf07c82fa1d451d974cd137 (patch)
tree32ac635ade196200f02a027bbca5cac6deb9d5dc /Base
parent726d631527162e4868c7d6afcee0c81e4a3e5364 (diff)
downloadserenity-82c53178fadefce10bf07c82fa1d451d974cd137.zip
Base: Update cookie test page to include unretrievable cookies
"Unretrievable" meaning from JavaScript via document.cookie. They are settable though and may be viewed with the Dump Cookies command in the Browser.
Diffstat (limited to 'Base')
-rw-r--r--Base/res/html/misc/cookie.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/Base/res/html/misc/cookie.html b/Base/res/html/misc/cookie.html
index 8bbbfb3af9..c0531b11cb 100644
--- a/Base/res/html/misc/cookie.html
+++ b/Base/res/html/misc/cookie.html
@@ -2,7 +2,7 @@
<h3>Valid cookies:</h3>
<br /><input type=button onclick="setCookie(this.value)" value="cookie1=value1; max-age=5; path=/res/html" />
<br /><input type=button onclick="setCookie(this.value)" value="cookie2=value2; expires=Sat, 23 Jan 2060 08:10:36 GMT" />
- <br /><input type=button onclick="setCookie(this.value)" value="cookie3=value3; secure" />
+ <br /><input type=button onclick="setCookie(this.value)" value="cookie3=value3" />
<br />
<h3>Invalid cookies (the browser should reject these):</h3>
@@ -16,6 +16,13 @@
<label for=invalid4>The cookie expired in the past</label>
<br />
+ <h3>Unretrievable cookies (the browser should accept these but not display them):</h3>
+ <br /><input id=locked1 type=button onclick="setCookie(this.value)" value="cookie8=value8; path=/not/this/path" />
+ <label for=locked1>The Path attribute does not path-match this page</label>
+ <br /><input id=locked2 type=button onclick="setCookie(this.value)" value="cookie9=value9; secure" />
+ <label for=locked2>The cookie is Secure thus cannot be viewed by a file:// page</label>
+ <br />
+
<pre>document.cookie = <span id=cookies></span></pre>
<script>