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

Side by Side Diff: webrtc/media/engine/webrtcvideocapturer_unittest.cc

Issue 2765243002: Delete RawVideoType enum, use the VideoType enum instead. (Closed)
Patch Set: Define constant webrtc::kI420, for backwards compatibility. Created 3 years, 7 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 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 24 matching lines...) Expand all
35 public: 35 public:
36 WebRtcVideoCapturerTest() 36 WebRtcVideoCapturerTest()
37 : factory_(new FakeWebRtcVcmFactory), 37 : factory_(new FakeWebRtcVcmFactory),
38 capturer_(new cricket::WebRtcVideoCapturer(factory_)) { 38 capturer_(new cricket::WebRtcVideoCapturer(factory_)) {
39 factory_->device_info.AddDevice(kTestDeviceName, kTestDeviceId); 39 factory_->device_info.AddDevice(kTestDeviceName, kTestDeviceId);
40 // add a VGA/I420 capability 40 // add a VGA/I420 capability
41 webrtc::VideoCaptureCapability vga; 41 webrtc::VideoCaptureCapability vga;
42 vga.width = 640; 42 vga.width = 640;
43 vga.height = 480; 43 vga.height = 480;
44 vga.maxFPS = 30; 44 vga.maxFPS = 30;
45 vga.rawType = webrtc::kVideoI420; 45 vga.videoType = webrtc::VideoType::kI420;
46 factory_->device_info.AddCapability(kTestDeviceId, vga); 46 factory_->device_info.AddCapability(kTestDeviceId, vga);
47 } 47 }
48 48
49 protected: 49 protected:
50 FakeWebRtcVcmFactory* factory_; // owned by capturer_ 50 FakeWebRtcVcmFactory* factory_; // owned by capturer_
51 std::unique_ptr<cricket::WebRtcVideoCapturer> capturer_; 51 std::unique_ptr<cricket::WebRtcVideoCapturer> capturer_;
52 }; 52 };
53 53
54 TEST_F(WebRtcVideoCapturerTest, TestNotOpened) { 54 TEST_F(WebRtcVideoCapturerTest, TestNotOpened) {
55 EXPECT_EQ("", capturer_->GetId()); 55 EXPECT_EQ("", capturer_->GetId());
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 TEST_F(WebRtcVideoCapturerTest, TestCaptureWithoutInit) { 129 TEST_F(WebRtcVideoCapturerTest, TestCaptureWithoutInit) {
130 cricket::VideoFormat format; 130 cricket::VideoFormat format;
131 EXPECT_EQ(cricket::CS_FAILED, capturer_->Start(format)); 131 EXPECT_EQ(cricket::CS_FAILED, capturer_->Start(format));
132 EXPECT_TRUE(capturer_->GetCaptureFormat() == NULL); 132 EXPECT_TRUE(capturer_->GetCaptureFormat() == NULL);
133 EXPECT_FALSE(capturer_->IsRunning()); 133 EXPECT_FALSE(capturer_->IsRunning());
134 } 134 }
135 135
136 #endif // HAVE_WEBRTC_VIDEO 136 #endif // HAVE_WEBRTC_VIDEO
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideocapturer.cc ('k') | webrtc/modules/video_capture/device_info_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698