| 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 "remoting/protocol/jingle_session.h" | 5 #include "remoting/protocol/jingle_session.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 base::RunLoop().RunUntilIdle(); | 177 base::RunLoop().RunUntilIdle(); |
| 178 } | 178 } |
| 179 | 179 |
| 180 void CloseSessions() { | 180 void CloseSessions() { |
| 181 host_session_.reset(); | 181 host_session_.reset(); |
| 182 client_session_.reset(); | 182 client_session_.reset(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void CreateSessionManagers(int auth_round_trips, int messages_till_start, | 185 void CreateSessionManagers(int auth_round_trips, int messages_till_start, |
| 186 FakeAuthenticator::Action auth_action) { | 186 FakeAuthenticator::Action auth_action) { |
| 187 if (!host_signal_strategy_) | 187 if (!host_signal_strategy_) { |
| 188 host_signal_strategy_.reset(new FakeSignalStrategy(kHostJid)); | 188 host_signal_strategy_.reset( |
| 189 if (!client_signal_strategy_) | 189 new FakeSignalStrategy(SignalingAddress(kHostJid))); |
| 190 client_signal_strategy_.reset(new FakeSignalStrategy(kClientJid)); | 190 } |
| 191 if (!client_signal_strategy_) { |
| 192 client_signal_strategy_.reset( |
| 193 new FakeSignalStrategy(SignalingAddress(kClientJid))); |
| 194 } |
| 191 FakeSignalStrategy::Connect(host_signal_strategy_.get(), | 195 FakeSignalStrategy::Connect(host_signal_strategy_.get(), |
| 192 client_signal_strategy_.get()); | 196 client_signal_strategy_.get()); |
| 193 | 197 |
| 194 host_server_.reset(new JingleSessionManager(host_signal_strategy_.get())); | 198 host_server_.reset(new JingleSessionManager(host_signal_strategy_.get())); |
| 195 host_server_->AcceptIncoming( | 199 host_server_->AcceptIncoming( |
| 196 base::Bind(&MockSessionManagerListener::OnIncomingSession, | 200 base::Bind(&MockSessionManagerListener::OnIncomingSession, |
| 197 base::Unretained(&host_server_listener_))); | 201 base::Unretained(&host_server_listener_))); |
| 198 | 202 |
| 199 std::unique_ptr<AuthenticatorFactory> factory( | 203 std::unique_ptr<AuthenticatorFactory> factory( |
| 200 new FakeHostAuthenticatorFactory(auth_round_trips, messages_till_start, | 204 new FakeHostAuthenticatorFactory(auth_round_trips, messages_till_start, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 OnSessionStateChange(Session::AUTHENTICATED)) | 270 OnSessionStateChange(Session::AUTHENTICATED)) |
| 267 .Times(1); | 271 .Times(1); |
| 268 // Expect that the connection will be closed eventually. | 272 // Expect that the connection will be closed eventually. |
| 269 EXPECT_CALL(client_session_event_handler_, | 273 EXPECT_CALL(client_session_event_handler_, |
| 270 OnSessionStateChange(Session::CLOSED)) | 274 OnSessionStateChange(Session::CLOSED)) |
| 271 .Times(AtMost(1)); | 275 .Times(AtMost(1)); |
| 272 } | 276 } |
| 273 } | 277 } |
| 274 | 278 |
| 275 void ConnectClient(std::unique_ptr<Authenticator> authenticator) { | 279 void ConnectClient(std::unique_ptr<Authenticator> authenticator) { |
| 276 client_session_ = | 280 client_session_ = client_server_->Connect(SignalingAddress(host_jid_), |
| 277 client_server_->Connect(host_jid_, std::move(authenticator)); | 281 std::move(authenticator)); |
| 278 client_session_->SetEventHandler(&client_session_event_handler_); | 282 client_session_->SetEventHandler(&client_session_event_handler_); |
| 279 client_session_->SetTransport(&client_transport_); | 283 client_session_->SetTransport(&client_transport_); |
| 280 client_session_->AddPlugin(&client_plugin_); | 284 client_session_->AddPlugin(&client_plugin_); |
| 281 base::RunLoop().RunUntilIdle(); | 285 base::RunLoop().RunUntilIdle(); |
| 282 } | 286 } |
| 283 | 287 |
| 284 void InitiateConnection(int auth_round_trips, | 288 void InitiateConnection(int auth_round_trips, |
| 285 FakeAuthenticator::Action auth_action, | 289 FakeAuthenticator::Action auth_action, |
| 286 bool expect_fail) { | 290 bool expect_fail) { |
| 287 SetHostExpectation(expect_fail); | 291 SetHostExpectation(expect_fail); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 361 |
| 358 { | 362 { |
| 359 InSequence dummy; | 363 InSequence dummy; |
| 360 EXPECT_CALL(client_session_event_handler_, | 364 EXPECT_CALL(client_session_event_handler_, |
| 361 OnSessionStateChange(Session::FAILED)) | 365 OnSessionStateChange(Session::FAILED)) |
| 362 .Times(1); | 366 .Times(1); |
| 363 } | 367 } |
| 364 | 368 |
| 365 std::unique_ptr<Authenticator> authenticator(new FakeAuthenticator( | 369 std::unique_ptr<Authenticator> authenticator(new FakeAuthenticator( |
| 366 FakeAuthenticator::CLIENT, 1, FakeAuthenticator::ACCEPT, true)); | 370 FakeAuthenticator::CLIENT, 1, FakeAuthenticator::ACCEPT, true)); |
| 367 client_session_ = client_server_->Connect(kHostJid, std::move(authenticator)); | 371 client_session_ = client_server_->Connect(SignalingAddress(kHostJid), |
| 372 std::move(authenticator)); |
| 368 client_session_->SetEventHandler(&client_session_event_handler_); | 373 client_session_->SetEventHandler(&client_session_event_handler_); |
| 369 | 374 |
| 370 base::RunLoop().RunUntilIdle(); | 375 base::RunLoop().RunUntilIdle(); |
| 371 } | 376 } |
| 372 | 377 |
| 373 // Verify that we can connect two endpoints with single-step authentication. | 378 // Verify that we can connect two endpoints with single-step authentication. |
| 374 TEST_F(JingleSessionTest, Connect) { | 379 TEST_F(JingleSessionTest, Connect) { |
| 375 CreateSessionManagers(1, FakeAuthenticator::ACCEPT); | 380 CreateSessionManagers(1, FakeAuthenticator::ACCEPT); |
| 376 InitiateConnection(1, FakeAuthenticator::ACCEPT, false); | 381 InitiateConnection(1, FakeAuthenticator::ACCEPT, false); |
| 377 | 382 |
| 378 // Verify that the client specified correct initiator value. | 383 // Verify that the client specified correct initiator value. |
| 379 ASSERT_GT(host_signal_strategy_->received_messages().size(), 0U); | 384 ASSERT_GT(host_signal_strategy_->received_messages().size(), 0U); |
| 380 const buzz::XmlElement* initiate_xml = | 385 const buzz::XmlElement* initiate_xml = |
| 381 host_signal_strategy_->received_messages().front(); | 386 host_signal_strategy_->received_messages().front(); |
| 382 const buzz::XmlElement* jingle_element = | 387 const buzz::XmlElement* jingle_element = |
| 383 initiate_xml->FirstNamed(buzz::QName("urn:xmpp:jingle:1", "jingle")); | 388 initiate_xml->FirstNamed(buzz::QName("urn:xmpp:jingle:1", "jingle")); |
| 384 ASSERT_TRUE(jingle_element); | 389 ASSERT_TRUE(jingle_element); |
| 385 ASSERT_EQ(kClientJid, | 390 ASSERT_EQ(kClientJid, |
| 386 jingle_element->Attr(buzz::QName(std::string(), "initiator"))); | 391 jingle_element->Attr(buzz::QName(std::string(), "initiator"))); |
| 387 } | 392 } |
| 388 | 393 |
| 389 TEST_F(JingleSessionTest, MixedCaseHostJid) { | 394 TEST_F(JingleSessionTest, MixedCaseHostJid) { |
| 390 std::string host_jid = std::string("A") + kHostJid; | 395 std::string host_jid = std::string("A") + kHostJid; |
| 391 host_signal_strategy_.reset(new FakeSignalStrategy(host_jid)); | 396 host_signal_strategy_.reset( |
| 397 new FakeSignalStrategy(SignalingAddress(host_jid))); |
| 392 | 398 |
| 393 // Imitate host JID being lower-cased when stored in the directory. | 399 // Imitate host JID being lower-cased when stored in the directory. |
| 394 host_jid_ = base::ToLowerASCII(host_jid); | 400 host_jid_ = base::ToLowerASCII(host_jid); |
| 395 | 401 |
| 396 CreateSessionManagers(1, FakeAuthenticator::ACCEPT); | 402 CreateSessionManagers(1, FakeAuthenticator::ACCEPT); |
| 397 InitiateConnection(1, FakeAuthenticator::ACCEPT, false); | 403 InitiateConnection(1, FakeAuthenticator::ACCEPT, false); |
| 398 } | 404 } |
| 399 | 405 |
| 400 TEST_F(JingleSessionTest, MixedCaseClientJid) { | 406 TEST_F(JingleSessionTest, MixedCaseClientJid) { |
| 401 client_signal_strategy_.reset( | 407 client_signal_strategy_.reset( |
| 402 new FakeSignalStrategy(std::string("A") + kClientJid)); | 408 new FakeSignalStrategy(SignalingAddress(std::string("A") + kClientJid))); |
| 403 CreateSessionManagers(1, FakeAuthenticator::ACCEPT); | 409 CreateSessionManagers(1, FakeAuthenticator::ACCEPT); |
| 404 InitiateConnection(1, FakeAuthenticator::ACCEPT, false); | 410 InitiateConnection(1, FakeAuthenticator::ACCEPT, false); |
| 405 } | 411 } |
| 406 | 412 |
| 407 // Verify that we can connect two endpoints with multi-step authentication. | 413 // Verify that we can connect two endpoints with multi-step authentication. |
| 408 TEST_F(JingleSessionTest, ConnectWithMultistep) { | 414 TEST_F(JingleSessionTest, ConnectWithMultistep) { |
| 409 CreateSessionManagers(3, FakeAuthenticator::ACCEPT); | 415 CreateSessionManagers(3, FakeAuthenticator::ACCEPT); |
| 410 InitiateConnection(3, FakeAuthenticator::ACCEPT, false); | 416 InitiateConnection(3, FakeAuthenticator::ACCEPT, false); |
| 411 } | 417 } |
| 412 | 418 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 .Times(1); | 475 .Times(1); |
| 470 | 476 |
| 471 std::unique_ptr<Authenticator> authenticator(new FakeAuthenticator( | 477 std::unique_ptr<Authenticator> authenticator(new FakeAuthenticator( |
| 472 FakeAuthenticator::CLIENT, 1, FakeAuthenticator::ACCEPT, true)); | 478 FakeAuthenticator::CLIENT, 1, FakeAuthenticator::ACCEPT, true)); |
| 473 | 479 |
| 474 std::unique_ptr<CandidateSessionConfig> config = | 480 std::unique_ptr<CandidateSessionConfig> config = |
| 475 CandidateSessionConfig::CreateDefault(); | 481 CandidateSessionConfig::CreateDefault(); |
| 476 // Disable all video codecs so the host will reject connection. | 482 // Disable all video codecs so the host will reject connection. |
| 477 config->mutable_video_configs()->clear(); | 483 config->mutable_video_configs()->clear(); |
| 478 client_server_->set_protocol_config(std::move(config)); | 484 client_server_->set_protocol_config(std::move(config)); |
| 479 client_session_ = client_server_->Connect(kHostJid, std::move(authenticator)); | 485 client_session_ = client_server_->Connect(SignalingAddress(kHostJid), |
| 486 std::move(authenticator)); |
| 480 client_session_->SetEventHandler(&client_session_event_handler_); | 487 client_session_->SetEventHandler(&client_session_event_handler_); |
| 481 | 488 |
| 482 base::RunLoop().RunUntilIdle(); | 489 base::RunLoop().RunUntilIdle(); |
| 483 | 490 |
| 484 EXPECT_EQ(INCOMPATIBLE_PROTOCOL, client_session_->error()); | 491 EXPECT_EQ(INCOMPATIBLE_PROTOCOL, client_session_->error()); |
| 485 EXPECT_FALSE(host_session_); | 492 EXPECT_FALSE(host_session_); |
| 486 } | 493 } |
| 487 | 494 |
| 488 // Verify that GICE-only client is rejected with an appropriate error code. | 495 // Verify that GICE-only client is rejected with an appropriate error code. |
| 489 TEST_F(JingleSessionTest, TestLegacyIceConnection) { | 496 TEST_F(JingleSessionTest, TestLegacyIceConnection) { |
| 490 CreateSessionManagers(1, FakeAuthenticator::ACCEPT); | 497 CreateSessionManagers(1, FakeAuthenticator::ACCEPT); |
| 491 | 498 |
| 492 EXPECT_CALL(host_server_listener_, OnIncomingSession(_, _)).Times(0); | 499 EXPECT_CALL(host_server_listener_, OnIncomingSession(_, _)).Times(0); |
| 493 | 500 |
| 494 EXPECT_CALL(client_session_event_handler_, | 501 EXPECT_CALL(client_session_event_handler_, |
| 495 OnSessionStateChange(Session::FAILED)) | 502 OnSessionStateChange(Session::FAILED)) |
| 496 .Times(1); | 503 .Times(1); |
| 497 | 504 |
| 498 std::unique_ptr<Authenticator> authenticator(new FakeAuthenticator( | 505 std::unique_ptr<Authenticator> authenticator(new FakeAuthenticator( |
| 499 FakeAuthenticator::CLIENT, 1, FakeAuthenticator::ACCEPT, true)); | 506 FakeAuthenticator::CLIENT, 1, FakeAuthenticator::ACCEPT, true)); |
| 500 | 507 |
| 501 std::unique_ptr<CandidateSessionConfig> config = | 508 std::unique_ptr<CandidateSessionConfig> config = |
| 502 CandidateSessionConfig::CreateDefault(); | 509 CandidateSessionConfig::CreateDefault(); |
| 503 config->set_ice_supported(false); | 510 config->set_ice_supported(false); |
| 504 client_server_->set_protocol_config(std::move(config)); | 511 client_server_->set_protocol_config(std::move(config)); |
| 505 client_session_ = client_server_->Connect(kHostJid, std::move(authenticator)); | 512 client_session_ = client_server_->Connect(SignalingAddress(kHostJid), |
| 513 std::move(authenticator)); |
| 506 client_session_->SetEventHandler(&client_session_event_handler_); | 514 client_session_->SetEventHandler(&client_session_event_handler_); |
| 507 | 515 |
| 508 base::RunLoop().RunUntilIdle(); | 516 base::RunLoop().RunUntilIdle(); |
| 509 | 517 |
| 510 EXPECT_EQ(INCOMPATIBLE_PROTOCOL, client_session_->error()); | 518 EXPECT_EQ(INCOMPATIBLE_PROTOCOL, client_session_->error()); |
| 511 EXPECT_FALSE(host_session_); | 519 EXPECT_FALSE(host_session_); |
| 512 } | 520 } |
| 513 | 521 |
| 514 TEST_F(JingleSessionTest, DeleteSessionOnIncomingConnection) { | 522 TEST_F(JingleSessionTest, DeleteSessionOnIncomingConnection) { |
| 515 CreateSessionManagers(3, FakeAuthenticator::ACCEPT); | 523 CreateSessionManagers(3, FakeAuthenticator::ACCEPT); |
| 516 | 524 |
| 517 EXPECT_CALL(host_server_listener_, OnIncomingSession(_, _)) | 525 EXPECT_CALL(host_server_listener_, OnIncomingSession(_, _)) |
| 518 .WillOnce(DoAll( | 526 .WillOnce(DoAll( |
| 519 WithArg<0>(Invoke(this, &JingleSessionTest::SetHostSession)), | 527 WithArg<0>(Invoke(this, &JingleSessionTest::SetHostSession)), |
| 520 SetArgumentPointee<1>(protocol::SessionManager::ACCEPT))); | 528 SetArgumentPointee<1>(protocol::SessionManager::ACCEPT))); |
| 521 | 529 |
| 522 EXPECT_CALL(host_session_event_handler_, | 530 EXPECT_CALL(host_session_event_handler_, |
| 523 OnSessionStateChange(Session::ACCEPTED)) | 531 OnSessionStateChange(Session::ACCEPTED)) |
| 524 .Times(AtMost(1)); | 532 .Times(AtMost(1)); |
| 525 | 533 |
| 526 EXPECT_CALL(host_session_event_handler_, | 534 EXPECT_CALL(host_session_event_handler_, |
| 527 OnSessionStateChange(Session::AUTHENTICATING)) | 535 OnSessionStateChange(Session::AUTHENTICATING)) |
| 528 .WillOnce(InvokeWithoutArgs(this, &JingleSessionTest::DeleteHostSession)); | 536 .WillOnce(InvokeWithoutArgs(this, &JingleSessionTest::DeleteHostSession)); |
| 529 | 537 |
| 530 std::unique_ptr<Authenticator> authenticator(new FakeAuthenticator( | 538 std::unique_ptr<Authenticator> authenticator(new FakeAuthenticator( |
| 531 FakeAuthenticator::CLIENT, 3, FakeAuthenticator::ACCEPT, true)); | 539 FakeAuthenticator::CLIENT, 3, FakeAuthenticator::ACCEPT, true)); |
| 532 | 540 |
| 533 client_session_ = client_server_->Connect(kHostJid, std::move(authenticator)); | 541 client_session_ = client_server_->Connect(SignalingAddress(kHostJid), |
| 542 std::move(authenticator)); |
| 534 | 543 |
| 535 base::RunLoop().RunUntilIdle(); | 544 base::RunLoop().RunUntilIdle(); |
| 536 } | 545 } |
| 537 | 546 |
| 538 TEST_F(JingleSessionTest, DeleteSessionOnAuth) { | 547 TEST_F(JingleSessionTest, DeleteSessionOnAuth) { |
| 539 // Same as the previous test, but set messages_till_started to 2 in | 548 // Same as the previous test, but set messages_till_started to 2 in |
| 540 // CreateSessionManagers so that the session will goes into the | 549 // CreateSessionManagers so that the session will goes into the |
| 541 // AUTHENTICATING state after two message exchanges. | 550 // AUTHENTICATING state after two message exchanges. |
| 542 CreateSessionManagers(3, 2, FakeAuthenticator::ACCEPT); | 551 CreateSessionManagers(3, 2, FakeAuthenticator::ACCEPT); |
| 543 | 552 |
| 544 EXPECT_CALL(host_server_listener_, OnIncomingSession(_, _)) | 553 EXPECT_CALL(host_server_listener_, OnIncomingSession(_, _)) |
| 545 .WillOnce( | 554 .WillOnce( |
| 546 DoAll(WithArg<0>(Invoke(this, &JingleSessionTest::SetHostSession)), | 555 DoAll(WithArg<0>(Invoke(this, &JingleSessionTest::SetHostSession)), |
| 547 SetArgumentPointee<1>(protocol::SessionManager::ACCEPT))); | 556 SetArgumentPointee<1>(protocol::SessionManager::ACCEPT))); |
| 548 | 557 |
| 549 EXPECT_CALL(host_session_event_handler_, | 558 EXPECT_CALL(host_session_event_handler_, |
| 550 OnSessionStateChange(Session::ACCEPTED)) | 559 OnSessionStateChange(Session::ACCEPTED)) |
| 551 .Times(AtMost(1)); | 560 .Times(AtMost(1)); |
| 552 | 561 |
| 553 EXPECT_CALL(host_session_event_handler_, | 562 EXPECT_CALL(host_session_event_handler_, |
| 554 OnSessionStateChange(Session::AUTHENTICATING)) | 563 OnSessionStateChange(Session::AUTHENTICATING)) |
| 555 .WillOnce(InvokeWithoutArgs(this, &JingleSessionTest::DeleteHostSession)); | 564 .WillOnce(InvokeWithoutArgs(this, &JingleSessionTest::DeleteHostSession)); |
| 556 | 565 |
| 557 std::unique_ptr<Authenticator> authenticator(new FakeAuthenticator( | 566 std::unique_ptr<Authenticator> authenticator(new FakeAuthenticator( |
| 558 FakeAuthenticator::CLIENT, 3, FakeAuthenticator::ACCEPT, true)); | 567 FakeAuthenticator::CLIENT, 3, FakeAuthenticator::ACCEPT, true)); |
| 559 | 568 |
| 560 client_session_ = client_server_->Connect(kHostJid, std::move(authenticator)); | 569 client_session_ = client_server_->Connect(SignalingAddress(kHostJid), |
| 570 std::move(authenticator)); |
| 561 base::RunLoop().RunUntilIdle(); | 571 base::RunLoop().RunUntilIdle(); |
| 562 } | 572 } |
| 563 | 573 |
| 564 // Verify that we can connect with multistep authentication. | 574 // Verify that we can connect with multistep authentication. |
| 565 TEST_F(JingleSessionTest, TestMultistepAuth) { | 575 TEST_F(JingleSessionTest, TestMultistepAuth) { |
| 566 CreateSessionManagers(3, FakeAuthenticator::ACCEPT); | 576 CreateSessionManagers(3, FakeAuthenticator::ACCEPT); |
| 567 ASSERT_NO_FATAL_FAILURE( | 577 ASSERT_NO_FATAL_FAILURE( |
| 568 InitiateConnection(3, FakeAuthenticator::ACCEPT, false)); | 578 InitiateConnection(3, FakeAuthenticator::ACCEPT, false)); |
| 569 } | 579 } |
| 570 | 580 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 InitiateConnection(1, FakeAuthenticator::ACCEPT, true); | 641 InitiateConnection(1, FakeAuthenticator::ACCEPT, true); |
| 632 // It's expected the client sends one more plugin message than host, the host | 642 // It's expected the client sends one more plugin message than host, the host |
| 633 // won't send plugin message in the SESSION_TERMINATE message. | 643 // won't send plugin message in the SESSION_TERMINATE message. |
| 634 ASSERT_EQ(client_plugin_.outgoing_messages().size() - 1, | 644 ASSERT_EQ(client_plugin_.outgoing_messages().size() - 1, |
| 635 client_plugin_.incoming_messages().size()); | 645 client_plugin_.incoming_messages().size()); |
| 636 ExpectPluginMessagesEqual(); | 646 ExpectPluginMessagesEqual(); |
| 637 } | 647 } |
| 638 | 648 |
| 639 TEST_F(JingleSessionTest, ImmediatelyCloseSessionAfterConnect) { | 649 TEST_F(JingleSessionTest, ImmediatelyCloseSessionAfterConnect) { |
| 640 CreateSessionManagers(3, FakeAuthenticator::ACCEPT); | 650 CreateSessionManagers(3, FakeAuthenticator::ACCEPT); |
| 641 client_session_ = client_server_->Connect(host_jid_, | 651 client_session_ = client_server_->Connect( |
| 642 base::MakeUnique<FakeAuthenticator>( | 652 SignalingAddress(host_jid_), |
| 643 FakeAuthenticator::CLIENT, 3, FakeAuthenticator::ACCEPT, true)); | 653 base::MakeUnique<FakeAuthenticator>(FakeAuthenticator::CLIENT, 3, |
| 654 FakeAuthenticator::ACCEPT, true)); |
| 644 client_session_->Close(HOST_OVERLOAD); | 655 client_session_->Close(HOST_OVERLOAD); |
| 645 base::RunLoop().RunUntilIdle(); | 656 base::RunLoop().RunUntilIdle(); |
| 646 // We should only send a SESSION_TERMINATE message if the session has been | 657 // We should only send a SESSION_TERMINATE message if the session has been |
| 647 // closed before SESSION_INITIATE message. | 658 // closed before SESSION_INITIATE message. |
| 648 ASSERT_EQ(1U, host_signal_strategy_->received_messages().size()); | 659 ASSERT_EQ(1U, host_signal_strategy_->received_messages().size()); |
| 649 } | 660 } |
| 650 | 661 |
| 651 } // namespace protocol | 662 } // namespace protocol |
| 652 } // namespace remoting | 663 } // namespace remoting |
| OLD | NEW |