| Index: blimp/net/test_common.cc
|
| diff --git a/blimp/net/test_common.cc b/blimp/net/test_common.cc
|
| index 92a951d17ab3b1f398182b04c2eb8023e9eef1c2..261401e5b7a585678e3c726bd0eb99c13f3ce7a8 100644
|
| --- a/blimp/net/test_common.cc
|
| +++ b/blimp/net/test_common.cc
|
| @@ -72,9 +72,11 @@ std::string EncodeHeader(size_t size) {
|
| return std::string(serialized.get(), kPacketHeaderSizeBytes);
|
| }
|
|
|
| -bool BufferStartsWith(net::GrowableIOBuffer* buf, const std::string& str) {
|
| - return (static_cast<size_t>(buf->capacity()) > str.size() &&
|
| - str == std::string(buf->StartOfBuffer(), str.size()));
|
| +bool BufferStartsWith(net::GrowableIOBuffer* buf,
|
| + size_t buf_size,
|
| + const std::string& str) {
|
| + return (buf_size >= str.size() &&
|
| + str == std::string(buf->data(), str.size()));
|
| }
|
|
|
| } // namespace blimp
|
|
|