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

Unified Diff: remoting/client/decoder_verbatim_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/client/decoder_verbatim.cc ('k') | remoting/client/simple_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/decoder_verbatim_unittest.cc
diff --git a/remoting/client/decoder_verbatim_unittest.cc b/remoting/client/decoder_verbatim_unittest.cc
index ca2c6f75b49fb04046070fbaf1a60b419a55c08e..d541d2202af3592e7e3537ff36dbb19a94eccb1e 100644
--- a/remoting/client/decoder_verbatim_unittest.cc
+++ b/remoting/client/decoder_verbatim_unittest.cc
@@ -20,13 +20,22 @@ TEST(DecoderVerbatimTest, SimpleDecode) {
const size_t kHeight = 1;
const char kData[] = "ABCDEFGHIJ";
scoped_ptr<HostMessage> msg(new HostMessage());
- msg->mutable_update_stream_packet()->mutable_header()->set_width(kWidth);
- msg->mutable_update_stream_packet()->mutable_header()->set_height(kHeight);
- msg->mutable_update_stream_packet()->mutable_header()->set_x(0);
- msg->mutable_update_stream_packet()->mutable_header()->set_y(0);
- msg->mutable_update_stream_packet()->mutable_header()->set_pixel_format(
- PixelFormatAscii);
- msg->mutable_update_stream_packet()->set_data(kData, sizeof(kData));
+
+ // Prepare the begin rect message.
+ UpdateStreamBeginRect* begin_rect =
+ msg->mutable_update_stream_packet()->mutable_begin_rect();
+ begin_rect->set_width(kWidth);
+ begin_rect->set_height(kHeight);
+ begin_rect->set_x(0);
+ begin_rect->set_y(0);
+ begin_rect->set_pixel_format(PixelFormatAscii);
+
+ // Prepare the rect data.
+ msg->mutable_update_stream_packet()->mutable_rect_data()->set_data(
+ kData, sizeof(kData));
+
+ // Prepare the end rect.
+ msg->mutable_update_stream_packet()->mutable_end_rect();
scoped_refptr<media::VideoFrame> frame;
media::VideoFrame::CreateFrame(media::VideoFrame::ASCII, kWidth, kHeight,
« no previous file with comments | « remoting/client/decoder_verbatim.cc ('k') | remoting/client/simple_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698