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

Side by Side Diff: remoting/base/codec_test.cc

Issue 3005036: Implement VP8 encoder for chromoting (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: just uploading Created 10 years, 3 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 unified diff | Download patch
« no previous file with comments | « media/base/media_win.cc ('k') | remoting/base/encoder_vp8.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <deque> 5 #include <deque>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "gfx/rect.h" 8 #include "gfx/rect.h"
9 #include "media/base/video_frame.h" 9 #include "media/base/video_frame.h"
10 #include "remoting/base/codec_test.h" 10 #include "remoting/base/codec_test.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 : begin_rect_(0), 71 : begin_rect_(0),
72 rect_data_(0), 72 rect_data_(0),
73 end_rect_(0), 73 end_rect_(0),
74 added_rects_(0), 74 added_rects_(0),
75 state_(kWaitingForBeginRect), 75 state_(kWaitingForBeginRect),
76 strict_(false) { 76 strict_(false) {
77 } 77 }
78 78
79 ~EncoderMessageTester() { 79 ~EncoderMessageTester() {
80 EXPECT_EQ(begin_rect_, end_rect_); 80 EXPECT_EQ(begin_rect_, end_rect_);
81 EXPECT_GT(begin_rect_, 0);
81 EXPECT_EQ(kWaitingForBeginRect, state_); 82 EXPECT_EQ(kWaitingForBeginRect, state_);
82 if (strict_){ 83 if (strict_) {
83 EXPECT_EQ(begin_rect_, added_rects_); 84 EXPECT_EQ(added_rects_, begin_rect_);
84 } 85 }
85 } 86 }
86 87
87 // Test that we received the correct message. 88 // Test that we received the correct message.
88 void ReceivedMessage(ChromotingHostMessage* message) { 89 void ReceivedMessage(ChromotingHostMessage* message) {
89 EXPECT_TRUE(message->has_update_stream_packet()); 90 EXPECT_TRUE(message->has_update_stream_packet());
90 91
91 if (state_ == kWaitingForBeginRect) { 92 if (state_ == kWaitingForBeginRect) {
92 EXPECT_TRUE(message->update_stream_packet().has_begin_rect()); 93 EXPECT_TRUE(message->update_stream_packet().has_begin_rect());
93 state_ = kWaitingForRectData; 94 state_ = kWaitingForRectData;
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 TestEncodingRects(encoder, &encoder_tester, &decoder_tester, data, 422 TestEncodingRects(encoder, &encoder_tester, &decoder_tester, data,
422 kTestRects + 2, 1); 423 kTestRects + 2, 1);
423 TestEncodingRects(encoder, &encoder_tester, &decoder_tester, data, 424 TestEncodingRects(encoder, &encoder_tester, &decoder_tester, data,
424 kTestRects + 3, 2); 425 kTestRects + 3, 2);
425 delete [] memory; 426 delete [] memory;
426 } 427 }
427 428
428 } // namespace remoting 429 } // namespace remoting
429 430
430 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::DecoderTester); 431 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::DecoderTester);
OLDNEW
« no previous file with comments | « media/base/media_win.cc ('k') | remoting/base/encoder_vp8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698