| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 6276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6287 c3(DEFAULT_PRIORITY, cache.http_cache()); | 6287 c3(DEFAULT_PRIORITY, cache.http_cache()); |
| 6288 | 6288 |
| 6289 c1.Start(&r1, BoundNetLog()); | 6289 c1.Start(&r1, BoundNetLog()); |
| 6290 | 6290 |
| 6291 r2.load_flags |= LOAD_ONLY_FROM_CACHE; | 6291 r2.load_flags |= LOAD_ONLY_FROM_CACHE; |
| 6292 c2.Start(&r2, BoundNetLog()); | 6292 c2.Start(&r2, BoundNetLog()); |
| 6293 | 6293 |
| 6294 r3.load_flags |= LOAD_ONLY_FROM_CACHE; | 6294 r3.load_flags |= LOAD_ONLY_FROM_CACHE; |
| 6295 c3.Start(&r3, BoundNetLog()); | 6295 c3.Start(&r3, BoundNetLog()); |
| 6296 | 6296 |
| 6297 base::MessageLoop::current()->Run(); | 6297 base::RunLoop().Run(); |
| 6298 | 6298 |
| 6299 EXPECT_TRUE(c1.is_done()); | 6299 EXPECT_TRUE(c1.is_done()); |
| 6300 EXPECT_TRUE(c2.is_done()); | 6300 EXPECT_TRUE(c2.is_done()); |
| 6301 EXPECT_TRUE(c3.is_done()); | 6301 EXPECT_TRUE(c3.is_done()); |
| 6302 | 6302 |
| 6303 EXPECT_EQ(OK, c1.error()); | 6303 EXPECT_EQ(OK, c1.error()); |
| 6304 EXPECT_EQ(OK, c2.error()); | 6304 EXPECT_EQ(OK, c2.error()); |
| 6305 EXPECT_EQ(OK, c3.error()); | 6305 EXPECT_EQ(OK, c3.error()); |
| 6306 } | 6306 } |
| 6307 | 6307 |
| (...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7735 EXPECT_EQ(1, cache.disk_cache()->open_count()); | 7735 EXPECT_EQ(1, cache.disk_cache()->open_count()); |
| 7736 EXPECT_EQ(1, cache.disk_cache()->create_count()); | 7736 EXPECT_EQ(1, cache.disk_cache()->create_count()); |
| 7737 EXPECT_TRUE(response_info.was_cached); | 7737 EXPECT_TRUE(response_info.was_cached); |
| 7738 | 7738 |
| 7739 // The new SSL state is reported. | 7739 // The new SSL state is reported. |
| 7740 EXPECT_EQ(status2, response_info.ssl_info.connection_status); | 7740 EXPECT_EQ(status2, response_info.ssl_info.connection_status); |
| 7741 EXPECT_TRUE(cert2->Equals(response_info.ssl_info.cert.get())); | 7741 EXPECT_TRUE(cert2->Equals(response_info.ssl_info.cert.get())); |
| 7742 } | 7742 } |
| 7743 | 7743 |
| 7744 } // namespace net | 7744 } // namespace net |
| OLD | NEW |