diff options
Diffstat (limited to 'remoting/protocol/jingle_session_unittest.cc')
-rw-r--r-- | remoting/protocol/jingle_session_unittest.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/remoting/protocol/jingle_session_unittest.cc b/remoting/protocol/jingle_session_unittest.cc index 441e19b..2dab493 100644 --- a/remoting/protocol/jingle_session_unittest.cc +++ b/remoting/protocol/jingle_session_unittest.cc @@ -206,14 +206,14 @@ class JingleSessionTest : public testing::Test { } } - Authenticator* authenticator = new FakeAuthenticator( - FakeAuthenticator::CLIENT, auth_round_trips, auth_action, true); + scoped_ptr<Authenticator> authenticator(new FakeAuthenticator( + FakeAuthenticator::CLIENT, auth_round_trips, auth_action, true)); - client_session_.reset(client_server_->Connect( - kHostJid, authenticator, + client_session_ = client_server_->Connect( + kHostJid, authenticator.Pass(), CandidateSessionConfig::CreateDefault(), base::Bind(&MockSessionCallback::OnStateChange, - base::Unretained(&client_connection_callback_)))); + base::Unretained(&client_connection_callback_))); message_loop_.RunAllPending(); @@ -308,13 +308,12 @@ TEST_F(JingleSessionTest, RejectConnection) { .Times(1); } - Authenticator* authenticator = new FakeAuthenticator( - FakeAuthenticator::CLIENT, 1, FakeAuthenticator::ACCEPT, true); - client_session_.reset(client_server_->Connect( - kHostJid, authenticator, - CandidateSessionConfig::CreateDefault(), + scoped_ptr<Authenticator> authenticator(new FakeAuthenticator( + FakeAuthenticator::CLIENT, 1, FakeAuthenticator::ACCEPT, true)); + client_session_ = client_server_->Connect( + kHostJid, authenticator.Pass(), CandidateSessionConfig::CreateDefault(), base::Bind(&MockSessionCallback::OnStateChange, - base::Unretained(&client_connection_callback_)))); + base::Unretained(&client_connection_callback_))); message_loop_.RunAllPending(); } |