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

Side by Side Diff: remoting/host/video_frame_recorder_unittest.cc

Issue 530243002: Move common VideoPacket initialization into VideoEncoderHelper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit tests Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "remoting/host/video_frame_recorder.h" 5 #include "remoting/host/video_frame_recorder.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "remoting/codec/video_encoder_verbatim.h" 10 #include "remoting/codec/video_encoder_verbatim.h"
11 #include "remoting/proto/video.pb.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 13 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
13 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 14 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
14 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" 15 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
15 16
16 namespace webrtc { 17 namespace webrtc {
17 18
18 // Define equality operator for DesktopFrame to allow use of EXPECT_EQ(). 19 // Define equality operator for DesktopFrame to allow use of EXPECT_EQ().
19 static bool operator==(const DesktopFrame& a, 20 static bool operator==(const DesktopFrame& a,
20 const DesktopFrame& b) { 21 const DesktopFrame& b) {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 EncodeTestFrames(); 303 EncodeTestFrames();
303 304
304 // Clear the list of expected test frames, since none should be recorded. 305 // Clear the list of expected test frames, since none should be recorded.
305 STLDeleteElements(&test_frames_); 306 STLDeleteElements(&test_frames_);
306 307
307 // Verify that the recorded frames match the ones passed to the encoder. 308 // Verify that the recorded frames match the ones passed to the encoder.
308 VerifyTestFrames(); 309 VerifyTestFrames();
309 } 310 }
310 311
311 } // namespace remoting 312 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698