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