From 1612c1688e7cce839c6efc29a06590652d8f0022 Mon Sep 17 00:00:00 2001 From: devgianlu Date: Sat, 1 Mar 2025 23:23:09 +0100 Subject: [PATCH] LibWeb: Change hardcoded compression test to round trip As compression is not always deterministic, we cannot hardcode what it'll be like, do a round trip instead. --- .../Compression/CompressionStream.txt | 3 - .../Text/expected/Compression/round-trip.txt | 24 ++++++++ .../input/Compression/CompressionStream.html | 31 ---------- .../Text/input/Compression/round-trip.html | 56 +++++++++++++++++++ 4 files changed, 80 insertions(+), 34 deletions(-) delete mode 100644 Tests/LibWeb/Text/expected/Compression/CompressionStream.txt create mode 100644 Tests/LibWeb/Text/expected/Compression/round-trip.txt delete mode 100644 Tests/LibWeb/Text/input/Compression/CompressionStream.html create mode 100644 Tests/LibWeb/Text/input/Compression/round-trip.html diff --git a/Tests/LibWeb/Text/expected/Compression/CompressionStream.txt b/Tests/LibWeb/Text/expected/Compression/CompressionStream.txt deleted file mode 100644 index f9dc0b7f781..00000000000 --- a/Tests/LibWeb/Text/expected/Compression/CompressionStream.txt +++ /dev/null @@ -1,3 +0,0 @@ -format=deflate: eJwLT83JUchIzcnJV0grykzNSylWBABGEQb1 -format=deflate-raw: C0/NyVHISM3JyVdIK8pMzUspVgQA -format=gzip: H4sIAAAAAAADAwtPzclRyEjNyclXSCvKTM1LKVYEAHN0w4sTAAAA diff --git a/Tests/LibWeb/Text/expected/Compression/round-trip.txt b/Tests/LibWeb/Text/expected/Compression/round-trip.txt new file mode 100644 index 00000000000..889b6976811 --- /dev/null +++ b/Tests/LibWeb/Text/expected/Compression/round-trip.txt @@ -0,0 +1,24 @@ +prefix=120,156 +equal=false +format=deflate: Well hello friends! +-------------- +prefix= +equal=false +format=deflate-raw: Well hello friends! +-------------- +prefix=31,139 +equal=false +format=gzip: Well hello friends! +-------------- +prefix=120,156 +equal=false +format=deflate: Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends! +-------------- +prefix= +equal=false +format=deflate-raw: Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends! +-------------- +prefix=31,139 +equal=false +format=gzip: Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends!Well hello friends! +-------------- diff --git a/Tests/LibWeb/Text/input/Compression/CompressionStream.html b/Tests/LibWeb/Text/input/Compression/CompressionStream.html deleted file mode 100644 index a0ffc4fa077..00000000000 --- a/Tests/LibWeb/Text/input/Compression/CompressionStream.html +++ /dev/null @@ -1,31 +0,0 @@ - - diff --git a/Tests/LibWeb/Text/input/Compression/round-trip.html b/Tests/LibWeb/Text/input/Compression/round-trip.html new file mode 100644 index 00000000000..2a34bd82ef8 --- /dev/null +++ b/Tests/LibWeb/Text/input/Compression/round-trip.html @@ -0,0 +1,56 @@ + +