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

Side by Side Diff: talk/app/webrtc/remotevideocapturer_unittest.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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 | « talk/app/webrtc/remotevideocapturer.cc ('k') | talk/app/webrtc/rtpreceiver.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 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // Stop 98 // Stop
99 capturer_.Stop(); 99 capturer_.Stop();
100 EXPECT_TRUE_WAIT((cricket::CS_STOPPED == capture_state()), kMaxWaitMs); 100 EXPECT_TRUE_WAIT((cricket::CS_STOPPED == capture_state()), kMaxWaitMs);
101 EXPECT_TRUE(NULL == capturer_.GetCaptureFormat()); 101 EXPECT_TRUE(NULL == capturer_.GetCaptureFormat());
102 } 102 }
103 103
104 TEST_F(RemoteVideoCapturerTest, GetPreferredFourccs) { 104 TEST_F(RemoteVideoCapturerTest, GetPreferredFourccs) {
105 EXPECT_FALSE(capturer_.GetPreferredFourccs(NULL)); 105 EXPECT_FALSE(capturer_.GetPreferredFourccs(NULL));
106 106
107 std::vector<uint32> fourccs; 107 std::vector<uint32_t> fourccs;
108 EXPECT_TRUE(capturer_.GetPreferredFourccs(&fourccs)); 108 EXPECT_TRUE(capturer_.GetPreferredFourccs(&fourccs));
109 EXPECT_EQ(1u, fourccs.size()); 109 EXPECT_EQ(1u, fourccs.size());
110 EXPECT_EQ(cricket::FOURCC_I420, fourccs.at(0)); 110 EXPECT_EQ(cricket::FOURCC_I420, fourccs.at(0));
111 } 111 }
112 112
113 TEST_F(RemoteVideoCapturerTest, GetBestCaptureFormat) { 113 TEST_F(RemoteVideoCapturerTest, GetBestCaptureFormat) {
114 VideoFormat desired = VideoFormat(kTestFormat); 114 VideoFormat desired = VideoFormat(kTestFormat);
115 EXPECT_FALSE(capturer_.GetBestCaptureFormat(desired, NULL)); 115 EXPECT_FALSE(capturer_.GetBestCaptureFormat(desired, NULL));
116 116
117 VideoFormat expected_format = VideoFormat(kTestFormat); 117 VideoFormat expected_format = VideoFormat(kTestFormat);
118 expected_format.fourcc = cricket::FOURCC_I420; 118 expected_format.fourcc = cricket::FOURCC_I420;
119 VideoFormat best_format; 119 VideoFormat best_format;
120 EXPECT_TRUE(capturer_.GetBestCaptureFormat(desired, &best_format)); 120 EXPECT_TRUE(capturer_.GetBestCaptureFormat(desired, &best_format));
121 EXPECT_EQ(expected_format, best_format); 121 EXPECT_EQ(expected_format, best_format);
122 } 122 }
123 123
124 TEST_F(RemoteVideoCapturerTest, InputFrame) { 124 TEST_F(RemoteVideoCapturerTest, InputFrame) {
125 EXPECT_EQ(0, captured_frame_num()); 125 EXPECT_EQ(0, captured_frame_num());
126 126
127 cricket::WebRtcVideoFrame test_frame; 127 cricket::WebRtcVideoFrame test_frame;
128 capturer_.SignalVideoFrame(&capturer_, &test_frame); 128 capturer_.SignalVideoFrame(&capturer_, &test_frame);
129 EXPECT_EQ(1, captured_frame_num()); 129 EXPECT_EQ(1, captured_frame_num());
130 capturer_.SignalVideoFrame(&capturer_, &test_frame); 130 capturer_.SignalVideoFrame(&capturer_, &test_frame);
131 EXPECT_EQ(2, captured_frame_num()); 131 EXPECT_EQ(2, captured_frame_num());
132 } 132 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/remotevideocapturer.cc ('k') | talk/app/webrtc/rtpreceiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698