| Index: remoting/protocol/jingle_session_unittest.cc
|
| diff --git a/remoting/protocol/jingle_session_unittest.cc b/remoting/protocol/jingle_session_unittest.cc
|
| index 882e24dd6f22aa1f16740635bc5ad16c46b6d99d..d9eb6396e4d117771e966e063225edca40950d20 100644
|
| --- a/remoting/protocol/jingle_session_unittest.cc
|
| +++ b/remoting/protocol/jingle_session_unittest.cc
|
| @@ -22,6 +22,7 @@
|
| #include "remoting/protocol/jingle_session_manager.h"
|
| #include "remoting/protocol/libjingle_transport_factory.h"
|
| #include "remoting/protocol/network_settings.h"
|
| +#include "remoting/protocol/stream_channel_factory.h"
|
| #include "remoting/signaling/fake_signal_strategy.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -508,14 +509,21 @@ TEST_F(JingleSessionTest, TestFailedChannelAuth) {
|
|
|
| // Terminate the message loop when we get rejection notification
|
| // from the host.
|
| + bool client_callback_called = false;
|
| EXPECT_CALL(host_channel_callback_, OnDone(NULL))
|
| .WillOnce(QuitThread());
|
| EXPECT_CALL(client_channel_callback_, OnDone(_))
|
| - .Times(AtMost(1));
|
| + .Times(AtMost(1))
|
| + .WillOnce(testing::Assign(&client_callback_called, true));
|
| ExpectRouteChange(kChannelName);
|
|
|
| message_loop_->Run();
|
|
|
| + if (!client_callback_called) {
|
| + client_session_->GetTransportChannelFactory()->CancelChannelCreation(
|
| + kChannelName);
|
| + }
|
| +
|
| EXPECT_TRUE(!host_socket_.get());
|
| }
|
|
|
|
|