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/spdy/spdy_proxy_client_socket.h" | 5 #include "net/spdy/spdy_proxy_client_socket.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/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 | 1274 |
1275 NetLog::Source sock_source = sock_->NetLog().source(); | 1275 NetLog::Source sock_source = sock_->NetLog().source(); |
1276 sock_.reset(); | 1276 sock_.reset(); |
1277 | 1277 |
1278 CapturingNetLog::CapturedEntryList entry_list; | 1278 CapturingNetLog::CapturedEntryList entry_list; |
1279 net_log_.GetEntriesForSource(sock_source, &entry_list); | 1279 net_log_.GetEntriesForSource(sock_source, &entry_list); |
1280 | 1280 |
1281 ASSERT_EQ(entry_list.size(), 10u); | 1281 ASSERT_EQ(entry_list.size(), 10u); |
1282 EXPECT_TRUE(LogContainsBeginEvent(entry_list, 0, NetLog::TYPE_SOCKET_ALIVE)); | 1282 EXPECT_TRUE(LogContainsBeginEvent(entry_list, 0, NetLog::TYPE_SOCKET_ALIVE)); |
1283 EXPECT_TRUE(LogContainsEvent(entry_list, 1, | 1283 EXPECT_TRUE(LogContainsEvent(entry_list, 1, |
1284 NetLog::TYPE_SPDY_PROXY_CLIENT_SESSION, | 1284 NetLog::TYPE_HTTP2_PROXY_CLIENT_SESSION, |
1285 NetLog::PHASE_NONE)); | 1285 NetLog::PHASE_NONE)); |
1286 EXPECT_TRUE(LogContainsBeginEvent(entry_list, 2, | 1286 EXPECT_TRUE(LogContainsBeginEvent(entry_list, 2, |
1287 NetLog::TYPE_HTTP_TRANSACTION_TUNNEL_SEND_REQUEST)); | 1287 NetLog::TYPE_HTTP_TRANSACTION_TUNNEL_SEND_REQUEST)); |
1288 EXPECT_TRUE(LogContainsEvent(entry_list, 3, | 1288 EXPECT_TRUE(LogContainsEvent(entry_list, 3, |
1289 NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS, | 1289 NetLog::TYPE_HTTP_TRANSACTION_SEND_TUNNEL_HEADERS, |
1290 NetLog::PHASE_NONE)); | 1290 NetLog::PHASE_NONE)); |
1291 EXPECT_TRUE(LogContainsEndEvent(entry_list, 4, | 1291 EXPECT_TRUE(LogContainsEndEvent(entry_list, 4, |
1292 NetLog::TYPE_HTTP_TRANSACTION_TUNNEL_SEND_REQUEST)); | 1292 NetLog::TYPE_HTTP_TRANSACTION_TUNNEL_SEND_REQUEST)); |
1293 EXPECT_TRUE(LogContainsBeginEvent(entry_list, 5, | 1293 EXPECT_TRUE(LogContainsBeginEvent(entry_list, 5, |
1294 NetLog::TYPE_HTTP_TRANSACTION_TUNNEL_READ_HEADERS)); | 1294 NetLog::TYPE_HTTP_TRANSACTION_TUNNEL_READ_HEADERS)); |
1295 EXPECT_TRUE(LogContainsEvent(entry_list, 6, | 1295 EXPECT_TRUE(LogContainsEvent(entry_list, 6, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 | 1373 |
1374 EXPECT_FALSE(sock_.get()); | 1374 EXPECT_FALSE(sock_.get()); |
1375 EXPECT_TRUE(read_callback.have_result()); | 1375 EXPECT_TRUE(read_callback.have_result()); |
1376 EXPECT_FALSE(write_callback_.have_result()); | 1376 EXPECT_FALSE(write_callback_.have_result()); |
1377 | 1377 |
1378 // Let the RST_STREAM write while |rst| is in-scope. | 1378 // Let the RST_STREAM write while |rst| is in-scope. |
1379 base::MessageLoop::current()->RunUntilIdle(); | 1379 base::MessageLoop::current()->RunUntilIdle(); |
1380 } | 1380 } |
1381 | 1381 |
1382 } // namespace net | 1382 } // namespace net |
OLD | NEW |