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/test/embedded_test_server/embedded_test_server.h" | 5 #include "net/test/embedded_test_server/embedded_test_server.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 291 |
292 TEST_P(EmbeddedTestServerTest, ConnectionListenerAccept) { | 292 TEST_P(EmbeddedTestServerTest, ConnectionListenerAccept) { |
293 ASSERT_TRUE(server_->Start()); | 293 ASSERT_TRUE(server_->Start()); |
294 | 294 |
295 TestNetLog net_log; | 295 TestNetLog net_log; |
296 net::AddressList address_list; | 296 net::AddressList address_list; |
297 EXPECT_TRUE(server_->GetAddressList(&address_list)); | 297 EXPECT_TRUE(server_->GetAddressList(&address_list)); |
298 | 298 |
299 scoped_ptr<StreamSocket> socket = | 299 scoped_ptr<StreamSocket> socket = |
300 ClientSocketFactory::GetDefaultFactory()->CreateTransportClientSocket( | 300 ClientSocketFactory::GetDefaultFactory()->CreateTransportClientSocket( |
301 address_list, &net_log, NetLog::Source()); | 301 address_list, NULL, &net_log, NetLog::Source()); |
302 TestCompletionCallback callback; | 302 TestCompletionCallback callback; |
303 ASSERT_EQ(OK, callback.GetResult(socket->Connect(callback.callback()))); | 303 ASSERT_EQ(OK, callback.GetResult(socket->Connect(callback.callback()))); |
304 | 304 |
305 connection_listener_.WaitUntilFirstConnectionAccepted(); | 305 connection_listener_.WaitUntilFirstConnectionAccepted(); |
306 | 306 |
307 EXPECT_EQ(1u, connection_listener_.SocketAcceptedCount()); | 307 EXPECT_EQ(1u, connection_listener_.SocketAcceptedCount()); |
308 EXPECT_FALSE(connection_listener_.DidReadFromSocket()); | 308 EXPECT_FALSE(connection_listener_.DidReadFromSocket()); |
309 } | 309 } |
310 | 310 |
311 TEST_P(EmbeddedTestServerTest, ConnectionListenerRead) { | 311 TEST_P(EmbeddedTestServerTest, ConnectionListenerRead) { |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 INSTANTIATE_TEST_CASE_P( | 591 INSTANTIATE_TEST_CASE_P( |
592 EmbeddedTestServerThreadingTestInstantiation, | 592 EmbeddedTestServerThreadingTestInstantiation, |
593 EmbeddedTestServerThreadingTest, | 593 EmbeddedTestServerThreadingTest, |
594 testing::Combine(testing::Bool(), | 594 testing::Combine(testing::Bool(), |
595 testing::Bool(), | 595 testing::Bool(), |
596 testing::Values(EmbeddedTestServer::TYPE_HTTP, | 596 testing::Values(EmbeddedTestServer::TYPE_HTTP, |
597 EmbeddedTestServer::TYPE_HTTPS))); | 597 EmbeddedTestServer::TYPE_HTTPS))); |
598 | 598 |
599 } // namespace test_server | 599 } // namespace test_server |
600 } // namespace net | 600 } // namespace net |
OLD | NEW |