| Index: src/net/http/http_cache_unittest.cc
|
| diff --git a/src/net/http/http_cache_unittest.cc b/src/net/http/http_cache_unittest.cc
|
| index a503b74ae37276a610489d6c394ad372c834a264..648a889c4a51c6593cf07390cff76380af174799 100644
|
| --- a/src/net/http/http_cache_unittest.cc
|
| +++ b/src/net/http/http_cache_unittest.cc
|
| @@ -4,8 +4,6 @@
|
|
|
| #include "net/http/http_cache.h"
|
|
|
| -#include <windows.h>
|
| -
|
| #include "base/hash_tables.h"
|
| #include "base/message_loop.h"
|
| #include "base/string_util.h"
|
| @@ -18,8 +16,6 @@
|
| #include "net/http/http_transaction_unittest.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| -#pragma warning(disable: 4355)
|
| -
|
| namespace {
|
|
|
| //-----------------------------------------------------------------------------
|
| @@ -73,7 +69,7 @@ class MockDiskEntry : public disk_cache::Entry,
|
|
|
| if (offset < 0 || offset > static_cast<int>(data_[index].size()))
|
| return net::ERR_FAILED;
|
| - if (offset == data_[index].size())
|
| + if (static_cast<size_t>(offset) == data_[index].size())
|
| return 0;
|
|
|
| int num = std::min(buf_len, static_cast<int>(data_[index].size()) - offset);
|
| @@ -483,20 +479,20 @@ TEST(HttpCache, SimpleGET_LoadValidateCache_Implicit) {
|
| EXPECT_EQ(1, cache.disk_cache()->create_count());
|
| }
|
|
|
| +struct Context {
|
| + int result;
|
| + TestCompletionCallback callback;
|
| + net::HttpTransaction* trans;
|
| +
|
| + Context(net::HttpTransaction* t) : result(net::ERR_IO_PENDING), trans(t) {
|
| + }
|
| +};
|
| +
|
| TEST(HttpCache, SimpleGET_ManyReaders) {
|
| MockHttpCache cache;
|
|
|
| MockHttpRequest request(kSimpleGET_Transaction);
|
|
|
| - struct Context {
|
| - int result;
|
| - TestCompletionCallback callback;
|
| - net::HttpTransaction* trans;
|
| -
|
| - Context(net::HttpTransaction* t) : result(net::ERR_IO_PENDING), trans(t) {
|
| - }
|
| - };
|
| -
|
| std::vector<Context*> context_list;
|
| const int kNumTransactions = 5;
|
|
|
| @@ -542,15 +538,6 @@ TEST(HttpCache, SimpleGET_ManyWriters_CancelFirst) {
|
|
|
| MockHttpRequest request(kSimpleGET_Transaction);
|
|
|
| - struct Context {
|
| - int result;
|
| - TestCompletionCallback callback;
|
| - net::HttpTransaction* trans;
|
| -
|
| - Context(net::HttpTransaction* t) : result(net::ERR_IO_PENDING), trans(t) {
|
| - }
|
| - };
|
| -
|
| std::vector<Context*> context_list;
|
| const int kNumTransactions = 2;
|
|
|
|
|