@@ -108,7 +108,9 @@ class ChromotingHostTest : public testing::Test {
108
108
session_jid1_ = " user@domain/rest-of-jid" ;
109
109
session_config2_ = SessionConfig::ForTest ();
110
110
session_jid2_ = " user2@domain/rest-of-jid" ;
111
+ session_unowned_config1_ = SessionConfig::ForTest ();
111
112
session_unowned_jid1_ = " user3@doman/rest-of-jid" ;
113
+ session_unowned_config2_ = SessionConfig::ForTest ();
112
114
session_unowned_jid2_ = " user4@doman/rest-of-jid" ;
113
115
114
116
EXPECT_CALL (*session1_, jid ())
@@ -130,9 +132,9 @@ class ChromotingHostTest : public testing::Test {
130
132
.Times (AnyNumber ())
131
133
.WillRepeatedly (SaveArg<0 >(&session_unowned2_event_handler_));
132
134
EXPECT_CALL (*session1_, config ())
133
- .WillRepeatedly (ReturnRef (* session_config1_));
135
+ .WillRepeatedly (ReturnRef (session_config1_));
134
136
EXPECT_CALL (*session2_, config ())
135
- .WillRepeatedly (ReturnRef (* session_config2_));
137
+ .WillRepeatedly (ReturnRef (session_config2_));
136
138
137
139
owned_connection1_.reset (new MockConnectionToClient (session1_,
138
140
&host_stub1_));
@@ -419,7 +421,7 @@ class ChromotingHostTest : public testing::Test {
419
421
ClientSession* client1_;
420
422
std::string session_jid1_;
421
423
MockSession* session1_; // Owned by |connection_|.
422
- scoped_ptr< SessionConfig> session_config1_;
424
+ SessionConfig session_config1_;
423
425
MockVideoStub video_stub1_;
424
426
MockClientStub client_stub1_;
425
427
MockHostStub host_stub1_;
@@ -428,13 +430,15 @@ class ChromotingHostTest : public testing::Test {
428
430
ClientSession* client2_;
429
431
std::string session_jid2_;
430
432
MockSession* session2_; // Owned by |connection2_|.
431
- scoped_ptr< SessionConfig> session_config2_;
433
+ SessionConfig session_config2_;
432
434
MockVideoStub video_stub2_;
433
435
MockClientStub client_stub2_;
434
436
MockHostStub host_stub2_;
435
437
scoped_ptr<MockSession> session_unowned1_; // Not owned by a connection.
438
+ SessionConfig session_unowned_config1_;
436
439
std::string session_unowned_jid1_;
437
440
scoped_ptr<MockSession> session_unowned2_; // Not owned by a connection.
441
+ SessionConfig session_unowned_config2_;
438
442
std::string session_unowned_jid2_;
439
443
protocol::Session::EventHandler* session_unowned1_event_handler_;
440
444
protocol::Session::EventHandler* session_unowned2_event_handler_;
@@ -595,7 +599,7 @@ TEST_F(ChromotingHostTest, IncomingSessionAccepted) {
595
599
ExpectHostAndSessionManagerStart ();
596
600
EXPECT_CALL (*session_unowned1_, candidate_config ()).WillOnce (Return (
597
601
default_candidate_config_.get ()));
598
- EXPECT_CALL (*session_unowned1_, set_config_ptr (_));
602
+ EXPECT_CALL (*session_unowned1_, set_config (_));
599
603
EXPECT_CALL (*session_unowned1_, Close ()).WillOnce (InvokeWithoutArgs (
600
604
this , &ChromotingHostTest::NotifyConnectionClosed1));
601
605
EXPECT_CALL (host_status_observer_, OnAccessDenied (_));
@@ -616,7 +620,7 @@ TEST_F(ChromotingHostTest, LoginBackOffUponConnection) {
616
620
ExpectHostAndSessionManagerStart ();
617
621
EXPECT_CALL (*session_unowned1_, candidate_config ()).WillOnce (
618
622
Return (default_candidate_config_.get ()));
619
- EXPECT_CALL (*session_unowned1_, set_config_ptr (_));
623
+ EXPECT_CALL (*session_unowned1_, set_config (_));
620
624
EXPECT_CALL (*session_unowned1_, Close ()).WillOnce (
621
625
InvokeWithoutArgs (this , &ChromotingHostTest::NotifyConnectionClosed1));
622
626
EXPECT_CALL (host_status_observer_, OnAccessDenied (_));
@@ -642,13 +646,13 @@ TEST_F(ChromotingHostTest, LoginBackOffUponAuthenticating) {
642
646
Expectation start = ExpectHostAndSessionManagerStart ();
643
647
EXPECT_CALL (*session_unowned1_, candidate_config ()).WillOnce (
644
648
Return (default_candidate_config_.get ()));
645
- EXPECT_CALL (*session_unowned1_, set_config_ptr (_));
649
+ EXPECT_CALL (*session_unowned1_, set_config (_));
646
650
EXPECT_CALL (*session_unowned1_, Close ()).WillOnce (
647
651
InvokeWithoutArgs (this , &ChromotingHostTest::NotifyConnectionClosed1));
648
652
649
653
EXPECT_CALL (*session_unowned2_, candidate_config ()).WillOnce (
650
654
Return (default_candidate_config_.get ()));
651
- EXPECT_CALL (*session_unowned2_, set_config_ptr (_));
655
+ EXPECT_CALL (*session_unowned2_, set_config (_));
652
656
EXPECT_CALL (*session_unowned2_, Close ()).WillOnce (
653
657
InvokeWithoutArgs (this , &ChromotingHostTest::NotifyConnectionClosed2));
654
658
0 commit comments