| 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/protocol/webrtc_transport.h" | 5 #include "remoting/protocol/webrtc_transport.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 13 #include "jingle/glue/thread_wrapper.h" | 13 #include "jingle/glue/thread_wrapper.h" |
| 14 #include "net/base/io_buffer.h" | 14 #include "net/base/io_buffer.h" |
| 15 #include "net/url_request/url_request_context_getter.h" | 15 #include "net/url_request/url_request_context_getter.h" |
| 16 #include "remoting/base/compound_buffer.h" | 16 #include "remoting/base/compound_buffer.h" |
| 17 #include "remoting/proto/event.pb.h" | 17 #include "remoting/proto/event.pb.h" |
| 18 #include "remoting/protocol/fake_authenticator.h" | 18 #include "remoting/protocol/fake_authenticator.h" |
| 19 #include "remoting/protocol/message_channel_factory.h" | 19 #include "remoting/protocol/message_channel_factory.h" |
| 20 #include "remoting/protocol/message_pipe.h" | 20 #include "remoting/protocol/message_pipe.h" |
| 21 #include "remoting/protocol/message_serialization.h" | 21 #include "remoting/protocol/message_serialization.h" |
| 22 #include "remoting/protocol/network_settings.h" | 22 #include "remoting/protocol/network_settings.h" |
| 23 #include "remoting/protocol/transport_context.h" | 23 #include "remoting/protocol/transport_context.h" |
| 24 #include "remoting/signaling/fake_signal_strategy.h" | 24 #include "remoting/signaling/fake_signal_strategy.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 26 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
| 27 | 27 |
| 28 namespace remoting { | 28 namespace remoting { |
| 29 namespace protocol { | 29 namespace protocol { |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 const char kChannelName[] = "test_channel"; | 33 const char kChannelName[] = "test_channel"; |
| 34 const char kAuthKey[] = "test_auth_key"; | 34 const char kAuthKey[] = "test_auth_key"; |
| 35 | 35 |
| 36 class TestTransportEventHandler : public WebrtcTransport::EventHandler { | 36 class TestTransportEventHandler : public WebrtcTransport::EventHandler { |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 run_loop_.reset(new base::RunLoop()); | 410 run_loop_.reset(new base::RunLoop()); |
| 411 run_loop_->Run(); | 411 run_loop_->Run(); |
| 412 | 412 |
| 413 // Check that OnHostChannelClosed() has been called. | 413 // Check that OnHostChannelClosed() has been called. |
| 414 EXPECT_EQ(OK, host_error_); | 414 EXPECT_EQ(OK, host_error_); |
| 415 EXPECT_FALSE(host_message_pipe_); | 415 EXPECT_FALSE(host_message_pipe_); |
| 416 } | 416 } |
| 417 | 417 |
| 418 } // namespace protocol | 418 } // namespace protocol |
| 419 } // namespace remoting | 419 } // namespace remoting |
| OLD | NEW |