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

Unified Diff: webrtc/examples/androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java

Issue 2621253002: Update AppRTCMobile tests to use JUnit4. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/examples/androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java
diff --git a/webrtc/examples/androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java b/webrtc/examples/androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java
index 93e18ee4bf7dcb1560302ad40913e056af68f94c..1a61d58c1d2f48de16c7543b1c17788e66ace0c3 100644
--- a/webrtc/examples/androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java
+++ b/webrtc/examples/androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java
@@ -10,21 +10,25 @@
package org.appspot.apprtc.test;
-import android.test.InstrumentationTestCase;
-import android.test.suitebuilder.annotation.LargeTest;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import org.webrtc.FileVideoCapturer;
-import org.webrtc.VideoCapturer;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import android.support.test.filters.LargeTest;
+import android.support.test.filters.MediumTest;
+import android.support.test.filters.SmallTest;
import java.io.IOException;
import java.lang.Thread;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
+import org.chromium.base.test.BaseJUnit4ClassRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.webrtc.FileVideoCapturer;
+import org.webrtc.VideoCapturer;
-public class FileVideoCapturerTest extends InstrumentationTestCase {
+@RunWith(BaseJUnit4ClassRunner.class)
+public class FileVideoCapturerTest {
private static class Frame {
public byte[] data;
public int width;
@@ -71,6 +75,7 @@ public class FileVideoCapturerTest extends InstrumentationTestCase {
}
}
+ @Test
@SmallTest
public void testVideoCaptureFromFile() throws InterruptedException, IOException {
final int FRAME_WIDTH = 4;

Powered by Google App Engine
This is Rietveld 408576698