Automatic update from web-platform-tests Improve WPT coverage for Compression Dictionary Transport This adds several web platform tests for compression dictionary transport to better test some of the edge conditions. Specifically: * Expired dictionaries don't generate available-dictionary. * Compressed dictionary responses work as expected. * Dictionary-compressing dictionary updates works. * Crossorigin no-cors requests do not advertise available-dictionary. * A "vary" response that includes use-as-dictionary doesn't invalidate existing cache entries. Bug: 422734684 Change-Id: Ic7294e4b725cec456026b06ed4a97f1c2dcbe1ae Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6634910 Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Commit-Queue: Patrick Meenan <pmeenan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1472752} -- wpt-commits: aae479bb3639b97827b4432ff24d0e0c30f44780 wpt-pr: 53090
28 lines
958 B
HTML
28 lines
958 B
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="./resources/compression-dictionary-util.sub.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');
|
|
|
|
</script>
|
|
</body>
|