Automatic update from web-platform-tests Add tests for available-dictionary header with large resources. This is a follow-up of CL 8126502. Bug: 522338661, 40255884 Change-Id: I3b67622132675e3c528ecbea3b7962a30ecf9995 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8138686 Reviewed-by: Patrick Meenan <pmeenan@chromium.org> Commit-Queue: Frédéric Wang Nélar <fwang@igalia.com> Cr-Commit-Position: refs/heads/main@{#1671938} -- wpt-commits: bad12620fb9173a9378f99c4e5a6b2d43d599df1 wpt-pr: 61664
25 lines
1.1 KiB
HTML
25 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="timeout" content="long"/>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/common/get-host-info.sub.js"></script>
|
|
<script src="/common/utils.js"></script>
|
|
<script src="./resources/compression-dictionary-util.sub.js"></script>
|
|
<script src="./resources/static/dictionary-hashes.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
for (const [dictionary, expected_hash] of Object.entries(kDictionaryHashes)) {
|
|
compression_dictionary_promise_test(async t => {
|
|
// Load the dictionary.
|
|
const use_as_dictionary = `match="${RESOURCES_PATH}/echo-headers.py"`;
|
|
const dictionary_url = `./resources/static/${dictionary}?id=${token()}&pipe=header(Use-As-Dictionary,${use_as_dictionary},True)`;
|
|
await (await fetch(dictionary_url)).bytes();
|
|
assert_equals(await waitUntilAvailableDictionaryHeader(t, {}), expected_hash);
|
|
}, `Available-Dictionary header properly set when fetching a resource matching ${dictionary} as a dictionary.`);
|
|
}
|
|
</script>
|
|
</body>
|