Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: remoting/host/chromoting_host_unittest.cc

Issue 850983002: Implement video frame acknowledgements in the chromoting protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/client_session.cc » ('j') | remoting/host/video_scheduler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host_unittest.cc
diff --git a/remoting/host/chromoting_host_unittest.cc b/remoting/host/chromoting_host_unittest.cc
index 19efc25c37052923a67f09d65b70870f9c6d9550..d2a9559b8d08314b5896471f3d840221efef8e03 100644
--- a/remoting/host/chromoting_host_unittest.cc
+++ b/remoting/host/chromoting_host_unittest.cc
@@ -28,7 +28,7 @@ using ::remoting::protocol::MockConnectionToClient;
using ::remoting::protocol::MockConnectionToClientEventHandler;
using ::remoting::protocol::MockHostStub;
using ::remoting::protocol::MockSession;
-using ::remoting::protocol::MockVideoStub;
+using ::remoting::protocol::MockVideoSender;
using ::remoting::protocol::Session;
using ::remoting::protocol::SessionConfig;
@@ -143,29 +143,29 @@ class ChromotingHostTest : public testing::Test {
&host_stub2_));
connection2_ = owned_connection2_.get();
- ON_CALL(video_stub1_, ProcessVideoPacketPtr(_, _))
+ ON_CALL(video_sender1_, ProcessVideoPacketPtr(_, _))
.WillByDefault(DeleteArg<0>());
- ON_CALL(video_stub2_, ProcessVideoPacketPtr(_, _))
+ ON_CALL(video_sender2_, ProcessVideoPacketPtr(_, _))
.WillByDefault(DeleteArg<0>());
- ON_CALL(*connection1_, video_stub())
- .WillByDefault(Return(&video_stub1_));
+ ON_CALL(*connection1_, video_sender())
+ .WillByDefault(Return(&video_sender1_));
ON_CALL(*connection1_, client_stub())
.WillByDefault(Return(&client_stub1_));
ON_CALL(*connection1_, session())
.WillByDefault(Return(session1_));
- ON_CALL(*connection2_, video_stub())
- .WillByDefault(Return(&video_stub2_));
+ ON_CALL(*connection2_, video_sender())
+ .WillByDefault(Return(&video_sender2_));
ON_CALL(*connection2_, client_stub())
.WillByDefault(Return(&client_stub2_));
ON_CALL(*connection2_, session())
.WillByDefault(Return(session2_));
- EXPECT_CALL(*connection1_, video_stub())
+ EXPECT_CALL(*connection1_, video_sender())
.Times(AnyNumber());
EXPECT_CALL(*connection1_, client_stub())
.Times(AnyNumber());
EXPECT_CALL(*connection1_, session())
.Times(AnyNumber());
- EXPECT_CALL(*connection2_, video_stub())
+ EXPECT_CALL(*connection2_, video_sender())
.Times(AnyNumber());
EXPECT_CALL(*connection2_, client_stub())
.Times(AnyNumber());
@@ -344,20 +344,20 @@ class ChromotingHostTest : public testing::Test {
template <class A>
Expectation ExpectClientConnected(int connection_index, A action) {
const std::string& session_jid = get_session_jid(connection_index);
- MockVideoStub& video_stub = get_video_stub(connection_index);
+ MockVideoSender& video_sender = get_video_sender(connection_index);
Expectation client_authenticated =
EXPECT_CALL(host_status_observer_, OnClientAuthenticated(session_jid));
EXPECT_CALL(host_status_observer_, OnClientConnected(session_jid))
.After(client_authenticated);
Expectation video_packet_sent =
- EXPECT_CALL(video_stub, ProcessVideoPacketPtr(_, _))
+ EXPECT_CALL(video_sender, ProcessVideoPacketPtr(_, _))
.After(client_authenticated)
.WillOnce(DoAll(
action,
RunDoneTask()))
.RetiresOnSaturation();
- EXPECT_CALL(video_stub, ProcessVideoPacketPtr(_, _))
+ EXPECT_CALL(video_sender, ProcessVideoPacketPtr(_, _))
.Times(AnyNumber())
.After(video_packet_sent)
.WillRepeatedly(RunDoneTask());
@@ -422,7 +422,7 @@ class ChromotingHostTest : public testing::Test {
std::string session_jid1_;
MockSession* session1_; // Owned by |connection_|.
SessionConfig session_config1_;
- MockVideoStub video_stub1_;
+ MockVideoSender video_sender1_;
MockClientStub client_stub1_;
MockHostStub host_stub1_;
MockConnectionToClient* connection2_;
@@ -431,7 +431,7 @@ class ChromotingHostTest : public testing::Test {
std::string session_jid2_;
MockSession* session2_; // Owned by |connection2_|.
SessionConfig session_config2_;
- MockVideoStub video_stub2_;
+ MockVideoSender video_sender2_;
MockClientStub client_stub2_;
MockHostStub host_stub2_;
scoped_ptr<MockSession> session_unowned1_; // Not owned by a connection.
@@ -463,8 +463,8 @@ class ChromotingHostTest : public testing::Test {
return (connection_index == 0) ? session_jid1_ : session_jid2_;
}
- MockVideoStub& get_video_stub(int connection_index) {
- return (connection_index == 0) ? video_stub1_ : video_stub2_;
+ MockVideoSender& get_video_sender(int connection_index) {
+ return (connection_index == 0) ? video_sender1_ : video_sender2_;
}
};
« no previous file with comments | « no previous file | remoting/host/client_session.cc » ('j') | remoting/host/video_scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698