| Index: net/tools/quic/quic_in_memory_cache_test.cc
|
| diff --git a/net/tools/quic/quic_in_memory_cache_test.cc b/net/tools/quic/quic_in_memory_cache_test.cc
|
| index e8e603eff38d93843e528803612e49858052033e..e6b3d66484d4556a733314af2ffece8d75c39d33 100644
|
| --- a/net/tools/quic/quic_in_memory_cache_test.cc
|
| +++ b/net/tools/quic/quic_in_memory_cache_test.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/files/file_path.h"
|
| #include "base/memory/singleton.h"
|
| #include "base/path_service.h"
|
| +#include "base/stl_util.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/string_piece.h"
|
| #include "net/tools/balsa/balsa_headers.h"
|
| @@ -56,7 +57,8 @@ TEST_F(QuicInMemoryCacheTest, AddSimpleResponseGetResponse) {
|
| const QuicInMemoryCache::Response* response =
|
| cache->GetResponse("www.google.com", "/");
|
| ASSERT_TRUE(response);
|
| - EXPECT_EQ("200", response->headers().response_code());
|
| + ASSERT_TRUE(ContainsKey(response->headers(), ":status"));
|
| + EXPECT_EQ("200 OK", response->headers().find(":status")->second);
|
| EXPECT_EQ(response_body.size(), response->body().length());
|
| }
|
|
|
| @@ -65,10 +67,10 @@ TEST_F(QuicInMemoryCacheTest, ReadsCacheDir) {
|
| QuicInMemoryCache::GetInstance()->GetResponse("quic.test.url",
|
| "/index.html");
|
| ASSERT_TRUE(response);
|
| - string value;
|
| - response->headers().GetAllOfHeaderAsString("Connection", &value);
|
| - EXPECT_EQ("200", response->headers().response_code());
|
| - EXPECT_EQ("Keep-Alive", value);
|
| + ASSERT_TRUE(ContainsKey(response->headers(), ":status"));
|
| + EXPECT_EQ("200 OK", response->headers().find(":status")->second);
|
| + ASSERT_TRUE(ContainsKey(response->headers(), "connection"));
|
| + EXPECT_EQ("close", response->headers().find("connection")->second);
|
| EXPECT_LT(0U, response->body().length());
|
| }
|
|
|
| @@ -77,9 +79,10 @@ TEST_F(QuicInMemoryCacheTest, UsesOriginalUrl) {
|
| QuicInMemoryCache::GetInstance()->GetResponse("quic.test.url",
|
| "/index.html");
|
| ASSERT_TRUE(response);
|
| - EXPECT_EQ("200", response->headers().response_code());
|
| - string value;
|
| - response->headers().GetAllOfHeaderAsString("Connection", &value);
|
| + ASSERT_TRUE(ContainsKey(response->headers(), ":status"));
|
| + EXPECT_EQ("200 OK", response->headers().find(":status")->second);
|
| + ASSERT_TRUE(ContainsKey(response->headers(), "connection"));
|
| + EXPECT_EQ("close", response->headers().find("connection")->second);
|
| EXPECT_LT(0U, response->body().length());
|
| }
|
|
|
|
|