DO NOT MERGE frameworks-test: adding missing @SmallTest
This activates all frameworks-test tests in runs of the continuous
platform tests.
Test: $ runtest frameworks-net passes (expect Tether
Bug: 32561414
(cherry picked from commit 3664598601)
Change-Id: I84f9aecfbf9ebe07c6fcfec26acb2c2cfaae2d60
This commit is contained in:
@@ -70,7 +70,6 @@ import android.provider.Settings;
|
|||||||
import android.test.AndroidTestCase;
|
import android.test.AndroidTestCase;
|
||||||
import android.test.FlakyTest;
|
import android.test.FlakyTest;
|
||||||
import android.test.mock.MockContentResolver;
|
import android.test.mock.MockContentResolver;
|
||||||
import android.test.suitebuilder.annotation.LargeTest;
|
|
||||||
import android.test.suitebuilder.annotation.SmallTest;
|
import android.test.suitebuilder.annotation.SmallTest;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.LogPrinter;
|
import android.util.LogPrinter;
|
||||||
@@ -196,6 +195,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Tests that IdleableHandlerThread works as expected.
|
// Tests that IdleableHandlerThread works as expected.
|
||||||
|
@SmallTest
|
||||||
public void testIdleableHandlerThread() {
|
public void testIdleableHandlerThread() {
|
||||||
final int attempts = 50; // Causes the test to take about 200ms on bullhead-eng.
|
final int attempts = 50; // Causes the test to take about 200ms on bullhead-eng.
|
||||||
|
|
||||||
@@ -220,6 +220,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
@FlakyTest(tolerance = 3)
|
@FlakyTest(tolerance = 3)
|
||||||
public void testNotWaitingForIdleCausesRaceConditions() {
|
public void testNotWaitingForIdleCausesRaceConditions() {
|
||||||
// Bring up a network that we can use to send messages to ConnectivityService.
|
// Bring up a network that we can use to send messages to ConnectivityService.
|
||||||
@@ -840,7 +841,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
return cv;
|
return cv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testLingering() throws Exception {
|
public void testLingering() throws Exception {
|
||||||
verifyNoNetwork();
|
verifyNoNetwork();
|
||||||
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
||||||
@@ -880,7 +881,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
verifyNoNetwork();
|
verifyNoNetwork();
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testValidatedCellularOutscoresUnvalidatedWiFi() throws Exception {
|
public void testValidatedCellularOutscoresUnvalidatedWiFi() throws Exception {
|
||||||
// Test bringing up unvalidated WiFi
|
// Test bringing up unvalidated WiFi
|
||||||
mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
|
mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
|
||||||
@@ -915,7 +916,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
verifyNoNetwork();
|
verifyNoNetwork();
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testUnvalidatedWifiOutscoresUnvalidatedCellular() throws Exception {
|
public void testUnvalidatedWifiOutscoresUnvalidatedCellular() throws Exception {
|
||||||
// Test bringing up unvalidated cellular.
|
// Test bringing up unvalidated cellular.
|
||||||
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
||||||
@@ -941,7 +942,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
verifyNoNetwork();
|
verifyNoNetwork();
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testUnlingeringDoesNotValidate() throws Exception {
|
public void testUnlingeringDoesNotValidate() throws Exception {
|
||||||
// Test bringing up unvalidated WiFi.
|
// Test bringing up unvalidated WiFi.
|
||||||
mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
|
mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
|
||||||
@@ -969,7 +970,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
NET_CAPABILITY_VALIDATED));
|
NET_CAPABILITY_VALIDATED));
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testCellularOutscoresWeakWifi() throws Exception {
|
public void testCellularOutscoresWeakWifi() throws Exception {
|
||||||
// Test bringing up validated cellular.
|
// Test bringing up validated cellular.
|
||||||
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
||||||
@@ -995,7 +996,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
verifyActiveNetwork(TRANSPORT_WIFI);
|
verifyActiveNetwork(TRANSPORT_WIFI);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testReapingNetwork() throws Exception {
|
public void testReapingNetwork() throws Exception {
|
||||||
// Test bringing up WiFi without NET_CAPABILITY_INTERNET.
|
// Test bringing up WiFi without NET_CAPABILITY_INTERNET.
|
||||||
// Expect it to be torn down immediately because it satisfies no requests.
|
// Expect it to be torn down immediately because it satisfies no requests.
|
||||||
@@ -1028,7 +1029,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
waitFor(cv);
|
waitFor(cv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testCellularFallback() throws Exception {
|
public void testCellularFallback() throws Exception {
|
||||||
// Test bringing up validated cellular.
|
// Test bringing up validated cellular.
|
||||||
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
||||||
@@ -1066,7 +1067,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
verifyActiveNetwork(TRANSPORT_WIFI);
|
verifyActiveNetwork(TRANSPORT_WIFI);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testWiFiFallback() throws Exception {
|
public void testWiFiFallback() throws Exception {
|
||||||
// Test bringing up unvalidated WiFi.
|
// Test bringing up unvalidated WiFi.
|
||||||
mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
|
mWiFiNetworkAgent = new MockNetworkAgent(TRANSPORT_WIFI);
|
||||||
@@ -1208,7 +1209,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testStateChangeNetworkCallbacks() throws Exception {
|
public void testStateChangeNetworkCallbacks() throws Exception {
|
||||||
final TestNetworkCallback genericNetworkCallback = new TestNetworkCallback();
|
final TestNetworkCallback genericNetworkCallback = new TestNetworkCallback();
|
||||||
final TestNetworkCallback wifiNetworkCallback = new TestNetworkCallback();
|
final TestNetworkCallback wifiNetworkCallback = new TestNetworkCallback();
|
||||||
@@ -1591,7 +1592,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
handlerThread.quit();
|
handlerThread.quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testNetworkFactoryRequests() throws Exception {
|
public void testNetworkFactoryRequests() throws Exception {
|
||||||
tryNetworkFactoryRequests(NET_CAPABILITY_MMS);
|
tryNetworkFactoryRequests(NET_CAPABILITY_MMS);
|
||||||
tryNetworkFactoryRequests(NET_CAPABILITY_SUPL);
|
tryNetworkFactoryRequests(NET_CAPABILITY_SUPL);
|
||||||
@@ -1611,7 +1612,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
// Skipping VALIDATED and CAPTIVE_PORTAL as they're disallowed.
|
// Skipping VALIDATED and CAPTIVE_PORTAL as they're disallowed.
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testNoMutableNetworkRequests() throws Exception {
|
public void testNoMutableNetworkRequests() throws Exception {
|
||||||
PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0, new Intent("a"), 0);
|
PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0, new Intent("a"), 0);
|
||||||
NetworkRequest.Builder builder = new NetworkRequest.Builder();
|
NetworkRequest.Builder builder = new NetworkRequest.Builder();
|
||||||
@@ -1636,7 +1637,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
} catch (IllegalArgumentException expected) {}
|
} catch (IllegalArgumentException expected) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testMMSonWiFi() throws Exception {
|
public void testMMSonWiFi() throws Exception {
|
||||||
// Test bringing up cellular without MMS NetworkRequest gets reaped
|
// Test bringing up cellular without MMS NetworkRequest gets reaped
|
||||||
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
||||||
@@ -1671,7 +1672,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
verifyActiveNetwork(TRANSPORT_WIFI);
|
verifyActiveNetwork(TRANSPORT_WIFI);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testMMSonCell() throws Exception {
|
public void testMMSonCell() throws Exception {
|
||||||
// Test bringing up cellular without MMS
|
// Test bringing up cellular without MMS
|
||||||
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
mCellNetworkAgent = new MockNetworkAgent(TRANSPORT_CELLULAR);
|
||||||
@@ -1697,7 +1698,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
verifyActiveNetwork(TRANSPORT_CELLULAR);
|
verifyActiveNetwork(TRANSPORT_CELLULAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testCaptivePortal() {
|
public void testCaptivePortal() {
|
||||||
final TestNetworkCallback captivePortalCallback = new TestNetworkCallback();
|
final TestNetworkCallback captivePortalCallback = new TestNetworkCallback();
|
||||||
final NetworkRequest captivePortalRequest = new NetworkRequest.Builder()
|
final NetworkRequest captivePortalRequest = new NetworkRequest.Builder()
|
||||||
@@ -1746,7 +1747,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
validatedCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
|
validatedCallback.expectCallback(CallbackState.LOST, mWiFiNetworkAgent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testAvoidOrIgnoreCaptivePortals() {
|
public void testAvoidOrIgnoreCaptivePortals() {
|
||||||
final TestNetworkCallback captivePortalCallback = new TestNetworkCallback();
|
final TestNetworkCallback captivePortalCallback = new TestNetworkCallback();
|
||||||
final NetworkRequest captivePortalRequest = new NetworkRequest.Builder()
|
final NetworkRequest captivePortalRequest = new NetworkRequest.Builder()
|
||||||
@@ -1817,7 +1818,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
execptionCalled);
|
execptionCalled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testRegisterDefaultNetworkCallback() throws Exception {
|
public void testRegisterDefaultNetworkCallback() throws Exception {
|
||||||
final TestNetworkCallback defaultNetworkCallback = new TestNetworkCallback();
|
final TestNetworkCallback defaultNetworkCallback = new TestNetworkCallback();
|
||||||
mCm.registerDefaultNetworkCallback(defaultNetworkCallback);
|
mCm.registerDefaultNetworkCallback(defaultNetworkCallback);
|
||||||
@@ -1878,7 +1879,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@LargeTest
|
@SmallTest
|
||||||
public void testRequestCallbackUpdates() throws Exception {
|
public void testRequestCallbackUpdates() throws Exception {
|
||||||
// File a network request for mobile.
|
// File a network request for mobile.
|
||||||
final TestNetworkCallback cellNetworkCallback = new TestRequestUpdateCallback();
|
final TestNetworkCallback cellNetworkCallback = new TestRequestUpdateCallback();
|
||||||
@@ -2519,6 +2520,7 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||||||
return mWiFiNetworkAgent.getNetwork();
|
return mWiFiNetworkAgent.getNetwork();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testPacketKeepalives() throws Exception {
|
public void testPacketKeepalives() throws Exception {
|
||||||
InetAddress myIPv4 = InetAddress.getByName("192.0.2.129");
|
InetAddress myIPv4 = InetAddress.getByName("192.0.2.129");
|
||||||
InetAddress notMyIPv4 = InetAddress.getByName("192.0.2.35");
|
InetAddress notMyIPv4 = InetAddress.getByName("192.0.2.35");
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import android.net.Network;
|
|||||||
import android.net.NetworkCapabilities;
|
import android.net.NetworkCapabilities;
|
||||||
import android.net.NetworkInfo;
|
import android.net.NetworkInfo;
|
||||||
import android.net.NetworkMisc;
|
import android.net.NetworkMisc;
|
||||||
|
import android.test.suitebuilder.annotation.SmallTest;
|
||||||
import android.text.format.DateUtils;
|
import android.text.format.DateUtils;
|
||||||
import com.android.internal.R;
|
import com.android.internal.R;
|
||||||
import com.android.server.ConnectivityService;
|
import com.android.server.ConnectivityService;
|
||||||
@@ -70,6 +71,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
mMonitor = new TestableLingerMonitor(mCtx, mNotifier, HIGH_DAILY_LIMIT, HIGH_RATE_LIMIT);
|
mMonitor = new TestableLingerMonitor(mCtx, mNotifier, HIGH_DAILY_LIMIT, HIGH_RATE_LIMIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testTransitions() {
|
public void testTransitions() {
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
NetworkAgentInfo nai1 = wifiNai(100);
|
NetworkAgentInfo nai1 = wifiNai(100);
|
||||||
@@ -79,6 +81,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
assertFalse(mMonitor.isNotificationEnabled(nai2, nai1));
|
assertFalse(mMonitor.isNotificationEnabled(nai2, nai1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testNotificationOnLinger() {
|
public void testNotificationOnLinger() {
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_NOTIFICATION);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_NOTIFICATION);
|
||||||
@@ -89,6 +92,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyNotification(from, to);
|
verifyNotification(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testToastOnLinger() {
|
public void testToastOnLinger() {
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
||||||
@@ -99,6 +103,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyToast(from, to);
|
verifyToast(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testNotificationClearedAfterDisconnect() {
|
public void testNotificationClearedAfterDisconnect() {
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_NOTIFICATION);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_NOTIFICATION);
|
||||||
@@ -112,6 +117,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verify(mNotifier, times(1)).clearNotification(100);
|
verify(mNotifier, times(1)).clearNotification(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testNotificationClearedAfterSwitchingBack() {
|
public void testNotificationClearedAfterSwitchingBack() {
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_NOTIFICATION);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_NOTIFICATION);
|
||||||
@@ -125,6 +131,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verify(mNotifier, times(1)).clearNotification(100);
|
verify(mNotifier, times(1)).clearNotification(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testUniqueToast() {
|
public void testUniqueToast() {
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
||||||
@@ -142,6 +149,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyNoNotifications();
|
verifyNoNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testMultipleNotifications() {
|
public void testMultipleNotifications() {
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_NOTIFICATION);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_NOTIFICATION);
|
||||||
@@ -160,6 +168,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyNotification(wifi2, cell);
|
verifyNotification(wifi2, cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testRateLimiting() throws InterruptedException {
|
public void testRateLimiting() throws InterruptedException {
|
||||||
mMonitor = new TestableLingerMonitor(mCtx, mNotifier, HIGH_DAILY_LIMIT, LOW_RATE_LIMIT);
|
mMonitor = new TestableLingerMonitor(mCtx, mNotifier, HIGH_DAILY_LIMIT, LOW_RATE_LIMIT);
|
||||||
|
|
||||||
@@ -185,6 +194,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyNoNotifications();
|
verifyNoNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testDailyLimiting() throws InterruptedException {
|
public void testDailyLimiting() throws InterruptedException {
|
||||||
mMonitor = new TestableLingerMonitor(mCtx, mNotifier, LOW_DAILY_LIMIT, HIGH_RATE_LIMIT);
|
mMonitor = new TestableLingerMonitor(mCtx, mNotifier, LOW_DAILY_LIMIT, HIGH_RATE_LIMIT);
|
||||||
|
|
||||||
@@ -211,6 +221,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyNoNotifications();
|
verifyNoNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testUniqueNotification() {
|
public void testUniqueNotification() {
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_NOTIFICATION);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_NOTIFICATION);
|
||||||
@@ -227,6 +238,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyNotification(from, to);
|
verifyNotification(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testIgnoreNeverValidatedNetworks() {
|
public void testIgnoreNeverValidatedNetworks() {
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
@@ -238,6 +250,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyNoNotifications();
|
verifyNoNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testIgnoreCurrentlyValidatedNetworks() {
|
public void testIgnoreCurrentlyValidatedNetworks() {
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
@@ -249,6 +262,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyNoNotifications();
|
verifyNoNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testNoNotificationType() {
|
public void testNoNotificationType() {
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
||||||
setNotificationSwitch();
|
setNotificationSwitch();
|
||||||
@@ -259,6 +273,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyNoNotifications();
|
verifyNoNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testNoTransitionToNotify() {
|
public void testNoTransitionToNotify() {
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_NONE);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_NONE);
|
||||||
setNotificationSwitch(transition(WIFI, CELLULAR));
|
setNotificationSwitch(transition(WIFI, CELLULAR));
|
||||||
@@ -269,6 +284,7 @@ public class LingerMonitorTest extends TestCase {
|
|||||||
verifyNoNotifications();
|
verifyNoNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SmallTest
|
||||||
public void testDifferentTransitionToNotify() {
|
public void testDifferentTransitionToNotify() {
|
||||||
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
setNotificationType(LingerMonitor.NOTIFY_TYPE_TOAST);
|
||||||
setNotificationSwitch(transition(CELLULAR, WIFI));
|
setNotificationSwitch(transition(CELLULAR, WIFI));
|
||||||
|
|||||||
Reference in New Issue
Block a user