Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: net/http/http_cache_unittest.cc

Issue 1762014: Compile fix. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_cache.h" 5 #include "net/http/http_cache.h"
6 6
7 #include "base/hash_tables.h" 7 #include "base/hash_tables.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/scoped_vector.h" 9 #include "base/scoped_vector.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after
3416 transaction.load_flags |= net::LOAD_ONLY_FROM_CACHE; 3416 transaction.load_flags |= net::LOAD_ONLY_FROM_CACHE;
3417 3417
3418 MockHttpRequest request(transaction); 3418 MockHttpRequest request(transaction);
3419 TestCompletionCallback callback; 3419 TestCompletionCallback callback;
3420 3420
3421 scoped_ptr<net::HttpTransaction> trans; 3421 scoped_ptr<net::HttpTransaction> trans;
3422 int rv = cache.http_cache()->CreateTransaction(&trans); 3422 int rv = cache.http_cache()->CreateTransaction(&trans);
3423 EXPECT_EQ(net::OK, rv); 3423 EXPECT_EQ(net::OK, rv);
3424 ASSERT_TRUE(trans.get()); 3424 ASSERT_TRUE(trans.get());
3425 3425
3426 rv = trans->Start(&request, &callback, NULL); 3426 rv = trans->Start(&request, &callback, net::BoundNetLog());
3427 if (rv == net::ERR_IO_PENDING) 3427 if (rv == net::ERR_IO_PENDING)
3428 rv = callback.WaitForResult(); 3428 rv = callback.WaitForResult();
3429 ASSERT_EQ(net::ERR_CACHE_MISS, rv); 3429 ASSERT_EQ(net::ERR_CACHE_MISS, rv);
3430 3430
3431 trans.reset(); 3431 trans.reset();
3432 3432
3433 EXPECT_EQ(1, cache.network_layer()->transaction_count()); 3433 EXPECT_EQ(1, cache.network_layer()->transaction_count());
3434 EXPECT_EQ(1, cache.disk_cache()->open_count()); 3434 EXPECT_EQ(1, cache.disk_cache()->open_count());
3435 EXPECT_EQ(1, cache.disk_cache()->create_count()); 3435 EXPECT_EQ(1, cache.disk_cache()->create_count());
3436 3436
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
4335 // Now return 200 when validating the entry so the metadata will be lost. 4335 // Now return 200 when validating the entry so the metadata will be lost.
4336 MockTransaction trans2(kTypicalGET_Transaction); 4336 MockTransaction trans2(kTypicalGET_Transaction);
4337 trans2.load_flags = net::LOAD_VALIDATE_CACHE; 4337 trans2.load_flags = net::LOAD_VALIDATE_CACHE;
4338 RunTransactionTestWithResponseInfo(cache.http_cache(), trans2, &response); 4338 RunTransactionTestWithResponseInfo(cache.http_cache(), trans2, &response);
4339 EXPECT_TRUE(response.metadata.get() == NULL); 4339 EXPECT_TRUE(response.metadata.get() == NULL);
4340 4340
4341 EXPECT_EQ(3, cache.network_layer()->transaction_count()); 4341 EXPECT_EQ(3, cache.network_layer()->transaction_count());
4342 EXPECT_EQ(4, cache.disk_cache()->open_count()); 4342 EXPECT_EQ(4, cache.disk_cache()->open_count());
4343 EXPECT_EQ(1, cache.disk_cache()->create_count()); 4343 EXPECT_EQ(1, cache.disk_cache()->create_count());
4344 } 4344 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698