diff --git a/webrtc/api/BUILD.gn b/webrtc/api/BUILD.gn index cf3073d500..1b10e2d06f 100644 --- a/webrtc/api/BUILD.gn +++ b/webrtc/api/BUILD.gn @@ -482,10 +482,10 @@ if (rtc_include_tests) { "androidtests/src/org/webrtc/RendererCommonTest.java", "androidtests/src/org/webrtc/SurfaceTextureHelperTest.java", "androidtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java", + "androidtests/src/org/webrtc/WebRtcJniBootTest.java", ] deps = [ - ":libjingle_peerconnection_android_unittest_resources", ":libjingle_peerconnection_java", "../base:base_java", "//base:base_java", @@ -493,10 +493,5 @@ if (rtc_include_tests) { shared_libraries = [ ":libjingle_peerconnection_so" ] } - - android_resources("libjingle_peerconnection_android_unittest_resources") { - resource_dirs = [ "androidtests/res" ] - custom_package = "org.webrtc" - } } } diff --git a/webrtc/api/androidtests/AndroidManifest.xml b/webrtc/api/androidtests/AndroidManifest.xml index 0b3b0b1268..90f0aec1ed 100644 --- a/webrtc/api/androidtests/AndroidManifest.xml +++ b/webrtc/api/androidtests/AndroidManifest.xml @@ -22,8 +22,7 @@ android:targetPackage="org.webrtc.test" /> + android:label="AndroidPeerconnectionTests" > diff --git a/webrtc/api/androidtests/res/drawable-hdpi/ic_launcher.png b/webrtc/api/androidtests/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index 96a442e5b8..0000000000 Binary files a/webrtc/api/androidtests/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/webrtc/api/androidtests/res/drawable-ldpi/ic_launcher.png b/webrtc/api/androidtests/res/drawable-ldpi/ic_launcher.png deleted file mode 100644 index 99238729d8..0000000000 Binary files a/webrtc/api/androidtests/res/drawable-ldpi/ic_launcher.png and /dev/null differ diff --git a/webrtc/api/androidtests/res/drawable-mdpi/ic_launcher.png b/webrtc/api/androidtests/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 359047dfa4..0000000000 Binary files a/webrtc/api/androidtests/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/webrtc/api/androidtests/res/drawable-xhdpi/ic_launcher.png b/webrtc/api/androidtests/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index 71c6d760f0..0000000000 Binary files a/webrtc/api/androidtests/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/webrtc/api/androidtests/res/values/strings.xml b/webrtc/api/androidtests/res/values/strings.xml deleted file mode 100644 index dfe63f89c7..0000000000 --- a/webrtc/api/androidtests/res/values/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - AndroidPeerConnectionTests - - diff --git a/webrtc/api/androidtests/src/org/webrtc/WebRtcJniBootTest.java b/webrtc/api/androidtests/src/org/webrtc/WebRtcJniBootTest.java new file mode 100644 index 0000000000..2f04f15ddf --- /dev/null +++ b/webrtc/api/androidtests/src/org/webrtc/WebRtcJniBootTest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +package org.appspot.apprtc.test; + +import android.test.InstrumentationTestCase; +import android.test.suitebuilder.annotation.SmallTest; + +import org.webrtc.PeerConnectionFactory; + +// This test is intended to run on ARM and catch LoadLibrary errors when we load the WebRTC +// JNI. It can't really be setting up calls since ARM emulators are too slow, but instantiating +// a peer connection isn't timing-sensitive, so we can at least do that. +public class WebRtcJniBootTest extends InstrumentationTestCase { + @SmallTest + public void testJniLoadsWithoutError() throws InterruptedException { + PeerConnectionFactory.initializeAndroidGlobals(getInstrumentation().getTargetContext(), + true /* initializeAudio */, true /* initializeVideo */, + false /* videoCodecHwAcceleration */); + + PeerConnectionFactory.Options options = new PeerConnectionFactory.Options(); + new PeerConnectionFactory(options); + } +}