Index: talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java |
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java b/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java |
index dbbe5963cd6ba5e67aa0c871179154c6e83be7cb..54fa5d4c86ed5d2e4893bd50ecbb0672a6da18ab 100644 |
--- a/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java |
+++ b/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java |
@@ -258,4 +258,16 @@ public class VideoCapturerAndroidTest extends ActivityTestCase { |
VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); |
VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer); |
} |
+ |
+ |
+ @MediumTest |
+ // This test that CameraEventsHandler.onError is triggered if video buffers are not returned to |
+ // the capturer. |
+ public void testCameraErrorEventOnBufferStarvation() throws InterruptedException { |
+ VideoCapturerAndroidTestFixtures.CameraEvents cameraEvents = |
+ VideoCapturerAndroidTestFixtures.createCameraEvents(); |
+ VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", cameraEvents); |
+ VideoCapturerAndroidTestFixtures.cameraErrorEventOnBufferStarvation(capturer, |
+ cameraEvents, getInstrumentation().getContext()); |
+ } |
} |