OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 <string> | 5 #include <string> |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
8 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
9 #include "net/base/test_completion_callback.h" | 10 #include "net/base/test_completion_callback.h" |
10 #include "net/http/http_cache_lookup_manager.h" | 11 #include "net/http/http_cache_lookup_manager.h" |
11 #include "net/http/http_transaction_test_util.h" | 12 #include "net/http/http_transaction_test_util.h" |
12 #include "net/http/mock_http_cache.h" | 13 #include "net/http/mock_http_cache.h" |
13 #include "net/test/gtest_util.h" | 14 #include "net/test/gtest_util.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 279 |
279 base::RunLoop().RunUntilIdle(); | 280 base::RunLoop().RunUntilIdle(); |
280 // Make sure no new net layer transaction is created. | 281 // Make sure no new net layer transaction is created. |
281 EXPECT_EQ(1, mock_cache.network_layer()->transaction_count()); | 282 EXPECT_EQ(1, mock_cache.network_layer()->transaction_count()); |
282 EXPECT_EQ(2, mock_cache.disk_cache()->open_count()); | 283 EXPECT_EQ(2, mock_cache.disk_cache()->open_count()); |
283 EXPECT_EQ(1, mock_cache.disk_cache()->create_count()); | 284 EXPECT_EQ(1, mock_cache.disk_cache()->create_count()); |
284 RemoveMockTransaction(mock_trans3.get()); | 285 RemoveMockTransaction(mock_trans3.get()); |
285 } | 286 } |
286 | 287 |
287 } // namespace net | 288 } // namespace net |
OLD | NEW |