| Index: blimp/net/compressed_packet_unittest.cc
|
| diff --git a/blimp/net/compressed_packet_unittest.cc b/blimp/net/compressed_packet_unittest.cc
|
| index 61e39b88bb8779645626e61e92ee60387937f4bc..0742fda8d74659fb6abb0ee72bb9efe1d4fc54e0 100644
|
| --- a/blimp/net/compressed_packet_unittest.cc
|
| +++ b/blimp/net/compressed_packet_unittest.cc
|
| @@ -3,6 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/memory/ptr_util.h"
|
| +#include "base/rand_util.h"
|
| #include "base/sys_byteorder.h"
|
| #include "blimp/net/common.h"
|
| #include "blimp/net/compressed_packet_reader.h"
|
| @@ -153,6 +154,15 @@ TEST_F(CompressedPacketTest, LargeInput) {
|
| EXPECT_TRUE(CheckRoundTrip(big_str));
|
| }
|
|
|
| +TEST_F(CompressedPacketTest, LowCompressionRatio) {
|
| + // This size (2338) was found "in the wild" to repro an issue with output
|
| + // buffer overflows.
|
| + const int data_size = 2338;
|
| +
|
| + EXPECT_TRUE(CheckRoundTrip(base::RandBytesAsString(data_size)));
|
| + EXPECT_TRUE(CheckRoundTrip(base::RandBytesAsString(data_size)));
|
| +}
|
| +
|
| TEST_F(CompressedPacketTest, DecompressIllegallyLargePayload) {
|
| // We can't use the compressor to compress an illegally sized payload, however
|
| // we can concatenate the output of smaller payloads to form an uber-payload.
|
|
|