-
Notifications
You must be signed in to change notification settings - Fork 54
/
general-tests.html
64 lines (60 loc) · 3.02 KB
/
general-tests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Tests basic cookie setting functionality</title>
<meta name=help href="https://tools.ietf.org/html/rfc6265#page-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/cookie-http-state-template.js"></script>
</head>
<body style="background:#EEE">
<h3>Log</h3>
<div id="log" style="height:50px; overflow-y:scroll; background: #FFF">
</div>
<h3>IFrames</h3>
<div id="iframes" style="height:170px; overflow-y:scroll; background: #FFF">
</div>
<h3>Test Results</h3>
<script>
setup({ explicit_timeout: true });
const TEST_CASES = [
{file: "0001", name: "Set cookie."},
{file: "0002", name: "Set cookie with future expiration."},
{file: "0003", name: "Set expired cookie along with valid cookie."},
{file: "0004", name: "Ignore cookie without key."},
{file: "0005", name: "Set cookie with age."},
{file: "0006", name: "Set no cookie with max-age=0."},
{file: "0007", name: "Set cookie with version=1."},
{file: "0008", name: "Set cookie with version=1000."},
{file: "0009", name: "Set cookie with custom value."},
// TODO(fhorschig): Could 0010 break when run on a HTTPS try server?
{file: "0010", name: "Dont accept 'secure' cookies over http."},
{file: "0011", name: "Ignore separators in cookie values."},
{file: "0012", name: "Ignore values with separators and without ';'."},
{file: "0013", name: "Use last value for cookies with identical keys."},
{file: "0014", name: "Keep alphabetic key order."},
{file: "0015", name: "Keep alphabetic single-char key order."},
{file: "0016", name: "Keep non-alphabetic key order."},
{file: "0017", name: "Keep order if comma-separated."},
{file: "0018", name: "Ignore keys after semicolon."},
{file: "0019", name: "Ignore attributes after semicolon."},
{file: "0020", name: "Ignore cookies without key and value."},
{file: "0021", name: "Ignore cookie without key in all 'Set-Cookie'."},
{file: "0022", name: "Set cookie without value in all 'Set-Cookie'."},
{file: "0023", name: "Ignore cookies without '=' in all 'Set-Cookie'."},
{file: "0024", name: "Ignore malformed cookies in all 'Set-Cookie'."},
{file: "0025", name: "Ignore cookies with ';' in all 'Set-Cookie'."},
{file: "0026", name: "Ignore malformed cookies in all 'Set-Cookie' v2."},
{file: "0027", name: "Ignore malformed cookies in all 'Set-Cookie' v3."},
// TODO(fhorschig): Ask about 0028's expectations ... should be empty?
{file: "0028", name: "[INVALID EXPECTATION] Ignore malformed cookies in all 'Set-Cookie' v4."},
];
for (const i in TEST_CASES) {
const t = TEST_CASES[i];
promise_test(createCookieTest(t.file),
t.file + " - " + t.name);
}
</script>
</body>
</html>