Commit 151c7895 authored by Paul Jensen's avatar Paul Jensen Committed by Commit Bot

Fix NetworkChangeNotifierTest.testIsProcessBoundToNetwork for Android Lollipop

The test calls ConnectivityManager.getActiveNetwork() which is an Android M API.

Bug: 786423
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Id26b4eb49294a35129fc9cc300084ee293403ca5
Reviewed-on: https://chromium-review.googlesource.com/777299Reviewed-by: default avatarMaria Khomenko <mariakhomenko@chromium.org>
Commit-Queue: Maria Khomenko <mariakhomenko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517870}
parent 35753f61
......@@ -40,6 +40,7 @@ import org.chromium.base.library_loader.LibraryLoader;
import org.chromium.base.library_loader.LibraryProcessType;
import org.chromium.base.test.BaseJUnit4ClassRunner;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.MinAndroidSdkLevel;
import org.chromium.net.NetworkChangeNotifierAutoDetect.ConnectivityManagerDelegate;
import org.chromium.net.NetworkChangeNotifierAutoDetect.NetworkState;
import org.chromium.net.NetworkChangeNotifierAutoDetect.WifiManagerDelegate;
......@@ -820,10 +821,8 @@ public class NetworkChangeNotifierTest {
@Test
@MediumTest
@Feature({"Android-AppBase"})
@MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP)
public void testNetworkCallbacks() throws Exception {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
return;
}
// Setup NetworkChangeNotifierAutoDetect
final TestNetworkChangeNotifierAutoDetectObserver observer =
new TestNetworkChangeNotifierAutoDetectObserver();
......@@ -960,10 +959,8 @@ public class NetworkChangeNotifierTest {
@Test
@MediumTest
@Feature({"Android-AppBase"})
@MinAndroidSdkLevel(Build.VERSION_CODES.M)
public void testIsProcessBoundToNetwork() throws Exception {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
return;
}
ConnectivityManager connectivityManager =
(ConnectivityManager) InstrumentationRegistry.getTargetContext().getSystemService(
Context.CONNECTIVITY_SERVICE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment