Remove dependency to android_support_test_runner in webrtc
Make WebRTC compatible with changes introduced in https://crbug.com/1428304
Bug: chromium:1428304
Change-Id: I464a09545dc3a158ea4108bb63c7b8c4a05adc6b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300263
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39763}
diff --git a/DEPS b/DEPS
index ecc8797..f6ec926 100644
--- a/DEPS
+++ b/DEPS
@@ -349,17 +349,6 @@
'dep_type': 'cipd',
},
- 'src/third_party/android_support_test_runner': {
- 'packages': [
- {
- 'package': 'chromium/third_party/android_support_test_runner',
- 'version': '96d4bf848cd210fdcbca6bcc8c1b4b39cbd93141',
- },
- ],
- 'condition': 'checkout_android',
- 'dep_type': 'cipd',
- },
-
'src/third_party/byte_buddy': {
'packages': [
{
diff --git a/examples/BUILD.gn b/examples/BUILD.gn
index ea1793b..39715c8 100644
--- a/examples/BUILD.gn
+++ b/examples/BUILD.gn
@@ -221,7 +221,7 @@
"../sdk/android:peerconnection_java",
"../sdk/android:video_api_java",
"../sdk/android:video_java",
- "//third_party/android_support_test_runner:runner_java",
+ "//third_party/androidx:androidx_test_monitor_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/junit",
]
diff --git a/examples/aarproject/app/build.gradle b/examples/aarproject/app/build.gradle
index c44d1d1..70669c3 100644
--- a/examples/aarproject/app/build.gradle
+++ b/examples/aarproject/app/build.gradle
@@ -48,6 +48,6 @@
implementation fileTree(dir: '../../androidapp/third_party/autobanh/lib', include: ['autobanh.jar'])
implementation 'androidx.annotation:annotation:1.2.0'
testImplementation 'junit:junit:4.12'
- androidTestImplementation 'com.android.support.test:runner:1.0.1'
- androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
+ androidTestImplementation 'com.androidx.test:runner:1.0.1'
+ androidTestImplementation 'com.androidx.test.espresso:espresso-core:3.0.1'
}
diff --git a/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java b/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
index 051d737..9c3c779 100644
--- a/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
+++ b/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java
@@ -14,10 +14,10 @@
import static org.junit.Assert.fail;
import android.os.Build;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
diff --git a/sdk/android/BUILD.gn b/sdk/android/BUILD.gn
index b3abdc7..5bf25ff 100644
--- a/sdk/android/BUILD.gn
+++ b/sdk/android/BUILD.gn
@@ -1521,9 +1521,9 @@
"//base:base_java_test_support",
"//rtc_base:base_java",
"//third_party/android_deps:guava_android_java",
- "//third_party/android_support_test_runner:rules_java",
- "//third_party/android_support_test_runner:runner_java",
"//third_party/androidx:androidx_annotation_annotation_java",
+ "//third_party/androidx:androidx_test_monitor_java",
+ "//third_party/androidx:androidx_test_rules_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/google-truth:google_truth_java",
"//third_party/hamcrest:hamcrest_java",
@@ -1680,7 +1680,7 @@
":video_api_java",
":video_java",
"../../rtc_base:base_java",
- "//third_party/android_support_test_runner:runner_java",
+ "//third_party/androidx:androidx_test_monitor_java",
"//third_party/androidx:androidx_test_runner_java",
]
}
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java b/sdk/android/instrumentationtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java
index 37d03d9..b83a77d 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java
@@ -11,7 +11,7 @@
package org.webrtc;
import android.content.Context;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.filters.MediumTest;
import androidx.test.filters.SmallTest;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java b/sdk/android/instrumentationtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java
index e041917..582c3b8 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java
@@ -11,7 +11,7 @@
package org.webrtc;
import android.content.Context;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.filters.MediumTest;
import androidx.test.filters.SmallTest;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/Camera2CapturerTest.java b/sdk/android/instrumentationtests/src/org/webrtc/Camera2CapturerTest.java
index b017371..00bbff0 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/Camera2CapturerTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/Camera2CapturerTest.java
@@ -18,8 +18,8 @@
import android.hardware.camera2.CameraManager;
import android.os.Handler;
import android.os.Looper;
-import android.support.test.InstrumentationRegistry;
import androidx.annotation.Nullable;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.filters.MediumTest;
import androidx.test.filters.SmallTest;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/EglRendererTest.java b/sdk/android/instrumentationtests/src/org/webrtc/EglRendererTest.java
index 8b5e95b..3748cc3 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/EglRendererTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/EglRendererTest.java
@@ -21,7 +21,7 @@
import android.graphics.SurfaceTexture;
import android.opengl.GLES11Ext;
import android.opengl.GLES20;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import java.nio.ByteBuffer;
import java.util.ArrayList;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/LoggableTest.java b/sdk/android/instrumentationtests/src/org/webrtc/LoggableTest.java
index 780eeb6..02e364b 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/LoggableTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/LoggableTest.java
@@ -13,7 +13,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import java.util.ArrayList;
import org.junit.Test;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/NetworkMonitorTest.java b/sdk/android/instrumentationtests/src/org/webrtc/NetworkMonitorTest.java
index b646f1f..d81bce2 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/NetworkMonitorTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/NetworkMonitorTest.java
@@ -29,8 +29,8 @@
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
-import android.support.test.InstrumentationRegistry;
import androidx.annotation.Nullable;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.MediumTest;
import androidx.test.filters.SmallTest;
import java.util.Arrays;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionEndToEndTest.java b/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionEndToEndTest.java
index d763ff2..e433fa4 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionEndToEndTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionEndToEndTest.java
@@ -17,8 +17,8 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import android.support.test.InstrumentationRegistry;
import androidx.annotation.Nullable;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.MediumTest;
import androidx.test.filters.SmallTest;
import java.lang.ref.WeakReference;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionFactoryTest.java b/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionFactoryTest.java
index 8eebfb5..a28b9c2 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionFactoryTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionFactoryTest.java
@@ -10,7 +10,7 @@
package org.webrtc;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import org.junit.Test;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionTest.java b/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionTest.java
index 7ced991..0da8dc2 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/PeerConnectionTest.java
@@ -18,7 +18,7 @@
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import java.util.Arrays;
import java.util.List;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/RtpSenderTest.java b/sdk/android/instrumentationtests/src/org/webrtc/RtpSenderTest.java
index 9f315d5..602ccce 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/RtpSenderTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/RtpSenderTest.java
@@ -16,7 +16,7 @@
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import java.util.Arrays;
import org.junit.Before;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/RtpTransceiverTest.java b/sdk/android/instrumentationtests/src/org/webrtc/RtpTransceiverTest.java
index a53ff20..d77650f 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/RtpTransceiverTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/RtpTransceiverTest.java
@@ -13,7 +13,7 @@
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import java.util.ArrayList;
import java.util.Arrays;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java b/sdk/android/instrumentationtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java
index 4d49978..2e3ab40 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java
@@ -15,11 +15,11 @@
import android.annotation.SuppressLint;
import android.graphics.Point;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.annotation.UiThreadTest;
-import android.support.test.rule.UiThreadTestRule;
import android.view.View.MeasureSpec;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.annotation.UiThreadTest;
import androidx.test.filters.MediumTest;
+import androidx.test.rule.UiThreadTestRule;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.List;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/VideoTrackTest.java b/sdk/android/instrumentationtests/src/org/webrtc/VideoTrackTest.java
index 8d7894c..9086939 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/VideoTrackTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/VideoTrackTest.java
@@ -13,7 +13,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import org.junit.Before;
import org.junit.Test;
diff --git a/sdk/android/instrumentationtests/src/org/webrtc/WebRtcJniBootTest.java b/sdk/android/instrumentationtests/src/org/webrtc/WebRtcJniBootTest.java
index b1badd5..a53a6dc 100644
--- a/sdk/android/instrumentationtests/src/org/webrtc/WebRtcJniBootTest.java
+++ b/sdk/android/instrumentationtests/src/org/webrtc/WebRtcJniBootTest.java
@@ -10,7 +10,7 @@
package org.webrtc;
-import android.support.test.InstrumentationRegistry;
+import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
import org.junit.Test;
import org.webrtc.PeerConnectionFactory;