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

Unified Diff: remoting/host/session_manager_unittest.cc

Issue 2963003: Changing UpdateStreamPacket protobuf definition for chromoting (Closed)
Patch Set: fixed comments Created 10 years, 5 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 | « remoting/host/session_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/session_manager_unittest.cc
diff --git a/remoting/host/session_manager_unittest.cc b/remoting/host/session_manager_unittest.cc
index 5a4e4eb295243e0a6868805b2575874ca59f4c6e..e6d81140886dec8e07e887185eacaac05f2d1af4 100644
--- a/remoting/host/session_manager_unittest.cc
+++ b/remoting/host/session_manager_unittest.cc
@@ -58,18 +58,11 @@ ACTION_P2(RunCallback, rects, data) {
delete arg0;
}
-ACTION_P3(FinishDecode, rects, buffer, header) {
- gfx::Rect& rect = (*rects)[0];
+ACTION_P(FinishEncode, msg) {
Encoder::EncodingState state = (Encoder::EncodingStarting |
Encoder::EncodingInProgress |
Encoder::EncodingEnded);
- header->set_x(rect.x());
- header->set_y(rect.y());
- header->set_width(rect.width());
- header->set_height(rect.height());
- header->set_encoding(kEncoding);
- header->set_pixel_format(kFormat);
- arg2->Run(header, *buffer, state);
+ arg2->Run(msg, state);
}
ACTION_P(AssignCaptureData, data) {
@@ -111,15 +104,13 @@ TEST_F(SessionManagerTest, OneRecordCycle) {
.WillOnce(RunCallback(update_rects, data));
// Expect the encoder be called.
- scoped_refptr<media::DataBuffer> buffer = new media::DataBuffer(0);
- UpdateStreamPacketHeader *header = new UpdateStreamPacketHeader;
+ HostMessage* msg = new HostMessage();
EXPECT_CALL(*encoder_, Encode(data, false, NotNull()))
- .WillOnce(FinishDecode(&update_rects, &buffer, header));
+ .WillOnce(FinishEncode(msg));
// Expect the client be notified.
EXPECT_CALL(*client_, SendBeginUpdateStreamMessage());
-
- EXPECT_CALL(*client_, SendUpdateStreamPacketMessage(header ,buffer));
+ EXPECT_CALL(*client_, SendUpdateStreamPacketMessage(_));
EXPECT_CALL(*client_, SendEndUpdateStreamMessage());
EXPECT_CALL(*client_, GetPendingUpdateStreamMessages())
.Times(AtLeast(0))
« no previous file with comments | « remoting/host/session_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698