OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 package org.appspot.apprtc.test; | 11 package org.appspot.apprtc.test; |
12 | 12 |
13 import android.test.InstrumentationTestCase; | 13 import android.support.test.InstrumentationRegistry; |
14 import android.test.suitebuilder.annotation.SmallTest; | 14 import android.support.test.filters.SmallTest; |
15 | 15 import org.chromium.base.test.BaseJUnit4ClassRunner; |
| 16 import org.junit.Test; |
| 17 import org.junit.runner.RunWith; |
16 import org.webrtc.PeerConnectionFactory; | 18 import org.webrtc.PeerConnectionFactory; |
17 | 19 |
18 // This test is intended to run on ARM and catch LoadLibrary errors when we load
the WebRTC | 20 // 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, bu
t instantiating | 21 // JNI. It can't really be setting up calls since ARM emulators are too slow, bu
t instantiating |
20 // a peer connection isn't timing-sensitive, so we can at least do that. | 22 // a peer connection isn't timing-sensitive, so we can at least do that. |
21 public class WebRtcJniBootTest extends InstrumentationTestCase { | 23 @RunWith(BaseJUnit4ClassRunner.class) |
| 24 public class WebRtcJniBootTest { |
| 25 @Test |
22 @SmallTest | 26 @SmallTest |
23 public void testJniLoadsWithoutError() throws InterruptedException { | 27 public void testJniLoadsWithoutError() throws InterruptedException { |
24 PeerConnectionFactory.initializeAndroidGlobals(getInstrumentation().getTarge
tContext(), | 28 PeerConnectionFactory.initializeAndroidGlobals(InstrumentationRegistry.getTa
rgetContext(), |
25 true /* initializeAudio */, true /* initializeVideo */, | 29 true /* initializeAudio */, true /* initializeVideo */, |
26 false /* videoCodecHwAcceleration */); | 30 false /* videoCodecHwAcceleration */); |
27 | 31 |
28 PeerConnectionFactory.Options options = new PeerConnectionFactory.Options(); | 32 PeerConnectionFactory.Options options = new PeerConnectionFactory.Options(); |
29 new PeerConnectionFactory(options); | 33 new PeerConnectionFactory(options); |
30 } | 34 } |
31 } | 35 } |
OLD | NEW |