Skip to content
File

Blob: src/wpt/compression-test.ts

typescript102 lines
1// Copyright (c) 2017-2022 Cloudflare, Inc.
2// Licensed under the Apache 2.0 license found in the LICENSE file or at:
3// https://opensource.org/licenses/Apache-2.0
4 
5import { type TestRunnerConfig } from 'harness/harness';
6 
7export default {
8 'compression-bad-chunks.any.js': {
9 comment: 'Test times out - needs investigation',
10 disabledTests: true,
11 },
12 'compression-constructor-error.any.js': {},
13 'compression-including-empty-chunk.any.js': {
14 comment: 'brotli compression is not supported',
15 expectedFailures: [
16 "the result of compressing [,Hello,Hello] with brotli should be 'HelloHello'",
17 "the result of compressing [Hello,,Hello] with brotli should be 'HelloHello'",
18 "the result of compressing [Hello,Hello,] with brotli should be 'HelloHello'",
19 ],
20 },
21 'compression-large-flush-output.any.js': {
22 comment: 'brotli compression is not supported',
23 expectedFailures: ['brotli compression with large flush output'],
24 },
25 'compression-multiple-chunks.any.js': {
26 comment: 'brotli compression is not supported',
27 expectedFailures: [/compressing \d+ chunks with brotli should work/],
28 },
29 'compression-output-length.any.js': {
30 comment: 'brotli compression is not supported',
31 expectedFailures: [
32 'the length of brotli data should be shorter than that of the original data',
33 ],
34 },
35 'compression-stream.any.js': {
36 comment: 'brotli compression is not supported',
37 expectedFailures: [
38 /brotli .* data should be reinflated back to its origin/,
39 ],
40 },
41 'compression-with-detach.window.js': {},
42 'decompression-bad-chunks.any.js': {
43 comment: 'brotli compression is not supported',
44 expectedFailures: [/brotli/],
45 },
46 'decompression-buffersource.any.js': {
47 comment: 'brotli compression is not supported',
48 expectedFailures: [/brotli/],
49 },
50 'decompression-constructor-error.any.js': {
51 comment:
52 'brotli compression is not supported - these pass because brotli throws',
53 },
54 'decompression-correct-input.any.js': {
55 comment: 'brotli compression is not supported',
56 expectedFailures: [/.*brotli.*/],
57 },
58 'decompression-corrupt-input.any.js': {
59 comment: 'brotli compression is not supported',
60 expectedFailures: [/brotli/],
61 },
62 'decompression-empty-input.any.js': {
63 comment: 'brotli compression is not supported',
64 expectedFailures: [/.*brotli.*/],
65 },
66 'decompression-extra-input.any.js': {
67 comment:
68 'Extra padding tests fail - workerd handles trailing data differently',
69 expectedFailures: [
70 'decompressing deflate input with extra pad should still give the output',
71 'decompressing gzip input with extra pad should still give the output',
72 'decompressing deflate-raw input with extra pad should still give the output',
73 /brotli/,
74 ],
75 },
76 'decompression-split-chunk.any.js': {
77 comment: 'brotli compression is not supported',
78 expectedFailures: [/.*brotli/],
79 },
80 'decompression-uint8array-output.any.js': {
81 comment: 'brotli compression is not supported',
82 expectedFailures: [
83 'decompressing brotli output should give Uint8Array chunks',
84 ],
85 },
86 'decompression-with-detach.window.js': {
87 comment: 'Detach test fails - needs investigation',
88 expectedFailures: [
89 'data should be correctly decompressed even if input is detached partway',
90 ],
91 },
92 'idlharness.https.any.js': {
93 comment:
94 'Workers expose globals differently than browsers - readable/writable attribute tests still fail',
95 expectedFailures: [
96 'CompressionStream interface: existence and properties of interface prototype object',
97 'DecompressionStream interface: existence and properties of interface prototype object',
98 ],
99 },
100 'third_party/pako/pako_inflate.min.js': {},
101} satisfies TestRunnerConfig;