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
|
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./resources/compression-dictionary-util.js"></script>
</head>
<body>
<script>
compression_dictionary_promise_test(async (t) => {
const dict = await (await fetch(kRegisterDictionaryPath)).text();
// Wait until `available-dictionary` header is available.
assert_equals(
await waitUntilAvailableDictionaryHeader(t, {}),
kDefaultDictionaryHashBase64);
// Clear site data.
assert_equals(await clearSiteData(/*directive=*/'cache'), 'OK');
// Check if `available-dictionary` header is not available.
assert_equals(
await waitUntilAvailableDictionaryHeader(t, {max_retry: 0}),
'"available-dictionary" header is not available');
}, 'Clear-Site-Data with "cache" directive must unregister dictionary');
compression_dictionary_promise_test(async (t) => {
const dict = await (await fetch(kRegisterDictionaryPath)).text();
// Wait until `available-dictionary` header is available.
assert_equals(
await waitUntilAvailableDictionaryHeader(t, {}),
kDefaultDictionaryHashBase64);
// Clear site data.
assert_equals(await clearSiteData(/*directive=*/'cookies'), 'OK');
// Check if `available-dictionary` header is not available.
assert_equals(
await waitUntilAvailableDictionaryHeader(t, {max_retry: 0}),
'"available-dictionary" header is not available');
}, 'Clear-Site-Data with "cookies" directive must unregister dictionary');
compression_dictionary_promise_test(async (t) => {
const dict = await (await fetch(kRegisterDictionaryPath)).text();
// Wait until `available-dictionary` header is available.
assert_equals(
await waitUntilAvailableDictionaryHeader(t, {}),
kDefaultDictionaryHashBase64);
// Clear site data.
assert_equals(await clearSiteData(/*directive=*/'storage'), 'OK');
// Check if `available-dictionary` header is not available.
assert_equals(
await waitUntilAvailableDictionaryHeader(t, {max_retry: 0}),
kDefaultDictionaryHashBase64);
}, 'Clear-Site-Data with "storage" directive must not unregister dictionary');
</script>
</body>
|