OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/disk_cache_based_quic_server_info.h" | 5 #include "net/http/disk_cache_based_quic_server_info.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 base::Time(), | 28 base::Time(), |
29 "", | 29 "", |
30 LOAD_NORMAL, | 30 LOAD_NORMAL, |
31 "", | 31 "", |
32 "", | 32 "", |
33 base::Time(), | 33 base::Time(), |
34 "", | 34 "", |
35 TEST_MODE_NORMAL, | 35 TEST_MODE_NORMAL, |
36 nullptr, | 36 nullptr, |
37 nullptr, | 37 nullptr, |
| 38 nullptr, |
38 0, | 39 0, |
39 0, | 40 0, |
40 OK, | 41 OK, |
41 }; | 42 }; |
42 | 43 |
43 const MockTransaction kHostInfoTransaction2 = { | 44 const MockTransaction kHostInfoTransaction2 = { |
44 "quicserverinfo:https://www.google.com:80", | 45 "quicserverinfo:https://www.google.com:80", |
45 "", | 46 "", |
46 base::Time(), | 47 base::Time(), |
47 "", | 48 "", |
48 LOAD_NORMAL, | 49 LOAD_NORMAL, |
49 "", | 50 "", |
50 "", | 51 "", |
51 base::Time(), | 52 base::Time(), |
52 "", | 53 "", |
53 TEST_MODE_NORMAL, | 54 TEST_MODE_NORMAL, |
54 nullptr, | 55 nullptr, |
55 nullptr, | 56 nullptr, |
| 57 nullptr, |
56 0, | 58 0, |
57 0, | 59 0, |
58 OK, | 60 OK, |
59 }; | 61 }; |
60 | 62 |
61 class DeleteCacheCompletionCallback : public TestCompletionCallbackBase { | 63 class DeleteCacheCompletionCallback : public TestCompletionCallbackBase { |
62 public: | 64 public: |
63 explicit DeleteCacheCompletionCallback(QuicServerInfo* server_info) | 65 explicit DeleteCacheCompletionCallback(QuicServerInfo* server_info) |
64 : server_info_(server_info), | 66 : server_info_(server_info), |
65 callback_(base::Bind(&DeleteCacheCompletionCallback::OnComplete, | 67 callback_(base::Bind(&DeleteCacheCompletionCallback::OnComplete, |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 DeleteCacheCompletionCallback cb(quic_server_info); | 707 DeleteCacheCompletionCallback cb(quic_server_info); |
706 quic_server_info->Start(); | 708 quic_server_info->Start(); |
707 int rv = quic_server_info->WaitForDataReady(cb.callback()); | 709 int rv = quic_server_info->WaitForDataReady(cb.callback()); |
708 EXPECT_EQ(ERR_IO_PENDING, rv); | 710 EXPECT_EQ(ERR_IO_PENDING, rv); |
709 // Now complete the backend creation and let the callback run. | 711 // Now complete the backend creation and let the callback run. |
710 factory->FinishCreation(); | 712 factory->FinishCreation(); |
711 EXPECT_EQ(OK, cb.GetResult(rv)); | 713 EXPECT_EQ(OK, cb.GetResult(rv)); |
712 } | 714 } |
713 | 715 |
714 } // namespace net | 716 } // namespace net |
OLD | NEW |