Use a standard Androidx test runner instead of the org.chromium one

Bug: webrtc:13662
Change-Id: I7ae28a61ea8f7e578d8aef8e3104f8564f3dd7b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256621
Auto-Submit: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36318}
This commit is contained in:
Xavier Lepaul
2022-03-24 11:14:51 +01:00
committed by WebRTC LUCI CQ
parent dacd31f5e8
commit a6fcbb1830
11 changed files with 21 additions and 21 deletions

View File

@ -1697,9 +1697,9 @@ if (is_android) {
":peerconnection_java", ":peerconnection_java",
":video_api_java", ":video_api_java",
":video_java", ":video_java",
"//base:base_java_test_support",
"//third_party/android_deps:guava_android_java", "//third_party/android_deps:guava_android_java",
"//third_party/androidx:androidx_annotation_annotation_java", "//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/google-truth:google_truth_java", "//third_party/google-truth:google_truth_java",
] ]

View File

@ -27,10 +27,10 @@ import android.graphics.SurfaceTexture;
import android.media.MediaCodecInfo.CodecCapabilities; import android.media.MediaCodecInfo.CodecCapabilities;
import android.media.MediaFormat; import android.media.MediaFormat;
import android.os.Handler; import android.os.Handler;
import androidx.test.runner.AndroidJUnit4;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.chromium.testing.local.LocalRobolectricTestRunner;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -46,7 +46,7 @@ import org.webrtc.VideoDecoder.DecodeInfo;
import org.webrtc.VideoFrame.I420Buffer; import org.webrtc.VideoFrame.I420Buffer;
import org.webrtc.VideoFrame.TextureBuffer.Type; import org.webrtc.VideoFrame.TextureBuffer.Type;
@RunWith(LocalRobolectricTestRunner.class) @RunWith(AndroidJUnit4.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class AndroidVideoDecoderTest { public class AndroidVideoDecoderTest {
private static final VideoDecoder.Settings TEST_DECODER_SETTINGS = private static final VideoDecoder.Settings TEST_DECODER_SETTINGS =

View File

@ -13,8 +13,8 @@ package org.webrtc;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.webrtc.CameraEnumerationAndroid.getClosestSupportedFramerateRange; import static org.webrtc.CameraEnumerationAndroid.getClosestSupportedFramerateRange;
import androidx.test.runner.AndroidJUnit4;
import java.util.Arrays; import java.util.Arrays;
import org.chromium.testing.local.LocalRobolectricTestRunner;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.Config; import org.robolectric.annotation.Config;
@ -23,7 +23,7 @@ import org.webrtc.CameraEnumerationAndroid.CaptureFormat.FramerateRange;
/** /**
* Tests for CameraEnumerationAndroid. * Tests for CameraEnumerationAndroid.
*/ */
@RunWith(LocalRobolectricTestRunner.class) @RunWith(AndroidJUnit4.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class CameraEnumerationTest { public class CameraEnumerationTest {
@Test @Test

View File

@ -12,13 +12,13 @@ package org.webrtc;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;
import org.chromium.testing.local.LocalRobolectricTestRunner; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.Config; import org.robolectric.annotation.Config;
import org.webrtc.CryptoOptions; import org.webrtc.CryptoOptions;
@RunWith(LocalRobolectricTestRunner.class) @RunWith(AndroidJUnit4.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class CryptoOptionsTest { public class CryptoOptionsTest {
// Validates the builder builds by default all false options. // Validates the builder builds by default all false options.

View File

@ -12,13 +12,13 @@ package org.webrtc;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;
import org.chromium.testing.local.LocalRobolectricTestRunner; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.Config; import org.robolectric.annotation.Config;
import org.webrtc.VideoEncoder.ScalingSettings; import org.webrtc.VideoEncoder.ScalingSettings;
@RunWith(LocalRobolectricTestRunner.class) @RunWith(AndroidJUnit4.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class FramerateBitrateAdjusterTest { public class FramerateBitrateAdjusterTest {
@Test @Test

View File

@ -16,7 +16,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions;
import org.chromium.testing.local.LocalRobolectricTestRunner; import androidx.test.runner.AndroidJUnit4;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@ -24,7 +24,7 @@ import org.junit.runner.RunWith;
import org.robolectric.annotation.Config; import org.robolectric.annotation.Config;
import org.webrtc.GlShader; import org.webrtc.GlShader;
@RunWith(LocalRobolectricTestRunner.class) @RunWith(AndroidJUnit4.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class GlGenericDrawerTest { public class GlGenericDrawerTest {
// Simplest possible valid generic fragment shader. // Simplest possible valid generic fragment shader.

View File

@ -23,10 +23,10 @@ import android.media.MediaCodec;
import android.media.MediaCodecInfo; import android.media.MediaCodecInfo;
import android.media.MediaFormat; import android.media.MediaFormat;
import android.os.Bundle; import android.os.Bundle;
import androidx.test.runner.AndroidJUnit4;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.chromium.testing.local.LocalRobolectricTestRunner;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -47,7 +47,7 @@ import org.webrtc.VideoFrame;
import org.webrtc.VideoFrame.Buffer; import org.webrtc.VideoFrame.Buffer;
import org.webrtc.VideoFrame.I420Buffer; import org.webrtc.VideoFrame.I420Buffer;
@RunWith(LocalRobolectricTestRunner.class) @RunWith(AndroidJUnit4.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class HardwareVideoEncoderTest { public class HardwareVideoEncoderTest {
private static final VideoEncoder.Settings TEST_ENCODER_SETTINGS = new Settings( private static final VideoEncoder.Settings TEST_ENCODER_SETTINGS = new Settings(

View File

@ -12,13 +12,13 @@ package org.webrtc;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;
import org.chromium.testing.local.LocalRobolectricTestRunner; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.Config; import org.robolectric.annotation.Config;
import org.webrtc.IceCandidate; import org.webrtc.IceCandidate;
@RunWith(LocalRobolectricTestRunner.class) @RunWith(AndroidJUnit4.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class IceCandidateTest { public class IceCandidateTest {
@Test @Test

View File

@ -14,7 +14,7 @@ import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.never; import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import org.chromium.testing.local.LocalRobolectricTestRunner; import androidx.test.runner.AndroidJUnit4;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -22,7 +22,7 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
import org.robolectric.annotation.Config; import org.robolectric.annotation.Config;
@RunWith(LocalRobolectricTestRunner.class) @RunWith(AndroidJUnit4.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class RefCountDelegateTest { public class RefCountDelegateTest {
@Mock Runnable mockReleaseCallback; @Mock Runnable mockReleaseCallback;

View File

@ -12,13 +12,13 @@ package org.webrtc;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import org.chromium.testing.local.LocalRobolectricTestRunner; import androidx.test.runner.AndroidJUnit4;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.robolectric.annotation.Config; import org.robolectric.annotation.Config;
import org.webrtc.VideoEncoder.ScalingSettings; import org.webrtc.VideoEncoder.ScalingSettings;
@RunWith(LocalRobolectricTestRunner.class) @RunWith(AndroidJUnit4.class)
@Config(manifest = Config.NONE) @Config(manifest = Config.NONE)
public class ScalingSettingsTest { public class ScalingSettingsTest {
@Test @Test

View File

@ -20,7 +20,7 @@ import static org.mockito.Mockito.when;
import android.media.AudioTrack; import android.media.AudioTrack;
import android.os.Build; import android.os.Build;
import org.chromium.testing.local.LocalRobolectricTestRunner; import androidx.test.runner.AndroidJUnit4;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -32,7 +32,7 @@ import org.webrtc.audio.LowLatencyAudioBufferManager;
/** /**
* Tests for LowLatencyAudioBufferManager. * Tests for LowLatencyAudioBufferManager.
*/ */
@RunWith(LocalRobolectricTestRunner.class) @RunWith(AndroidJUnit4.class)
@Config(manifest = Config.NONE, sdk = Build.VERSION_CODES.O) @Config(manifest = Config.NONE, sdk = Build.VERSION_CODES.O)
public class LowLatencyAudioBufferManagerTest { public class LowLatencyAudioBufferManagerTest {
@Mock private AudioTrack mockAudioTrack; @Mock private AudioTrack mockAudioTrack;