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

Side by Side Diff: webrtc/api/androidtests/src/org/webrtc/Camera2CapturerTest.java

Issue 2202183002: Fix testReturnBufferLate incorrectly calling end to end test. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 | « webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java ('k') | no next file » | 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 * Copyright 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2016 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
11 package org.webrtc; 11 package org.webrtc;
12 12
13 import org.webrtc.CameraEnumerationAndroid.CaptureFormat; 13 import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
14 14
15 import android.content.Context; 15 import android.content.Context;
16 import android.hardware.camera2.CameraAccessException;
16 import android.hardware.camera2.CameraDevice; 17 import android.hardware.camera2.CameraDevice;
17 import android.hardware.camera2.CameraManager; 18 import android.hardware.camera2.CameraManager;
18 import android.hardware.camera2.CameraAccessException;
19 import android.os.Handler; 19 import android.os.Handler;
20 import android.os.Looper; 20 import android.os.Looper;
21 import android.test.InstrumentationTestCase; 21 import android.test.InstrumentationTestCase;
22 import android.test.suitebuilder.annotation.LargeTest;
23 import android.test.suitebuilder.annotation.MediumTest;
22 import android.test.suitebuilder.annotation.SmallTest; 24 import android.test.suitebuilder.annotation.SmallTest;
23 import android.test.suitebuilder.annotation.MediumTest;
24 import android.test.suitebuilder.annotation.LargeTest;
25 25
26 import java.util.concurrent.CountDownLatch; 26 import java.util.concurrent.CountDownLatch;
27 27
28 public class Camera2CapturerTest extends InstrumentationTestCase { 28 public class Camera2CapturerTest extends InstrumentationTestCase {
29 static final String TAG = "Camera2CapturerTest"; 29 static final String TAG = "Camera2CapturerTest";
30 30
31 /** 31 /**
32 * Simple camera2 implementation that only knows how to open the camera and cl ose it. 32 * Simple camera2 implementation that only knows how to open the camera and cl ose it.
33 */ 33 */
34 private class SimpleCamera2 { 34 private class SimpleCamera2 {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // It does not test or use the C++ layer. 246 // It does not test or use the C++ layer.
247 @LargeTest 247 @LargeTest
248 public void testStartStopWithDifferentResolutions() throws InterruptedExceptio n { 248 public void testStartStopWithDifferentResolutions() throws InterruptedExceptio n {
249 fixtures.startStopWithDifferentResolutions(); 249 fixtures.startStopWithDifferentResolutions();
250 } 250 }
251 251
252 // This test what happens if buffers are returned after the capturer have 252 // This test what happens if buffers are returned after the capturer have
253 // been stopped and restarted. It does not test or use the C++ layer. 253 // been stopped and restarted. It does not test or use the C++ layer.
254 @LargeTest 254 @LargeTest
255 public void testReturnBufferLate() throws InterruptedException { 255 public void testReturnBufferLate() throws InterruptedException {
256 fixtures.returnBufferLateEndToEnd(); 256 fixtures.returnBufferLate();
257 } 257 }
258 258
259 // This test that we can capture frames, keep the frames in a local renderer, stop capturing, 259 // This test that we can capture frames, keep the frames in a local renderer, stop capturing,
260 // and then return the frames. The difference between the test testReturnBuffe rLate() is that we 260 // and then return the frames. The difference between the test testReturnBuffe rLate() is that we
261 // also test the JNI and C++ AndroidVideoCapturer parts. 261 // also test the JNI and C++ AndroidVideoCapturer parts.
262 @MediumTest 262 @MediumTest
263 public void testReturnBufferLateEndToEnd() throws InterruptedException { 263 public void testReturnBufferLateEndToEnd() throws InterruptedException {
264 fixtures.returnBufferLateEndToEnd(); 264 fixtures.returnBufferLateEndToEnd();
265 } 265 }
266 266
(...skipping 25 matching lines...) Expand all
292 fixtures.startWhileCameraIsAlreadyOpenAndCloseCamera(); 292 fixtures.startWhileCameraIsAlreadyOpenAndCloseCamera();
293 } 293 }
294 294
295 // This test that CameraVideoCapturer.stop can be called while CameraVideoCapt urer is 295 // This test that CameraVideoCapturer.stop can be called while CameraVideoCapt urer is
296 // re-trying to start. 296 // re-trying to start.
297 @MediumTest 297 @MediumTest
298 public void testStartWhileCameraIsAlreadyOpenAndStop() throws InterruptedExcep tion { 298 public void testStartWhileCameraIsAlreadyOpenAndStop() throws InterruptedExcep tion {
299 fixtures.startWhileCameraIsAlreadyOpenAndStop(); 299 fixtures.startWhileCameraIsAlreadyOpenAndStop();
300 } 300 }
301 } 301 }
OLDNEW
« no previous file with comments | « webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698