Bug 1823619 - Implement Compression Streams r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D173321
This commit is contained in:
Kagami Sascha Rosylight 2023-03-25 06:48:41 +00:00
Родитель e39e74df85
Коммит e88944c553
35 изменённых файлов: 811 добавлений и 2831 удалений

Просмотреть файл

@ -0,0 +1,252 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/CompressionStream.h"
#include "js/TypeDecls.h"
#include "mozilla/Assertions.h"
#include "mozilla/dom/CompressionStreamBinding.h"
#include "mozilla/dom/ReadableStream.h"
#include "mozilla/dom/WritableStream.h"
#include "mozilla/dom/TransformStream.h"
#include "mozilla/dom/TextDecoderStream.h"
#include "mozilla/dom/TransformerCallbackHelpers.h"
#include "mozilla/dom/UnionTypes.h"
#include "ZLibHelper.h"
// See the zlib manual in https://www.zlib.net/manual.html or in
// https://searchfox.org/mozilla-central/source/modules/zlib/src/zlib.h
namespace mozilla::dom {
class CompressionStreamAlgorithms : public TransformerAlgorithmsWrapper {
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CompressionStreamAlgorithms,
TransformerAlgorithmsBase)
explicit CompressionStreamAlgorithms(CompressionFormat format) {
int8_t err = deflateInit2(&mZStream, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
ZLibWindowBits(format), 8 /* default memLevel */,
Z_DEFAULT_STRATEGY);
if (err == Z_MEM_ERROR) {
MOZ_CRASH("Out of memory");
}
MOZ_ASSERT(err == Z_OK);
}
// Step 3 of
// https://wicg.github.io/compression/#dom-compressionstream-compressionstream
// Let transformAlgorithm be an algorithm which takes a chunk argument and
// runs the compress and enqueue a chunk algorithm with this and chunk.
MOZ_CAN_RUN_SCRIPT
void TransformCallbackImpl(JS::Handle<JS::Value> aChunk,
TransformStreamDefaultController& aController,
ErrorResult& aRv) override {
AutoJSAPI jsapi;
if (!jsapi.Init(aController.GetParentObject())) {
aRv.ThrowUnknownError("Internal error");
return;
}
JSContext* cx = jsapi.cx();
// https://wicg.github.io/compression/#compress-and-enqueue-a-chunk
// Step 1: If chunk is not a BufferSource type, then throw a TypeError.
// (ExtractSpanFromBufferSource does it)
Span<const uint8_t> input = ExtractSpanFromBufferSource(cx, aChunk, aRv);
if (aRv.Failed()) {
return;
}
// Step 2: Let buffer be the result of compressing chunk with cs's format
// and context.
// Step 3 - 5: (Done in CompressAndEnqueue)
CompressAndEnqueue(cx, input, ZLibFlush::No, aController, aRv);
}
// Step 4 of
// https://wicg.github.io/compression/#dom-compressionstream-compressionstream
// Let flushAlgorithm be an algorithm which takes no argument and runs the
// compress flush and enqueue algorithm with this.
MOZ_CAN_RUN_SCRIPT void FlushCallbackImpl(
TransformStreamDefaultController& aController,
ErrorResult& aRv) override {
AutoJSAPI jsapi;
if (!jsapi.Init(aController.GetParentObject())) {
aRv.ThrowUnknownError("Internal error");
return;
}
JSContext* cx = jsapi.cx();
// https://wicg.github.io/compression/#compress-flush-and-enqueue
// Step 1: Let buffer be the result of compressing an empty input with cs's
// format and context, with the finish flag.
// Step 2 - 4: (Done in CompressAndEnqueue)
CompressAndEnqueue(cx, Span<const uint8_t>(), ZLibFlush::Yes, aController,
aRv);
}
private:
// Shared by:
// https://wicg.github.io/compression/#compress-and-enqueue-a-chunk
// https://wicg.github.io/compression/#compress-flush-and-enqueue
MOZ_CAN_RUN_SCRIPT void CompressAndEnqueue(
JSContext* aCx, Span<const uint8_t> aInput, ZLibFlush aFlush,
TransformStreamDefaultController& aController, ErrorResult& aRv) {
MOZ_ASSERT_IF(aFlush == ZLibFlush::Yes, !aInput.Length());
mZStream.avail_in = aInput.Length();
mZStream.next_in = const_cast<uint8_t*>(aInput.Elements());
JS::RootedVector<JSObject*> array(aCx);
do {
static uint16_t kBufferSize = 16384;
UniquePtr<uint8_t> buffer(
static_cast<uint8_t*>(JS_malloc(aCx, kBufferSize)));
if (!buffer) {
aRv.ThrowTypeError("Out of memory");
return;
}
mZStream.avail_out = kBufferSize;
mZStream.next_out = buffer.get();
int8_t err = deflate(&mZStream, aFlush);
// From the manual: deflate() returns ...
switch (err) {
case Z_OK:
case Z_STREAM_END:
case Z_BUF_ERROR:
// * Z_OK if some progress has been made
// * Z_STREAM_END if all input has been consumed and all output has
// been produced (only when flush is set to Z_FINISH)
// * Z_BUF_ERROR if no progress is possible (for example avail_in or
// avail_out was zero). Note that Z_BUF_ERROR is not fatal, and
// deflate() can be called again with more input and more output space
// to continue compressing.
//
// (But of course no input should be given after Z_FINISH)
break;
case Z_STREAM_ERROR:
default:
// * Z_STREAM_ERROR if the stream state was inconsistent
// (which is fatal)
MOZ_ASSERT_UNREACHABLE("Unexpected compression error code");
aRv.ThrowTypeError("Unexpected compression error");
return;
}
// Stream should end only when flushed and vise versa, see above
MOZ_ASSERT_IF(err == Z_STREAM_END, aFlush == ZLibFlush::Yes);
MOZ_ASSERT_IF(aFlush == ZLibFlush::Yes, err == Z_STREAM_END);
// At this point we either exhausted the input or the output buffer
MOZ_ASSERT(!mZStream.avail_in || !mZStream.avail_out);
size_t written = kBufferSize - mZStream.avail_out;
if (!written) {
break;
}
// Step 3: If buffer is empty, return.
// (We'll implicitly return when the array is empty.)
// Step 4: Split buffer into one or more non-empty pieces and convert them
// into Uint8Arrays.
// (The buffer is 'split' by having a fixed sized buffer above.)
JS::Rooted<JSObject*> view(
aCx, nsJSUtils::MoveBufferAsUint8Array(aCx, written, buffer));
if (!view || !array.append(view)) {
JS_ClearPendingException(aCx);
aRv.ThrowTypeError("Out of memory");
return;
}
} while (mZStream.avail_out == 0);
// From the manual:
// If deflate returns with avail_out == 0, this function must be called
// again with the same value of the flush parameter and more output space
// (updated avail_out)
// Step 5: For each Uint8Array array, enqueue array in cs's transform.
for (const auto& view : array) {
JS::Rooted<JS::Value> value(aCx, JS::ObjectValue(*view));
aController.Enqueue(aCx, value, aRv);
if (aRv.Failed()) {
return;
}
}
}
~CompressionStreamAlgorithms() override { deflateEnd(&mZStream); };
z_stream mZStream = {};
};
NS_IMPL_CYCLE_COLLECTION_INHERITED(CompressionStreamAlgorithms,
TransformerAlgorithmsBase)
NS_IMPL_ADDREF_INHERITED(CompressionStreamAlgorithms, TransformerAlgorithmsBase)
NS_IMPL_RELEASE_INHERITED(CompressionStreamAlgorithms,
TransformerAlgorithmsBase)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CompressionStreamAlgorithms)
NS_INTERFACE_MAP_END_INHERITING(TransformerAlgorithmsBase)
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CompressionStream, mGlobal, mStream)
NS_IMPL_CYCLE_COLLECTING_ADDREF(CompressionStream)
NS_IMPL_CYCLE_COLLECTING_RELEASE(CompressionStream)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CompressionStream)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
CompressionStream::CompressionStream(nsISupports* aGlobal,
TransformStream& aStream)
: mGlobal(aGlobal), mStream(&aStream) {}
CompressionStream::~CompressionStream() = default;
JSObject* CompressionStream::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return CompressionStream_Binding::Wrap(aCx, this, aGivenProto);
}
// https://wicg.github.io/compression/#dom-compressionstream-compressionstream
already_AddRefed<CompressionStream> CompressionStream::Constructor(
const GlobalObject& aGlobal, CompressionFormat aFormat, ErrorResult& aRv) {
// Step 1: If format is unsupported in CompressionStream, then throw a
// TypeError.
// XXX: Skipped as we are using enum for this
// Step 2 - 4: (Done in CompressionStreamAlgorithms)
// Step 5: Set this's transform to a new TransformStream.
// Step 6: Set up this's transform with transformAlgorithm set to
// transformAlgorithm and flushAlgorithm set to flushAlgorithm.
auto algorithms = MakeRefPtr<CompressionStreamAlgorithms>(aFormat);
RefPtr<TransformStream> stream =
TransformStream::CreateGeneric(aGlobal, *algorithms, aRv);
if (aRv.Failed()) {
return nullptr;
}
return do_AddRef(new CompressionStream(aGlobal.GetAsSupports(), *stream));
}
already_AddRefed<ReadableStream> CompressionStream::Readable() const {
return do_AddRef(mStream->Readable());
}
already_AddRefed<WritableStream> CompressionStream::Writable() const {
return do_AddRef(mStream->Writable());
}
} // namespace mozilla::dom

Просмотреть файл

@ -0,0 +1,59 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef DOM_COMPRESSIONSTREAM_H_
#define DOM_COMPRESSIONSTREAM_H_
#include "js/TypeDecls.h"
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"
namespace mozilla::dom {
class ReadableStream;
class WritableStream;
class TransformStream;
enum class CompressionFormat : uint8_t;
class CompressionStream final : public nsISupports, public nsWrapperCache {
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(CompressionStream)
public:
CompressionStream(nsISupports* aGlobal, TransformStream& aStream);
protected:
~CompressionStream();
public:
nsISupports* GetParentObject() const { return mGlobal; }
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
// TODO: Mark as MOZ_CAN_RUN_SCRIPT when IDL constructors can be (bug 1749042)
MOZ_CAN_RUN_SCRIPT_BOUNDARY static already_AddRefed<CompressionStream>
Constructor(const GlobalObject& aGlobal, CompressionFormat aFormat,
ErrorResult& aRv);
already_AddRefed<ReadableStream> Readable() const;
already_AddRefed<WritableStream> Writable() const;
private:
nsCOMPtr<nsISupports> mGlobal;
RefPtr<TransformStream> mStream;
};
} // namespace mozilla::dom
#endif // DOM_COMPRESSIONSTREAM_H_

Просмотреть файл

@ -0,0 +1,295 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/DecompressionStream.h"
#include "js/TypeDecls.h"
#include "mozilla/Assertions.h"
#include "mozilla/dom/DecompressionStreamBinding.h"
#include "mozilla/dom/ReadableStream.h"
#include "mozilla/dom/WritableStream.h"
#include "mozilla/dom/TextDecoderStream.h"
#include "mozilla/dom/TransformStream.h"
#include "mozilla/dom/TransformerCallbackHelpers.h"
#include "ZLibHelper.h"
// See the zlib manual in https://www.zlib.net/manual.html or in
// https://searchfox.org/mozilla-central/source/modules/zlib/src/zlib.h
namespace mozilla::dom {
class DecompressionStreamAlgorithms : public TransformerAlgorithmsWrapper {
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DecompressionStreamAlgorithms,
TransformerAlgorithmsBase)
explicit DecompressionStreamAlgorithms(CompressionFormat format) {
int8_t err = inflateInit2(&mZStream, ZLibWindowBits(format));
if (err == Z_MEM_ERROR) {
MOZ_CRASH("Out of memory");
}
MOZ_ASSERT(err == Z_OK);
}
// Step 3 of
// https://wicg.github.io/compression/#dom-compressionstream-compressionstream
// Let transformAlgorithm be an algorithm which takes a chunk argument and
// runs the compress and enqueue a chunk algorithm with this and chunk.
MOZ_CAN_RUN_SCRIPT
void TransformCallbackImpl(JS::Handle<JS::Value> aChunk,
TransformStreamDefaultController& aController,
ErrorResult& aRv) override {
AutoJSAPI jsapi;
if (!jsapi.Init(aController.GetParentObject())) {
aRv.ThrowUnknownError("Internal error");
return;
}
JSContext* cx = jsapi.cx();
// https://wicg.github.io/compression/#compress-and-enqueue-a-chunk
// Step 1: If chunk is not a BufferSource type, then throw a TypeError.
// (ExtractSpanFromBufferSource does it)
Span<const uint8_t> input = ExtractSpanFromBufferSource(cx, aChunk, aRv);
if (aRv.Failed()) {
return;
}
// Step 2: Let buffer be the result of decompressing chunk with ds's format
// and context. If this results in an error, then throw a TypeError.
// Step 3 - 5: (Done in CompressAndEnqueue)
DecompressAndEnqueue(cx, input, ZLibFlush::No, aController, aRv);
}
// Step 4 of
// https://wicg.github.io/compression/#dom-compressionstream-compressionstream
// Let flushAlgorithm be an algorithm which takes no argument and runs the
// compress flush and enqueue algorithm with this.
MOZ_CAN_RUN_SCRIPT void FlushCallbackImpl(
TransformStreamDefaultController& aController,
ErrorResult& aRv) override {
AutoJSAPI jsapi;
if (!jsapi.Init(aController.GetParentObject())) {
aRv.ThrowUnknownError("Internal error");
return;
}
JSContext* cx = jsapi.cx();
// https://wicg.github.io/compression/#decompress-flush-and-enqueue
// Step 1: Let buffer be the result of decompressing an empty input with
// ds's format and context, with the finish flag.
// Step 2 - 4: (Done in CompressAndEnqueue)
DecompressAndEnqueue(cx, Span<const uint8_t>(), ZLibFlush::Yes, aController,
aRv);
}
private:
// Shared by:
// https://wicg.github.io/compression/#decompress-and-enqueue-a-chunk
// https://wicg.github.io/compression/#decompress-flush-and-enqueue
// All data errors throw TypeError by step 2: If this results in an error,
// then throw a TypeError.
MOZ_CAN_RUN_SCRIPT void DecompressAndEnqueue(
JSContext* aCx, Span<const uint8_t> aInput, ZLibFlush aFlush,
TransformStreamDefaultController& aController, ErrorResult& aRv) {
MOZ_ASSERT_IF(aFlush == ZLibFlush::Yes, !aInput.Length());
mZStream.avail_in = aInput.Length();
mZStream.next_in = const_cast<uint8_t*>(aInput.Elements());
JS::RootedVector<JSObject*> array(aCx);
do {
static uint16_t kBufferSize = 16384;
UniquePtr<uint8_t> buffer(
static_cast<uint8_t*>(JS_malloc(aCx, kBufferSize)));
if (!buffer) {
aRv.ThrowTypeError("Out of memory");
return;
}
mZStream.avail_out = kBufferSize;
mZStream.next_out = buffer.get();
int8_t err = inflate(&mZStream, aFlush);
// From the manual: inflate() returns ...
switch (err) {
case Z_DATA_ERROR:
// Z_DATA_ERROR if the input data was corrupted (input stream not
// conforming to the zlib format or incorrect check value, in which
// case strm->msg points to a string with a more specific error)
aRv.ThrowTypeError("The input data is corrupted: "_ns +
nsDependentCString(mZStream.msg));
return;
case Z_MEM_ERROR:
// Z_MEM_ERROR if there was not enough memory
aRv.ThrowTypeError("Out of memory");
return;
case Z_NEED_DICT:
// Z_NEED_DICT if a preset dictionary is needed at this point
//
// From the `deflate` section of
// https://wicg.github.io/compression/#supported-formats:
// * The FDICT flag is not supported by these APIs, and will error the
// stream if set.
// And FDICT means preset dictionary per
// https://datatracker.ietf.org/doc/html/rfc1950#page-5.
aRv.ThrowTypeError(
"The stream needs a preset dictionary but such setup is "
"unsupported");
return;
case Z_STREAM_END:
// Z_STREAM_END if the end of the compressed data has been reached and
// all uncompressed output has been produced
//
// https://wicg.github.io/compression/#supported-formats has error
// conditions for each compression format when additional input comes
// after stream end.
// Note that additional calls for inflate() immediately emits
// Z_STREAM_END after this point.
if (mZStream.avail_in > 0) {
aRv.ThrowTypeError("Unexpected input after the end of stream");
return;
}
mObservedStreamEnd = true;
break;
case Z_OK:
case Z_BUF_ERROR:
// * Z_OK if some progress has been made
// * Z_BUF_ERROR if no progress was possible or if there was not
// enough room in the output buffer when Z_FINISH is used. Note that
// Z_BUF_ERROR is not fatal, and inflate() can be called again with
// more input and more output space to continue decompressing.
//
// (But of course no input should be given after Z_FINISH)
break;
case Z_STREAM_ERROR:
default:
// * Z_STREAM_ERROR if the stream state was inconsistent
// (which is fatal)
MOZ_ASSERT_UNREACHABLE("Unexpected decompression error code");
aRv.ThrowTypeError("Unexpected decompression error");
return;
}
// At this point we either exhausted the input or the output buffer
MOZ_ASSERT(!mZStream.avail_in || !mZStream.avail_out);
size_t written = kBufferSize - mZStream.avail_out;
if (!written) {
break;
}
// Step 3: If buffer is empty, return.
// (We'll implicitly return when the array is empty.)
// Step 4: Split buffer into one or more non-empty pieces and convert them
// into Uint8Arrays.
// (The buffer is 'split' by having a fixed sized buffer above.)
JS::Rooted<JSObject*> view(
aCx, nsJSUtils::MoveBufferAsUint8Array(aCx, written, buffer));
if (!view || !array.append(view)) {
JS_ClearPendingException(aCx);
aRv.ThrowTypeError("Out of memory");
return;
}
} while (mZStream.avail_out == 0 && !mObservedStreamEnd);
// From the manual:
// * It must update next_out and avail_out when avail_out has dropped to
// zero.
// * inflate() should normally be called until it returns Z_STREAM_END or an
// error.
if (aFlush == ZLibFlush::Yes && !mObservedStreamEnd) {
// Step 2 of
// https://wicg.github.io/compression/#decompress-flush-and-enqueue
// If the end of the compressed input has not been reached, then throw a
// TypeError.
aRv.ThrowTypeError("The input is ended without reaching the stream end");
return;
}
// Step 5: For each Uint8Array array, enqueue array in cs's transform.
for (const auto& view : array) {
JS::Rooted<JS::Value> value(aCx, JS::ObjectValue(*view));
aController.Enqueue(aCx, value, aRv);
if (aRv.Failed()) {
return;
}
}
}
~DecompressionStreamAlgorithms() override { inflateEnd(&mZStream); };
z_stream mZStream = {};
bool mObservedStreamEnd = false;
};
NS_IMPL_CYCLE_COLLECTION_INHERITED(DecompressionStreamAlgorithms,
TransformerAlgorithmsBase)
NS_IMPL_ADDREF_INHERITED(DecompressionStreamAlgorithms,
TransformerAlgorithmsBase)
NS_IMPL_RELEASE_INHERITED(DecompressionStreamAlgorithms,
TransformerAlgorithmsBase)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DecompressionStreamAlgorithms)
NS_INTERFACE_MAP_END_INHERITING(TransformerAlgorithmsBase)
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DecompressionStream, mGlobal, mStream)
NS_IMPL_CYCLE_COLLECTING_ADDREF(DecompressionStream)
NS_IMPL_CYCLE_COLLECTING_RELEASE(DecompressionStream)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DecompressionStream)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
DecompressionStream::DecompressionStream(nsISupports* aGlobal,
TransformStream& aStream)
: mGlobal(aGlobal), mStream(&aStream) {}
DecompressionStream::~DecompressionStream() = default;
JSObject* DecompressionStream::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return DecompressionStream_Binding::Wrap(aCx, this, aGivenProto);
}
// https://wicg.github.io/compression/#dom-decompressionstream-decompressionstream
already_AddRefed<DecompressionStream> DecompressionStream::Constructor(
const GlobalObject& aGlobal, CompressionFormat aFormat, ErrorResult& aRv) {
// Step 1: If format is unsupported in DecompressionStream, then throw a
// TypeError.
// XXX: Skipped as we are using enum for this
// Step 2 - 4: (Done in DecompressionStreamAlgorithms)
// Step 5: Set this's transform to a new TransformStream.
// Step 6: Set up this's transform with transformAlgorithm set to
// transformAlgorithm and flushAlgorithm set to flushAlgorithm.
auto algorithms = MakeRefPtr<DecompressionStreamAlgorithms>(aFormat);
RefPtr<TransformStream> stream =
TransformStream::CreateGeneric(aGlobal, *algorithms, aRv);
if (aRv.Failed()) {
return nullptr;
}
return do_AddRef(new DecompressionStream(aGlobal.GetAsSupports(), *stream));
}
already_AddRefed<ReadableStream> DecompressionStream::Readable() const {
return do_AddRef(mStream->Readable());
};
already_AddRefed<WritableStream> DecompressionStream::Writable() const {
return do_AddRef(mStream->Writable());
};
} // namespace mozilla::dom

Просмотреть файл

@ -0,0 +1,59 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef DOM_DECOMPRESSIONSTREAM_H_
#define DOM_DECOMPRESSIONSTREAM_H_
#include "js/TypeDecls.h"
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"
namespace mozilla::dom {
class ReadableStream;
class WritableStream;
class TransformStream;
enum class CompressionFormat : uint8_t;
class DecompressionStream final : public nsISupports, public nsWrapperCache {
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(DecompressionStream)
public:
DecompressionStream(nsISupports* aGlobal, TransformStream& aStream);
protected:
~DecompressionStream();
public:
nsISupports* GetParentObject() const { return mGlobal; }
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
// TODO: Mark as MOZ_CAN_RUN_SCRIPT when IDL constructors can be (bug 1749042)
MOZ_CAN_RUN_SCRIPT_BOUNDARY static already_AddRefed<DecompressionStream>
Constructor(const GlobalObject& global, CompressionFormat format,
ErrorResult& aRv);
already_AddRefed<ReadableStream> Readable() const;
already_AddRefed<WritableStream> Writable() const;
private:
nsCOMPtr<nsISupports> mGlobal;
RefPtr<TransformStream> mStream;
};
} // namespace mozilla::dom
#endif // DOM_DECOMPRESSIONSTREAM_H_

46
dom/base/ZLibHelper.h Normal file
Просмотреть файл

@ -0,0 +1,46 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef DOM_ZLIBHELPER_H_
#define DOM_ZLIBHELPER_H_
#include "js/TypeDecls.h"
#include "zlib.h"
#include "mozilla/dom/CompressionStreamBinding.h"
namespace mozilla::dom {
// From the docs in
// https://searchfox.org/mozilla-central/source/modules/zlib/src/zlib.h
inline int8_t ZLibWindowBits(CompressionFormat format) {
switch (format) {
case CompressionFormat::Deflate:
// The windowBits parameter is the base two logarithm of the window size
// (the size of the history buffer). It should be in the range 8..15 for
// this version of the library. Larger values of this parameter result
// in better compression at the expense of memory usage.
return 15;
case CompressionFormat::Deflate_raw:
// windowBits can also be –8..–15 for raw deflate. In this case,
// -windowBits determines the window size.
return -15;
case CompressionFormat::Gzip:
// windowBits can also be greater than 15 for optional gzip encoding.
// Add 16 to windowBits to write a simple gzip header and trailer around
// the compressed data instead of a zlib wrapper.
return 31;
default:
MOZ_ASSERT_UNREACHABLE("Unknown compression format");
return 0;
}
}
enum ZLibFlush : uint8_t { No = Z_NO_FLUSH, Yes = Z_FINISH };
} // namespace mozilla::dom
#endif // DOM_ZLIBHELPER_H_

Просмотреть файл

@ -169,9 +169,11 @@ EXPORTS.mozilla.dom += [
"ChromeNodeList.h",
"ChromeUtils.h",
"Comment.h",
"CompressionStream.h",
"ContentFrameMessageManager.h",
"ContentProcessMessageManager.h",
"CustomElementRegistry.h",
"DecompressionStream.h",
"DirectionalityUtils.h",
"DispatcherTrait.h",
"DocGroup.h",
@ -331,11 +333,13 @@ UNIFIED_SOURCES += [
"ChromeNodeList.cpp",
"ChromeUtils.cpp",
"Comment.cpp",
"CompressionStream.cpp",
"ContentFrameMessageManager.cpp",
"ContentIterator.cpp",
"ContentProcessMessageManager.cpp",
"Crypto.cpp",
"CustomElementRegistry.cpp",
"DecompressionStream.cpp",
"DirectionalityUtils.cpp",
"DispatcherTrait.cpp",
"DocGroup.cpp",

Просмотреть файл

@ -186,6 +186,21 @@ bool nsJSUtils::DumpEnabled() {
#endif
}
JSObject* nsJSUtils::MoveBufferAsUint8Array(JSContext* aCx, size_t aSize,
UniquePtr<uint8_t>& aBuffer) {
JS::Rooted<JSObject*> arrayBuffer(
aCx, JS::NewArrayBufferWithContents(aCx, aSize, aBuffer.get()));
if (!arrayBuffer) {
return nullptr;
}
// Now the ArrayBuffer owns the buffer, so let's release our ownership
(void)aBuffer.release();
return JS_NewUint8ArrayWithBuffer(aCx, arrayBuffer, 0,
static_cast<int64_t>(aSize));
}
//
// nsDOMJSUtils.h
//

Просмотреть файл

@ -81,6 +81,14 @@ class nsJSUtils {
static void ResetTimeZone();
static bool DumpEnabled();
// A helper function that receives buffer pointer, creates ArrayBuffer, and
// convert it to Uint8Array.
// Note that the buffer needs to be created by JS_malloc (or at least can be
// freed by JS_free), as the resulting Uint8Array takes the ownership of the
// buffer.
static JSObject* MoveBufferAsUint8Array(JSContext* aCx, size_t aSize,
mozilla::UniquePtr<uint8_t>& aBuffer);
};
inline void AssignFromStringBuffer(nsStringBuffer* buffer, size_t len,

Просмотреть файл

@ -48,7 +48,7 @@ JSObject* TextDecoderStream::WrapObject(JSContext* aCx,
// TODO: This does not allow shared array buffers, just as the non-stream
// TextDecoder/Encoder don't. (Bug 1561594)
static Span<const uint8_t> ExtractSpanFromBufferSource(
Span<const uint8_t> ExtractSpanFromBufferSource(
JSContext* aCx, JS::Handle<JS::Value> aBufferSource, ErrorResult& aRv) {
RootedUnion<OwningArrayBufferViewOrArrayBuffer> bufferSource(aCx);
if (!bufferSource.Init(aCx, aBufferSource)) {

Просмотреть файл

@ -69,6 +69,9 @@ class TextDecoderStream final : public nsISupports,
RefPtr<TransformStream> mStream;
};
Span<const uint8_t> ExtractSpanFromBufferSource(
JSContext* aCx, JS::Handle<JS::Value> aBufferSource, ErrorResult& aRv);
} // namespace mozilla::dom
#endif // DOM_ENCODING_TEXTDECODERSTREAM_H_

Просмотреть файл

@ -255,6 +255,8 @@ let interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "CompositionEvent", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "CompressionStream", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "ConstantSourceNode", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{
@ -333,6 +335,8 @@ let interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "CustomEvent", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "DecompressionStream", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "DataTransfer", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "DataTransferItem", insecureContext: true },

Просмотреть файл

@ -0,0 +1,21 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://wicg.github.io/compression/#compression-stream
*/
enum CompressionFormat {
"deflate",
"deflate-raw",
"gzip",
};
[Exposed=*, Pref="dom.compression_streams.enabled"]
interface CompressionStream {
[Throws]
constructor(CompressionFormat format);
};
CompressionStream includes GenericTransformStream;

Просмотреть файл

@ -0,0 +1,15 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://wicg.github.io/compression/#decompression-stream
*/
[Exposed=*, Pref="dom.compression_streams.enabled"]
interface DecompressionStream {
[Throws]
constructor(CompressionFormat format);
};
DecompressionStream includes GenericTransformStream;

Просмотреть файл

@ -1035,6 +1035,8 @@ WEBIDL_FILES = [
if CONFIG["MOZ_DOM_STREAMS"]:
WEBIDL_FILES += [
"CompressionStream.webidl",
"DecompressionStream.webidl",
"FileSystemWritableFileStream.webidl",
"QueuingStrategy.webidl",
"ReadableByteStreamController.webidl",

Просмотреть файл

@ -2336,6 +2336,12 @@
value: false
mirror: always
# Compression Streams (CompressionStream/DecompressionStream)
- name: dom.compression_streams.enabled
type: RelaxedAtomicBool
value: true
mirror: always
- name: dom.crypto.randomUUID.enabled
type: RelaxedAtomicBool
value: true

Просмотреть файл

@ -1 +1 @@
implementation-status: backlog
prefs: [dom.compression_streams.enabled:true]

Просмотреть файл

@ -1,260 +0,0 @@
[compression-bad-chunks.tentative.any.html]
[chunk of type array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate]
expected: FAIL
[chunk of type array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for deflate]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate]
expected: FAIL
[chunk of type numeric should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for gzip]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for gzip]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate-raw]
expected: FAIL
[chunk of type undefined should error the stream for deflate-raw]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate-raw]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate-raw]
expected: FAIL
[chunk of type numeric should error the stream for deflate-raw]
expected: FAIL
[chunk of type array should error the stream for deflate-raw]
expected: FAIL
[chunk of type null should error the stream for deflate-raw]
expected: FAIL
[compression-bad-chunks.tentative.any.worker.html]
[chunk of type array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate]
expected: FAIL
[chunk of type array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for deflate]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate]
expected: FAIL
[chunk of type numeric should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for gzip]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for gzip]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate-raw]
expected: FAIL
[chunk of type undefined should error the stream for deflate-raw]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate-raw]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate-raw]
expected: FAIL
[chunk of type numeric should error the stream for deflate-raw]
expected: FAIL
[chunk of type array should error the stream for deflate-raw]
expected: FAIL
[chunk of type null should error the stream for deflate-raw]
expected: FAIL
[compression-bad-chunks.tentative.any.serviceworker.html]
expected:
if os == "win": [OK, TIMEOUT]
[chunk of type array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate]
expected: FAIL
[chunk of type array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for deflate]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate]
expected: FAIL
[chunk of type numeric should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for gzip]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for gzip]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate-raw]
expected: FAIL
[chunk of type undefined should error the stream for deflate-raw]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate-raw]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate-raw]
expected: FAIL
[chunk of type numeric should error the stream for deflate-raw]
expected: FAIL
[chunk of type array should error the stream for deflate-raw]
expected: FAIL
[chunk of type null should error the stream for deflate-raw]
expected: FAIL
[compression-bad-chunks.tentative.any.sharedworker.html]
[chunk of type array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate]
expected: FAIL
[chunk of type array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for deflate]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate]
expected: FAIL
[chunk of type numeric should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for gzip]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for gzip]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate-raw]
expected: FAIL
[chunk of type undefined should error the stream for deflate-raw]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate-raw]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate-raw]
expected: FAIL
[chunk of type numeric should error the stream for deflate-raw]
expected: FAIL
[chunk of type array should error the stream for deflate-raw]
expected: FAIL
[chunk of type null should error the stream for deflate-raw]
expected: FAIL

Просмотреть файл

@ -1,42 +0,0 @@
[compression-constructor-error.tentative.any.worker.html]
["a" should cause the constructor to throw]
expected: FAIL
[no input should cause the constructor to throw]
expected: FAIL
[non-string input should cause the constructor to throw]
expected: FAIL
[compression-constructor-error.tentative.any.serviceworker.html]
["a" should cause the constructor to throw]
expected: FAIL
[no input should cause the constructor to throw]
expected: FAIL
[non-string input should cause the constructor to throw]
expected: FAIL
[compression-constructor-error.tentative.any.sharedworker.html]
["a" should cause the constructor to throw]
expected: FAIL
[no input should cause the constructor to throw]
expected: FAIL
[non-string input should cause the constructor to throw]
expected: FAIL
[compression-constructor-error.tentative.any.html]
["a" should cause the constructor to throw]
expected: FAIL
[no input should cause the constructor to throw]
expected: FAIL
[non-string input should cause the constructor to throw]
expected: FAIL

Просмотреть файл

@ -1,114 +0,0 @@
[compression-including-empty-chunk.tentative.any.sharedworker.html]
[the result of compressing [Hello,,Hello\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,,Hello\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,,Hello\] with deflate-raw should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with deflate-raw should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with deflate-raw should be 'HelloHello']
expected: FAIL
[compression-including-empty-chunk.tentative.any.html]
[the result of compressing [Hello,,Hello\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,,Hello\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,,Hello\] with deflate-raw should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with deflate-raw should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with deflate-raw should be 'HelloHello']
expected: FAIL
[compression-including-empty-chunk.tentative.any.serviceworker.html]
[the result of compressing [Hello,,Hello\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,,Hello\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,,Hello\] with deflate-raw should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with deflate-raw should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with deflate-raw should be 'HelloHello']
expected: FAIL
[compression-including-empty-chunk.tentative.any.worker.html]
[the result of compressing [Hello,,Hello\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with deflate should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,,Hello\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with gzip should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,,Hello\] with deflate-raw should be 'HelloHello']
expected: FAIL
[the result of compressing [Hello,Hello,\] with deflate-raw should be 'HelloHello']
expected: FAIL
[the result of compressing [,Hello,Hello\] with deflate-raw should be 'HelloHello']
expected: FAIL

Просмотреть файл

@ -1,546 +0,0 @@
[compression-multiple-chunks.tentative.any.worker.html]
[compressing 2 chunks with gzip should work]
expected: FAIL
[compressing 5 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with gzip should work]
expected: FAIL
[compressing 16 chunks with gzip should work]
expected: FAIL
[compressing 3 chunks with deflate should work]
expected: FAIL
[compressing 14 chunks with gzip should work]
expected: FAIL
[compressing 4 chunks with gzip should work]
expected: FAIL
[compressing 2 chunks with deflate should work]
expected: FAIL
[compressing 7 chunks with gzip should work]
expected: FAIL
[compressing 10 chunks with deflate should work]
expected: FAIL
[compressing 14 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with deflate should work]
expected: FAIL
[compressing 11 chunks with deflate should work]
expected: FAIL
[compressing 3 chunks with gzip should work]
expected: FAIL
[compressing 12 chunks with deflate should work]
expected: FAIL
[compressing 15 chunks with deflate should work]
expected: FAIL
[compressing 6 chunks with deflate should work]
expected: FAIL
[compressing 13 chunks with gzip should work]
expected: FAIL
[compressing 8 chunks with deflate should work]
expected: FAIL
[compressing 5 chunks with gzip should work]
expected: FAIL
[compressing 16 chunks with deflate should work]
expected: FAIL
[compressing 12 chunks with gzip should work]
expected: FAIL
[compressing 13 chunks with deflate should work]
expected: FAIL
[compressing 15 chunks with gzip should work]
expected: FAIL
[compressing 6 chunks with gzip should work]
expected: FAIL
[compressing 4 chunks with deflate should work]
expected: FAIL
[compressing 10 chunks with gzip should work]
expected: FAIL
[compressing 11 chunks with gzip should work]
expected: FAIL
[compressing 8 chunks with gzip should work]
expected: FAIL
[compressing 7 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with deflate-raw should work]
expected: FAIL
[compressing 6 chunks with deflate-raw should work]
expected: FAIL
[compressing 10 chunks with deflate-raw should work]
expected: FAIL
[compressing 7 chunks with deflate-raw should work]
expected: FAIL
[compressing 11 chunks with deflate-raw should work]
expected: FAIL
[compressing 4 chunks with deflate-raw should work]
expected: FAIL
[compressing 13 chunks with deflate-raw should work]
expected: FAIL
[compressing 12 chunks with deflate-raw should work]
expected: FAIL
[compressing 15 chunks with deflate-raw should work]
expected: FAIL
[compressing 3 chunks with deflate-raw should work]
expected: FAIL
[compressing 8 chunks with deflate-raw should work]
expected: FAIL
[compressing 5 chunks with deflate-raw should work]
expected: FAIL
[compressing 2 chunks with deflate-raw should work]
expected: FAIL
[compressing 16 chunks with deflate-raw should work]
expected: FAIL
[compressing 14 chunks with deflate-raw should work]
expected: FAIL
[compression-multiple-chunks.tentative.any.sharedworker.html]
[compressing 2 chunks with gzip should work]
expected: FAIL
[compressing 5 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with gzip should work]
expected: FAIL
[compressing 16 chunks with gzip should work]
expected: FAIL
[compressing 3 chunks with deflate should work]
expected: FAIL
[compressing 14 chunks with gzip should work]
expected: FAIL
[compressing 4 chunks with gzip should work]
expected: FAIL
[compressing 2 chunks with deflate should work]
expected: FAIL
[compressing 7 chunks with gzip should work]
expected: FAIL
[compressing 10 chunks with deflate should work]
expected: FAIL
[compressing 14 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with deflate should work]
expected: FAIL
[compressing 11 chunks with deflate should work]
expected: FAIL
[compressing 3 chunks with gzip should work]
expected: FAIL
[compressing 12 chunks with deflate should work]
expected: FAIL
[compressing 15 chunks with deflate should work]
expected: FAIL
[compressing 6 chunks with deflate should work]
expected: FAIL
[compressing 13 chunks with gzip should work]
expected: FAIL
[compressing 8 chunks with deflate should work]
expected: FAIL
[compressing 5 chunks with gzip should work]
expected: FAIL
[compressing 16 chunks with deflate should work]
expected: FAIL
[compressing 12 chunks with gzip should work]
expected: FAIL
[compressing 13 chunks with deflate should work]
expected: FAIL
[compressing 15 chunks with gzip should work]
expected: FAIL
[compressing 6 chunks with gzip should work]
expected: FAIL
[compressing 4 chunks with deflate should work]
expected: FAIL
[compressing 10 chunks with gzip should work]
expected: FAIL
[compressing 11 chunks with gzip should work]
expected: FAIL
[compressing 8 chunks with gzip should work]
expected: FAIL
[compressing 7 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with deflate-raw should work]
expected: FAIL
[compressing 6 chunks with deflate-raw should work]
expected: FAIL
[compressing 10 chunks with deflate-raw should work]
expected: FAIL
[compressing 7 chunks with deflate-raw should work]
expected: FAIL
[compressing 11 chunks with deflate-raw should work]
expected: FAIL
[compressing 4 chunks with deflate-raw should work]
expected: FAIL
[compressing 13 chunks with deflate-raw should work]
expected: FAIL
[compressing 12 chunks with deflate-raw should work]
expected: FAIL
[compressing 15 chunks with deflate-raw should work]
expected: FAIL
[compressing 3 chunks with deflate-raw should work]
expected: FAIL
[compressing 8 chunks with deflate-raw should work]
expected: FAIL
[compressing 5 chunks with deflate-raw should work]
expected: FAIL
[compressing 2 chunks with deflate-raw should work]
expected: FAIL
[compressing 16 chunks with deflate-raw should work]
expected: FAIL
[compressing 14 chunks with deflate-raw should work]
expected: FAIL
[compression-multiple-chunks.tentative.any.html]
[compressing 2 chunks with gzip should work]
expected: FAIL
[compressing 5 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with gzip should work]
expected: FAIL
[compressing 16 chunks with gzip should work]
expected: FAIL
[compressing 3 chunks with deflate should work]
expected: FAIL
[compressing 14 chunks with gzip should work]
expected: FAIL
[compressing 4 chunks with gzip should work]
expected: FAIL
[compressing 2 chunks with deflate should work]
expected: FAIL
[compressing 7 chunks with gzip should work]
expected: FAIL
[compressing 10 chunks with deflate should work]
expected: FAIL
[compressing 14 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with deflate should work]
expected: FAIL
[compressing 11 chunks with deflate should work]
expected: FAIL
[compressing 3 chunks with gzip should work]
expected: FAIL
[compressing 12 chunks with deflate should work]
expected: FAIL
[compressing 15 chunks with deflate should work]
expected: FAIL
[compressing 6 chunks with deflate should work]
expected: FAIL
[compressing 13 chunks with gzip should work]
expected: FAIL
[compressing 8 chunks with deflate should work]
expected: FAIL
[compressing 5 chunks with gzip should work]
expected: FAIL
[compressing 16 chunks with deflate should work]
expected: FAIL
[compressing 12 chunks with gzip should work]
expected: FAIL
[compressing 13 chunks with deflate should work]
expected: FAIL
[compressing 15 chunks with gzip should work]
expected: FAIL
[compressing 6 chunks with gzip should work]
expected: FAIL
[compressing 4 chunks with deflate should work]
expected: FAIL
[compressing 10 chunks with gzip should work]
expected: FAIL
[compressing 11 chunks with gzip should work]
expected: FAIL
[compressing 8 chunks with gzip should work]
expected: FAIL
[compressing 7 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with deflate-raw should work]
expected: FAIL
[compressing 6 chunks with deflate-raw should work]
expected: FAIL
[compressing 10 chunks with deflate-raw should work]
expected: FAIL
[compressing 7 chunks with deflate-raw should work]
expected: FAIL
[compressing 11 chunks with deflate-raw should work]
expected: FAIL
[compressing 4 chunks with deflate-raw should work]
expected: FAIL
[compressing 13 chunks with deflate-raw should work]
expected: FAIL
[compressing 12 chunks with deflate-raw should work]
expected: FAIL
[compressing 15 chunks with deflate-raw should work]
expected: FAIL
[compressing 3 chunks with deflate-raw should work]
expected: FAIL
[compressing 8 chunks with deflate-raw should work]
expected: FAIL
[compressing 5 chunks with deflate-raw should work]
expected: FAIL
[compressing 2 chunks with deflate-raw should work]
expected: FAIL
[compressing 16 chunks with deflate-raw should work]
expected: FAIL
[compressing 14 chunks with deflate-raw should work]
expected: FAIL
[compression-multiple-chunks.tentative.any.serviceworker.html]
[compressing 2 chunks with gzip should work]
expected: FAIL
[compressing 5 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with gzip should work]
expected: FAIL
[compressing 16 chunks with gzip should work]
expected: FAIL
[compressing 3 chunks with deflate should work]
expected: FAIL
[compressing 14 chunks with gzip should work]
expected: FAIL
[compressing 4 chunks with gzip should work]
expected: FAIL
[compressing 2 chunks with deflate should work]
expected: FAIL
[compressing 7 chunks with gzip should work]
expected: FAIL
[compressing 10 chunks with deflate should work]
expected: FAIL
[compressing 14 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with deflate should work]
expected: FAIL
[compressing 11 chunks with deflate should work]
expected: FAIL
[compressing 3 chunks with gzip should work]
expected: FAIL
[compressing 12 chunks with deflate should work]
expected: FAIL
[compressing 15 chunks with deflate should work]
expected: FAIL
[compressing 6 chunks with deflate should work]
expected: FAIL
[compressing 13 chunks with gzip should work]
expected: FAIL
[compressing 8 chunks with deflate should work]
expected: FAIL
[compressing 5 chunks with gzip should work]
expected: FAIL
[compressing 16 chunks with deflate should work]
expected: FAIL
[compressing 12 chunks with gzip should work]
expected: FAIL
[compressing 13 chunks with deflate should work]
expected: FAIL
[compressing 15 chunks with gzip should work]
expected: FAIL
[compressing 6 chunks with gzip should work]
expected: FAIL
[compressing 4 chunks with deflate should work]
expected: FAIL
[compressing 10 chunks with gzip should work]
expected: FAIL
[compressing 11 chunks with gzip should work]
expected: FAIL
[compressing 8 chunks with gzip should work]
expected: FAIL
[compressing 7 chunks with deflate should work]
expected: FAIL
[compressing 9 chunks with deflate-raw should work]
expected: FAIL
[compressing 6 chunks with deflate-raw should work]
expected: FAIL
[compressing 10 chunks with deflate-raw should work]
expected: FAIL
[compressing 7 chunks with deflate-raw should work]
expected: FAIL
[compressing 11 chunks with deflate-raw should work]
expected: FAIL
[compressing 4 chunks with deflate-raw should work]
expected: FAIL
[compressing 13 chunks with deflate-raw should work]
expected: FAIL
[compressing 12 chunks with deflate-raw should work]
expected: FAIL
[compressing 15 chunks with deflate-raw should work]
expected: FAIL
[compressing 3 chunks with deflate-raw should work]
expected: FAIL
[compressing 8 chunks with deflate-raw should work]
expected: FAIL
[compressing 5 chunks with deflate-raw should work]
expected: FAIL
[compressing 2 chunks with deflate-raw should work]
expected: FAIL
[compressing 16 chunks with deflate-raw should work]
expected: FAIL
[compressing 14 chunks with deflate-raw should work]
expected: FAIL

Просмотреть файл

@ -1,42 +0,0 @@
[compression-output-length.tentative.any.html]
[the length of gzipped data should be shorter than that of the original data]
expected: FAIL
[the length of deflated data should be shorter than that of the original data]
expected: FAIL
[the length of deflated (with -raw) data should be shorter than that of the original data]
expected: FAIL
[compression-output-length.tentative.any.worker.html]
[the length of gzipped data should be shorter than that of the original data]
expected: FAIL
[the length of deflated data should be shorter than that of the original data]
expected: FAIL
[the length of deflated (with -raw) data should be shorter than that of the original data]
expected: FAIL
[compression-output-length.tentative.any.serviceworker.html]
[the length of gzipped data should be shorter than that of the original data]
expected: FAIL
[the length of deflated data should be shorter than that of the original data]
expected: FAIL
[the length of deflated (with -raw) data should be shorter than that of the original data]
expected: FAIL
[compression-output-length.tentative.any.sharedworker.html]
[the length of gzipped data should be shorter than that of the original data]
expected: FAIL
[the length of deflated data should be shorter than that of the original data]
expected: FAIL
[the length of deflated (with -raw) data should be shorter than that of the original data]
expected: FAIL

Просмотреть файл

@ -1,91 +0,0 @@
[compression-stream.tentative.any.html]
[gzipped empty data should be reinflated back to its origin]
expected: FAIL
[deflated empty data should be reinflated back to its origin]
expected: FAIL
[deflated small amount data should be reinflated back to its origin]
expected: FAIL
[gzipped small amount data should be reinflated back to its origin]
expected: FAIL
[deflated large amount data should be reinflated back to its origin]
expected: FAIL
[gzipped large amount data should be reinflated back to its origin]
expected: FAIL
[CompressionStream constructor should throw on invalid format]
expected: FAIL
[compression-stream.tentative.any.worker.html]
[gzipped empty data should be reinflated back to its origin]
expected: FAIL
[deflated empty data should be reinflated back to its origin]
expected: FAIL
[deflated small amount data should be reinflated back to its origin]
expected: FAIL
[gzipped small amount data should be reinflated back to its origin]
expected: FAIL
[deflated large amount data should be reinflated back to its origin]
expected: FAIL
[gzipped large amount data should be reinflated back to its origin]
expected: FAIL
[CompressionStream constructor should throw on invalid format]
expected: FAIL
[compression-stream.tentative.any.serviceworker.html]
[gzipped empty data should be reinflated back to its origin]
expected: FAIL
[deflated empty data should be reinflated back to its origin]
expected: FAIL
[deflated small amount data should be reinflated back to its origin]
expected: FAIL
[gzipped small amount data should be reinflated back to its origin]
expected: FAIL
[deflated large amount data should be reinflated back to its origin]
expected: FAIL
[gzipped large amount data should be reinflated back to its origin]
expected: FAIL
[CompressionStream constructor should throw on invalid format]
expected: FAIL
[compression-stream.tentative.any.sharedworker.html]
[gzipped empty data should be reinflated back to its origin]
expected: FAIL
[deflated empty data should be reinflated back to its origin]
expected: FAIL
[deflated small amount data should be reinflated back to its origin]
expected: FAIL
[gzipped small amount data should be reinflated back to its origin]
expected: FAIL
[deflated large amount data should be reinflated back to its origin]
expected: FAIL
[gzipped large amount data should be reinflated back to its origin]
expected: FAIL
[CompressionStream constructor should throw on invalid format]
expected: FAIL

Просмотреть файл

@ -1,4 +0,0 @@
[compression-with-detach.tentative.window.html]
[data should be correctly compressed even if input is detached partway]
expected: FAIL

Просмотреть файл

@ -1,330 +0,0 @@
[decompression-bad-chunks.tentative.any.html]
[chunk of type array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate]
expected: FAIL
[chunk of type array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for deflate]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for gzip]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for gzip]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for gzip]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for deflate]
expected: FAIL
[chunk of type undefined should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for gzip]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate-raw]
expected: FAIL
[chunk of type undefined should error the stream for deflate-raw]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate-raw]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate-raw]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for deflate-raw]
expected: FAIL
[chunk of type numeric should error the stream for deflate-raw]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for deflate-raw]
expected: FAIL
[chunk of type array should error the stream for deflate-raw]
expected: FAIL
[chunk of type null should error the stream for deflate-raw]
expected: FAIL
[decompression-bad-chunks.tentative.any.worker.html]
[chunk of type array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate]
expected: FAIL
[chunk of type array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for deflate]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for gzip]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for gzip]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for gzip]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for deflate]
expected: FAIL
[chunk of type undefined should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for gzip]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate-raw]
expected: FAIL
[chunk of type undefined should error the stream for deflate-raw]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate-raw]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate-raw]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for deflate-raw]
expected: FAIL
[chunk of type numeric should error the stream for deflate-raw]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for deflate-raw]
expected: FAIL
[chunk of type array should error the stream for deflate-raw]
expected: FAIL
[chunk of type null should error the stream for deflate-raw]
expected: FAIL
[decompression-bad-chunks.tentative.any.serviceworker.html]
[chunk of type array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate]
expected: FAIL
[chunk of type array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for deflate]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for gzip]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for gzip]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for gzip]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for deflate]
expected: FAIL
[chunk of type undefined should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for gzip]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate-raw]
expected: FAIL
[chunk of type undefined should error the stream for deflate-raw]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate-raw]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate-raw]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for deflate-raw]
expected: FAIL
[chunk of type numeric should error the stream for deflate-raw]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for deflate-raw]
expected: FAIL
[chunk of type array should error the stream for deflate-raw]
expected: FAIL
[chunk of type null should error the stream for deflate-raw]
expected: FAIL
[decompression-bad-chunks.tentative.any.sharedworker.html]
[chunk of type array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate]
expected: FAIL
[chunk of type array should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for deflate]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for gzip]
expected: FAIL
[chunk of type undefined should error the stream for gzip]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for gzip]
expected: FAIL
[chunk of type numeric should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for gzip]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for gzip]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for gzip]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for deflate]
expected: FAIL
[chunk of type undefined should error the stream for deflate]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for deflate]
expected: FAIL
[chunk of type null should error the stream for gzip]
expected: FAIL
[chunk of type shared Uint8Array should error the stream for deflate-raw]
expected: FAIL
[chunk of type undefined should error the stream for deflate-raw]
expected: FAIL
[chunk of type object, not BufferSource should error the stream for deflate-raw]
expected: FAIL
[chunk of type SharedArrayBuffer should error the stream for deflate-raw]
expected: FAIL
[chunk of type invalid gzip bytes should error the stream for deflate-raw]
expected: FAIL
[chunk of type numeric should error the stream for deflate-raw]
expected: FAIL
[chunk of type invalid deflate bytes should error the stream for deflate-raw]
expected: FAIL
[chunk of type array should error the stream for deflate-raw]
expected: FAIL
[chunk of type null should error the stream for deflate-raw]
expected: FAIL

Просмотреть файл

@ -1,404 +0,0 @@
[decompression-buffersource.tentative.any.serviceworker.html]
expected:
if os == "win": [OK, TIMEOUT]
[chunk of type Int8Array should work for gzip]
expected: FAIL
[chunk of type Float64Array should work for deflate]
expected: FAIL
[chunk of type ArrayBuffer should work for deflate]
expected: FAIL
[chunk of type Float64Array should work for gzip]
expected: FAIL
[chunk of type Int32Array should work for deflate]
expected: FAIL
[chunk of type Int16Array should work for gzip]
expected: FAIL
[chunk of type Float32Array should work for deflate]
expected: FAIL
[chunk of type DataView should work for gzip]
expected: FAIL
[chunk of type Uint8ClambedArray should work for gzip]
expected: FAIL
[chunk of type Uint8Array should work for gzip]
expected: FAIL
[chunk of type Uint32Array should work for gzip]
expected: FAIL
[chunk of type Int32Array should work for gzip]
expected: FAIL
[chunk of type Int16Array should work for deflate]
expected: FAIL
[chunk of type Uint16Array should work for deflate]
expected: FAIL
[chunk of type Float32Array should work for gzip]
expected: FAIL
[chunk of type Uint8Array should work for deflate]
expected: FAIL
[chunk of type Int8Array should work for deflate]
expected: FAIL
[chunk of type Uint16Array should work for gzip]
expected: FAIL
[chunk of type ArrayBuffer should work for gzip]
expected: FAIL
[chunk of type DataView should work for deflate]
expected: FAIL
[chunk of type Uint8ClampedArray should work for deflate]
expected: FAIL
[chunk of type Uint32Array should work for deflate]
expected: FAIL
[chunk of type DataView should work for deflate-raw]
expected: FAIL
[chunk of type Uint16Array should work for deflate-raw]
expected: FAIL
[chunk of type Int32Array should work for deflate-raw]
expected: FAIL
[chunk of type Float32Array should work for deflate-raw]
expected: FAIL
[chunk of type ArrayBuffer should work for deflate-raw]
expected: FAIL
[chunk of type Int16Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint32Array should work for deflate-raw]
expected: FAIL
[chunk of type Float64Array should work for deflate-raw]
expected: FAIL
[chunk of type Int8Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint8Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint8ClampedArray should work for deflate-raw]
expected: FAIL
[decompression-buffersource.tentative.any.sharedworker.html]
[chunk of type Int8Array should work for gzip]
expected: FAIL
[chunk of type Float64Array should work for deflate]
expected: FAIL
[chunk of type ArrayBuffer should work for deflate]
expected: FAIL
[chunk of type Float64Array should work for gzip]
expected: FAIL
[chunk of type Int32Array should work for deflate]
expected: FAIL
[chunk of type Int16Array should work for gzip]
expected: FAIL
[chunk of type Float32Array should work for deflate]
expected: FAIL
[chunk of type DataView should work for gzip]
expected: FAIL
[chunk of type Uint8ClambedArray should work for gzip]
expected: FAIL
[chunk of type Uint8Array should work for gzip]
expected: FAIL
[chunk of type Uint32Array should work for gzip]
expected: FAIL
[chunk of type Int32Array should work for gzip]
expected: FAIL
[chunk of type Int16Array should work for deflate]
expected: FAIL
[chunk of type Uint16Array should work for deflate]
expected: FAIL
[chunk of type Float32Array should work for gzip]
expected: FAIL
[chunk of type Uint8Array should work for deflate]
expected: FAIL
[chunk of type Int8Array should work for deflate]
expected: FAIL
[chunk of type Uint16Array should work for gzip]
expected: FAIL
[chunk of type ArrayBuffer should work for gzip]
expected: FAIL
[chunk of type DataView should work for deflate]
expected: FAIL
[chunk of type Uint8ClampedArray should work for deflate]
expected: FAIL
[chunk of type Uint32Array should work for deflate]
expected: FAIL
[chunk of type DataView should work for deflate-raw]
expected: FAIL
[chunk of type Uint16Array should work for deflate-raw]
expected: FAIL
[chunk of type Int32Array should work for deflate-raw]
expected: FAIL
[chunk of type Float32Array should work for deflate-raw]
expected: FAIL
[chunk of type ArrayBuffer should work for deflate-raw]
expected: FAIL
[chunk of type Int16Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint32Array should work for deflate-raw]
expected: FAIL
[chunk of type Float64Array should work for deflate-raw]
expected: FAIL
[chunk of type Int8Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint8Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint8ClampedArray should work for deflate-raw]
expected: FAIL
[decompression-buffersource.tentative.any.html]
[chunk of type Int8Array should work for gzip]
expected: FAIL
[chunk of type Float64Array should work for deflate]
expected: FAIL
[chunk of type ArrayBuffer should work for deflate]
expected: FAIL
[chunk of type Float64Array should work for gzip]
expected: FAIL
[chunk of type Int32Array should work for deflate]
expected: FAIL
[chunk of type Int16Array should work for gzip]
expected: FAIL
[chunk of type Float32Array should work for deflate]
expected: FAIL
[chunk of type DataView should work for gzip]
expected: FAIL
[chunk of type Uint8ClambedArray should work for gzip]
expected: FAIL
[chunk of type Uint8Array should work for gzip]
expected: FAIL
[chunk of type Uint32Array should work for gzip]
expected: FAIL
[chunk of type Int32Array should work for gzip]
expected: FAIL
[chunk of type Int16Array should work for deflate]
expected: FAIL
[chunk of type Uint16Array should work for deflate]
expected: FAIL
[chunk of type Float32Array should work for gzip]
expected: FAIL
[chunk of type Uint8Array should work for deflate]
expected: FAIL
[chunk of type Int8Array should work for deflate]
expected: FAIL
[chunk of type Uint16Array should work for gzip]
expected: FAIL
[chunk of type ArrayBuffer should work for gzip]
expected: FAIL
[chunk of type DataView should work for deflate]
expected: FAIL
[chunk of type Uint8ClampedArray should work for deflate]
expected: FAIL
[chunk of type Uint32Array should work for deflate]
expected: FAIL
[chunk of type DataView should work for deflate-raw]
expected: FAIL
[chunk of type Uint16Array should work for deflate-raw]
expected: FAIL
[chunk of type Int32Array should work for deflate-raw]
expected: FAIL
[chunk of type Float32Array should work for deflate-raw]
expected: FAIL
[chunk of type ArrayBuffer should work for deflate-raw]
expected: FAIL
[chunk of type Int16Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint32Array should work for deflate-raw]
expected: FAIL
[chunk of type Float64Array should work for deflate-raw]
expected: FAIL
[chunk of type Int8Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint8Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint8ClampedArray should work for deflate-raw]
expected: FAIL
[decompression-buffersource.tentative.any.worker.html]
[chunk of type Int8Array should work for gzip]
expected: FAIL
[chunk of type Float64Array should work for deflate]
expected: FAIL
[chunk of type ArrayBuffer should work for deflate]
expected: FAIL
[chunk of type Float64Array should work for gzip]
expected: FAIL
[chunk of type Int32Array should work for deflate]
expected: FAIL
[chunk of type Int16Array should work for gzip]
expected: FAIL
[chunk of type Float32Array should work for deflate]
expected: FAIL
[chunk of type DataView should work for gzip]
expected: FAIL
[chunk of type Uint8ClambedArray should work for gzip]
expected: FAIL
[chunk of type Uint8Array should work for gzip]
expected: FAIL
[chunk of type Uint32Array should work for gzip]
expected: FAIL
[chunk of type Int32Array should work for gzip]
expected: FAIL
[chunk of type Int16Array should work for deflate]
expected: FAIL
[chunk of type Uint16Array should work for deflate]
expected: FAIL
[chunk of type Float32Array should work for gzip]
expected: FAIL
[chunk of type Uint8Array should work for deflate]
expected: FAIL
[chunk of type Int8Array should work for deflate]
expected: FAIL
[chunk of type Uint16Array should work for gzip]
expected: FAIL
[chunk of type ArrayBuffer should work for gzip]
expected: FAIL
[chunk of type DataView should work for deflate]
expected: FAIL
[chunk of type Uint8ClampedArray should work for deflate]
expected: FAIL
[chunk of type Uint32Array should work for deflate]
expected: FAIL
[chunk of type DataView should work for deflate-raw]
expected: FAIL
[chunk of type Uint16Array should work for deflate-raw]
expected: FAIL
[chunk of type Int32Array should work for deflate-raw]
expected: FAIL
[chunk of type Float32Array should work for deflate-raw]
expected: FAIL
[chunk of type ArrayBuffer should work for deflate-raw]
expected: FAIL
[chunk of type Int16Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint32Array should work for deflate-raw]
expected: FAIL
[chunk of type Float64Array should work for deflate-raw]
expected: FAIL
[chunk of type Int8Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint8Array should work for deflate-raw]
expected: FAIL
[chunk of type Uint8ClampedArray should work for deflate-raw]
expected: FAIL

Просмотреть файл

@ -1,43 +0,0 @@
[decompression-constructor-error.tentative.any.serviceworker.html]
[non-string input should cause the constructor to throw]
expected: FAIL
["a" should cause the constructor to throw]
expected: FAIL
[no input should cause the constructor to throw]
expected: FAIL
[decompression-constructor-error.tentative.any.sharedworker.html]
[non-string input should cause the constructor to throw]
expected: FAIL
["a" should cause the constructor to throw]
expected: FAIL
[no input should cause the constructor to throw]
expected: FAIL
[decompression-constructor-error.tentative.any.worker.html]
[non-string input should cause the constructor to throw]
expected: FAIL
["a" should cause the constructor to throw]
expected: FAIL
[no input should cause the constructor to throw]
expected: FAIL
[decompression-constructor-error.tentative.any.html]
[non-string input should cause the constructor to throw]
expected: FAIL
["a" should cause the constructor to throw]
expected: FAIL
[no input should cause the constructor to throw]
expected: FAIL

Просмотреть файл

@ -1,42 +0,0 @@
[decompression-correct-input.tentative.any.serviceworker.html]
[decompressing gzip input should work]
expected: FAIL
[decompressing deflated input should work]
expected: FAIL
[decompressing deflated (with -raw) input should work]
expected: FAIL
[decompression-correct-input.tentative.any.sharedworker.html]
[decompressing gzip input should work]
expected: FAIL
[decompressing deflated input should work]
expected: FAIL
[decompressing deflated (with -raw) input should work]
expected: FAIL
[decompression-correct-input.tentative.any.worker.html]
[decompressing gzip input should work]
expected: FAIL
[decompressing deflated input should work]
expected: FAIL
[decompressing deflated (with -raw) input should work]
expected: FAIL
[decompression-correct-input.tentative.any.html]
[decompressing gzip input should work]
expected: FAIL
[decompressing deflated input should work]
expected: FAIL
[decompressing deflated (with -raw) input should work]
expected: FAIL

Просмотреть файл

@ -1,153 +0,0 @@
[decompression-corrupt-input.tentative.any.html]
[format 'gzip' field OS should be success for 128]
expected: FAIL
[the unchanged input for 'deflate' should decompress successfully]
expected: FAIL
[format 'gzip' field FLG should be error for 2]
expected: FAIL
[trailing junk for 'deflate' should give an error]
expected: FAIL
[format 'deflate' field FLG should be success for 218]
expected: FAIL
[the unchanged input for 'gzip' should decompress successfully]
expected: FAIL
[format 'gzip' field DATA should be error for 3]
expected: FAIL
[format 'deflate' field CMF should be error for 0]
expected: FAIL
[format 'gzip' field XFL should be success for 255]
expected: FAIL
[format 'gzip' field DATA should be success for 4]
expected: FAIL
[format 'gzip' field MTIME should be success for 255]
expected: FAIL
[truncating the input for 'deflate' should give an error]
expected: FAIL
[format 'deflate' field ADLER should be error for 255]
expected: FAIL
[format 'deflate' field FLG should be error for 157]
expected: FAIL
[format 'deflate' field DATA should be error for 5]
expected: FAIL
[format 'gzip' field CM should be error for 0]
expected: FAIL
[format 'gzip' field ID should be error for 255]
expected: FAIL
[format 'gzip' field FLG should be success for 1]
expected: FAIL
[format 'deflate' field FLG should be success for 94]
expected: FAIL
[format 'deflate' field FLG should be success for 1]
expected: FAIL
[format 'gzip' field ISIZE should be error for 1]
expected: FAIL
[trailing junk for 'gzip' should give an error]
expected: FAIL
[truncating the input for 'gzip' should give an error]
expected: FAIL
[format 'gzip' field CRC should be error for 0]
expected: FAIL
[format 'deflate' field DATA should be success for 4]
expected: FAIL
[decompression-corrupt-input.tentative.any.worker.html]
[format 'gzip' field OS should be success for 128]
expected: FAIL
[the unchanged input for 'deflate' should decompress successfully]
expected: FAIL
[format 'gzip' field FLG should be error for 2]
expected: FAIL
[trailing junk for 'deflate' should give an error]
expected: FAIL
[format 'deflate' field FLG should be success for 218]
expected: FAIL
[the unchanged input for 'gzip' should decompress successfully]
expected: FAIL
[format 'gzip' field DATA should be error for 3]
expected: FAIL
[format 'deflate' field CMF should be error for 0]
expected: FAIL
[format 'gzip' field XFL should be success for 255]
expected: FAIL
[format 'gzip' field DATA should be success for 4]
expected: FAIL
[format 'gzip' field MTIME should be success for 255]
expected: FAIL
[truncating the input for 'deflate' should give an error]
expected: FAIL
[format 'deflate' field ADLER should be error for 255]
expected: FAIL
[format 'deflate' field FLG should be error for 157]
expected: FAIL
[format 'deflate' field DATA should be error for 5]
expected: FAIL
[format 'gzip' field CM should be error for 0]
expected: FAIL
[format 'gzip' field ID should be error for 255]
expected: FAIL
[format 'gzip' field FLG should be success for 1]
expected: FAIL
[format 'deflate' field FLG should be success for 94]
expected: FAIL
[format 'deflate' field FLG should be success for 1]
expected: FAIL
[format 'gzip' field ISIZE should be error for 1]
expected: FAIL
[trailing junk for 'gzip' should give an error]
expected: FAIL
[truncating the input for 'gzip' should give an error]
expected: FAIL
[format 'gzip' field CRC should be error for 0]
expected: FAIL
[format 'deflate' field DATA should be success for 4]
expected: FAIL

Просмотреть файл

@ -1,42 +0,0 @@
[decompression-empty-input.tentative.any.serviceworker.html]
[decompressing gzip empty input should work]
expected: FAIL
[decompressing deflate empty input should work]
expected: FAIL
[decompressing deflate-raw empty input should work]
expected: FAIL
[decompression-empty-input.tentative.any.sharedworker.html]
[decompressing gzip empty input should work]
expected: FAIL
[decompressing deflate empty input should work]
expected: FAIL
[decompressing deflate-raw empty input should work]
expected: FAIL
[decompression-empty-input.tentative.any.html]
[decompressing gzip empty input should work]
expected: FAIL
[decompressing deflate empty input should work]
expected: FAIL
[decompressing deflate-raw empty input should work]
expected: FAIL
[decompression-empty-input.tentative.any.worker.html]
[decompressing gzip empty input should work]
expected: FAIL
[decompressing deflate empty input should work]
expected: FAIL
[decompressing deflate-raw empty input should work]
expected: FAIL

Просмотреть файл

@ -1,546 +0,0 @@
[decompression-split-chunk.tentative.any.html]
[decompressing splitted chunk into pieces of size 1 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 1 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 1 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in deflate-raw]
expected: FAIL
[decompression-split-chunk.tentative.any.worker.html]
[decompressing splitted chunk into pieces of size 1 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 1 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 1 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in deflate-raw]
expected: FAIL
[decompression-split-chunk.tentative.any.sharedworker.html]
[decompressing splitted chunk into pieces of size 1 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 1 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 1 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in deflate-raw]
expected: FAIL
[decompression-split-chunk.tentative.any.serviceworker.html]
[decompressing splitted chunk into pieces of size 1 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 1 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in deflate]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in gzip]
expected: FAIL
[decompressing splitted chunk into pieces of size 5 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 1 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 6 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 14 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 8 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 13 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 9 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 10 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 12 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 2 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 7 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 4 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 15 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 11 should work in deflate-raw]
expected: FAIL
[decompressing splitted chunk into pieces of size 3 should work in deflate-raw]
expected: FAIL

Просмотреть файл

@ -1,31 +0,0 @@
[decompression-uint8array-output.tentative.any.worker.html]
[decompressing gzip output should give Uint8Array chunks]
expected: FAIL
[decompressing deflated output should give Uint8Array chunks]
expected: FAIL
[decompression-uint8array-output.tentative.any.serviceworker.html]
[decompressing gzip output should give Uint8Array chunks]
expected: FAIL
[decompressing deflated output should give Uint8Array chunks]
expected: FAIL
[decompression-uint8array-output.tentative.any.html]
[decompressing gzip output should give Uint8Array chunks]
expected: FAIL
[decompressing deflated output should give Uint8Array chunks]
expected: FAIL
[decompression-uint8array-output.tentative.any.sharedworker.html]
[decompressing gzip output should give Uint8Array chunks]
expected: FAIL
[decompressing deflated output should give Uint8Array chunks]
expected: FAIL

Просмотреть файл

@ -1,4 +0,0 @@
[decompression-with-detach.tentative.window.html]
[data should be correctly decompressed even if input is detached partway]
expected: FAIL

Просмотреть файл

@ -1,37 +1,2 @@
[idlharness-shadowrealm.window.html]
prefs: [javascript.options.experimental.shadow_realms:true]
[CompressionStream interface: existence and properties of interface object]
expected: FAIL
[CompressionStream interface object length]
expected: FAIL
[CompressionStream interface object name]
expected: FAIL
[CompressionStream interface: existence and properties of interface prototype object]
expected: FAIL
[CompressionStream interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[CompressionStream interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[DecompressionStream interface: existence and properties of interface object]
expected: FAIL
[DecompressionStream interface object length]
expected: FAIL
[DecompressionStream interface object name]
expected: FAIL
[DecompressionStream interface: existence and properties of interface prototype object]
expected: FAIL
[DecompressionStream interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[DecompressionStream interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL

Просмотреть файл

@ -1,99 +0,0 @@
[idlharness.https.any.html]
[CompressionStream interface: existence and properties of interface prototype object]
expected: FAIL
[DecompressionStream interface: existence and properties of interface prototype object]
expected: FAIL
[DecompressionStream interface object name]
expected: FAIL
[CompressionStream interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[CompressionStream must be primary interface of new CompressionStream("deflate")]
expected: FAIL
[CompressionStream interface object name]
expected: FAIL
[DecompressionStream must be primary interface of new DecompressionStream("deflate")]
expected: FAIL
[DecompressionStream interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[CompressionStream interface: existence and properties of interface object]
expected: FAIL
[Stringification of new CompressionStream("deflate")]
expected: FAIL
[DecompressionStream interface object length]
expected: FAIL
[CompressionStream interface object length]
expected: FAIL
[Stringification of new DecompressionStream("deflate")]
expected: FAIL
[DecompressionStream interface: existence and properties of interface object]
expected: FAIL
[CompressionStream interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[DecompressionStream interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[idlharness.https.any.worker.html]
[CompressionStream interface: existence and properties of interface prototype object]
expected: FAIL
[DecompressionStream interface: existence and properties of interface prototype object]
expected: FAIL
[DecompressionStream interface object name]
expected: FAIL
[CompressionStream interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[CompressionStream must be primary interface of new CompressionStream("deflate")]
expected: FAIL
[CompressionStream interface object name]
expected: FAIL
[DecompressionStream must be primary interface of new DecompressionStream("deflate")]
expected: FAIL
[DecompressionStream interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[CompressionStream interface: existence and properties of interface object]
expected: FAIL
[Stringification of new CompressionStream("deflate")]
expected: FAIL
[DecompressionStream interface object length]
expected: FAIL
[CompressionStream interface object length]
expected: FAIL
[Stringification of new DecompressionStream("deflate")]
expected: FAIL
[DecompressionStream interface: existence and properties of interface object]
expected: FAIL
[CompressionStream interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[DecompressionStream interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL

Просмотреть файл

@ -242,7 +242,11 @@ async function tryDecompress(input, format) {
}
out = out.concat(Array.from(value));
} catch (e) {
return { result: 'error' };
if (e instanceof TypeError) {
return { result: 'error' };
} else {
return { result: e.name };
}
}
}
const expectedOutput = 'expected output';
@ -297,3 +301,18 @@ for (const { format, baseInput, fields } of expectations) {
}
}
}
promise_test(async () => {
// Data generated in Python:
// ```py
// h = b"thequickbrownfoxjumped\x00"
// words = h.split()
// zdict = b''.join(words)
// co = zlib.compressobj(zdict=zdict)
// cd = co.compress(h) + co.flush()
// ```
const { result } = await tryDecompress(new Uint8Array([
0x78, 0xbb, 0x74, 0xee, 0x09, 0x59, 0x2b, 0xc1, 0x2e, 0x0c, 0x00, 0x74, 0xee, 0x09, 0x59
]), 'deflate');
assert_equals(result, 'error', 'Data compressed with a dictionary should throw TypeError');
}, 'the deflate input compressed with dictionary should give an error')