• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2016 The WebRTC Project Authors. All rights reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 package org.webrtc;
12 
13 import android.support.test.InstrumentationRegistry;
14 import androidx.test.filters.SmallTest;
15 import org.junit.Test;
16 import org.webrtc.PeerConnectionFactory;
17 
18 // This test is intended to run on ARM and catch LoadLibrary errors when we load the WebRTC
19 // JNI. It can't really be setting up calls since ARM emulators are too slow, but instantiating
20 // a peer connection isn't timing-sensitive, so we can at least do that.
21 public class WebRtcJniBootTest {
22   @Test
23   @SmallTest
testJniLoadsWithoutError()24   public void testJniLoadsWithoutError() throws InterruptedException {
25     PeerConnectionFactory.initialize(PeerConnectionFactory.InitializationOptions
26                                          .builder(InstrumentationRegistry.getTargetContext())
27                                          .setNativeLibraryName(TestConstants.NATIVE_LIBRARY)
28                                          .createInitializationOptions());
29     PeerConnectionFactory.builder().createPeerConnectionFactory();
30   }
31 }
32