| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "remoting/signaling/xmpp_signal_strategy.h" | 5 #include "remoting/signaling/xmpp_signal_strategy.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "net/socket/socket_test_util.h" | 13 #include "net/socket/socket_test_util.h" |
| 14 #include "net/url_request/url_request_test_util.h" | 14 #include "net/url_request/url_request_test_util.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 16 #include "third_party/xmllite/xmlelement.h" |
| 17 | 17 |
| 18 namespace remoting { | 18 namespace remoting { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 class XmppSocketDataProvider : public net::SocketDataProvider { | 22 class XmppSocketDataProvider : public net::SocketDataProvider { |
| 23 public: | 23 public: |
| 24 net::MockRead OnRead() override { | 24 net::MockRead OnRead() override { |
| 25 return net::MockRead(net::ASYNC, net::ERR_IO_PENDING); | 25 return net::MockRead(net::ASYNC, net::ERR_IO_PENDING); |
| 26 } | 26 } |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 "<proceed xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>"); | 373 "<proceed xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>"); |
| 374 | 374 |
| 375 // Verify that SSL is connected only after write is finished. | 375 // Verify that SSL is connected only after write is finished. |
| 376 EXPECT_FALSE(client_socket_factory_.ssl_socket_created()); | 376 EXPECT_FALSE(client_socket_factory_.ssl_socket_created()); |
| 377 socket_data_provider_->CompletePendingWrite(); | 377 socket_data_provider_->CompletePendingWrite(); |
| 378 EXPECT_TRUE(client_socket_factory_.ssl_socket_created()); | 378 EXPECT_TRUE(client_socket_factory_.ssl_socket_created()); |
| 379 } | 379 } |
| 380 | 380 |
| 381 | 381 |
| 382 } // namespace remoting | 382 } // namespace remoting |
| OLD | NEW |