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" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
14 #include "net/http/mock_http_cache.h" | 14 #include "net/http/mock_http_cache.h" |
15 #include "net/quic/core/crypto/quic_server_info.h" | 15 #include "net/quic/chromium/quic_server_info.h" |
16 #include "net/quic/core/quic_server_id.h" | 16 #include "net/quic/core/quic_server_id.h" |
17 #include "net/test/gtest_util.h" | 17 #include "net/test/gtest_util.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 using net::test::IsError; | 21 using net::test::IsError; |
22 using net::test::IsOk; | 22 using net::test::IsOk; |
23 | 23 |
24 using std::string; | 24 using std::string; |
25 | 25 |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 DeleteCacheCompletionCallback cb(quic_server_info); | 712 DeleteCacheCompletionCallback cb(quic_server_info); |
713 quic_server_info->Start(); | 713 quic_server_info->Start(); |
714 int rv = quic_server_info->WaitForDataReady(cb.callback()); | 714 int rv = quic_server_info->WaitForDataReady(cb.callback()); |
715 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); | 715 EXPECT_THAT(rv, IsError(ERR_IO_PENDING)); |
716 // Now complete the backend creation and let the callback run. | 716 // Now complete the backend creation and let the callback run. |
717 factory->FinishCreation(); | 717 factory->FinishCreation(); |
718 EXPECT_THAT(cb.GetResult(rv), IsOk()); | 718 EXPECT_THAT(cb.GetResult(rv), IsOk()); |
719 } | 719 } |
720 | 720 |
721 } // namespace net | 721 } // namespace net |
OLD | NEW |