-
Notifications
You must be signed in to change notification settings - Fork 54
/
attribute-tests.html
60 lines (56 loc) · 2.9 KB
/
attribute-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
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Tests cookie attribute 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: "attribute0001", name: "Ignore cookie for Secure attribute."},
{file: "attribute0002", name: "Ignore cookie for seCURe attribute."},
{file: "attribute0003", name: "Set cookie for \"Secure\" attribute."},
{file: "attribute0004", name: "Ignore cookie for for Secure= attribute."},
{file: "attribute0005", name: "Ignore cookie for Secure=aaaa"},
{file: "attribute0006", name: "Set cookie for Secure qux"},
{file: "attribute0007", name: "Ignore cookie for Secure space equals."},
{file: "attribute0008", name: "Ignore cookie for Secure equals space"},
{file: "attribute0009", name: "Ignore cookie for Secure separated."},
{file: "attribute0010", name: "Ignore cookie for Secure separated v2."},
{file: "attribute0011", name: "Ignore cookie for Secure separated v2."},
{file: "attribute0012", name: "Ignore cookie for spaced Secure"},
{file: "attribute0013", name: "Ignore cookie for space Secure with ;."},
{file: "attribute0014", name: "Set cookie for Path."},
{file: "attribute0015", name: "Set cookie for Path=."},
{file: "attribute0016", name: "Set cookie for Path=/."},
{file: "attribute0017", name: "Ignore cookie for invalid path."},
{file: "attribute0018", name: "Ignore cookie for spaced invalid path."},
{file: "attribute0019", name: "Ignore cookie for spaced invalid path v2."},
{file: "attribute0020", name: "Ignore cookie for invalid path and attribute."},
{file: "attribute0021", name: "Ignore cookie for invalid and root path."},
{file: "attribute0022", name: "Set cookie for root and invalid path."},
{file: "attribute0023", name: "Set cookie for invalid and sane path."},
{file: "attribute0024", name: "Ignore cookie for sane and invalid path."},
{file: "attribute0025", name: "Ignore cookie for invalid + Secure."},
{file: "attribute0026", name: "Ignore cookie for quoted invalid attribute."},
];
for (const i in TEST_CASES) {
const t = TEST_CASES[i];
promise_test(createCookieTest(t.file),
t.file + " - " + t.name);
}
</script>
</body>
</html>