| Index: net/http/http_cache_lookup_manager_unittest.cc
|
| diff --git a/net/http/http_cache_lookup_manager_unittest.cc b/net/http/http_cache_lookup_manager_unittest.cc
|
| index 32769880882d87513497febd25e71fccd45484db..1e207ba4f2ea3c259214e19db95a5a9494794d91 100644
|
| --- a/net/http/http_cache_lookup_manager_unittest.cc
|
| +++ b/net/http/http_cache_lookup_manager_unittest.cc
|
| @@ -52,12 +52,12 @@ void PopulateCacheEntry(HttpCache* cache, const GURL& request_url) {
|
|
|
| MockHttpRequest request(*(mock_trans.get()));
|
|
|
| - std::unique_ptr<HttpTransaction> trans;
|
| - int rv = cache->CreateTransaction(DEFAULT_PRIORITY, &trans);
|
| + Context* c = new Context();
|
| + int rv = cache->CreateTransaction(DEFAULT_PRIORITY, &c->trans);
|
| EXPECT_THAT(rv, IsOk());
|
| - ASSERT_TRUE(trans.get());
|
| + ASSERT_TRUE(c->trans.get());
|
|
|
| - rv = trans->Start(&request, callback.callback(), NetLogWithSource());
|
| + rv = c->trans->Start(&request, callback.callback(), NetLogWithSource());
|
| base::RunLoop().RunUntilIdle();
|
|
|
| if (rv == ERR_IO_PENDING)
|
| @@ -67,16 +67,18 @@ void PopulateCacheEntry(HttpCache* cache, const GURL& request_url) {
|
| if (OK != rv)
|
| return;
|
|
|
| - const HttpResponseInfo* response = trans->GetResponseInfo();
|
| + const HttpResponseInfo* response = c->trans->GetResponseInfo();
|
| ASSERT_TRUE(response);
|
|
|
| std::string content;
|
| - rv = ReadTransaction(trans.get(), &content);
|
| + rv = ReadTransaction(c->trans.get(), &content);
|
|
|
| EXPECT_THAT(rv, IsOk());
|
| std::string expected(mock_trans->data);
|
| EXPECT_EQ(expected, content);
|
| RemoveMockTransaction(mock_trans.get());
|
| +
|
| + delete c;
|
| }
|
|
|
| } // namespace
|
|
|