/frameworks/base/tests/net/java/android/net/ |
D | NetworkStatsTest.java | 59 private static final String TEST_IFACE = "test0"; field in NetworkStatsTest 67 .insertEntry(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, in testFindIndex() 69 .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, in testFindIndex() 71 .insertEntry(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, in testFindIndex() 73 .insertEntry(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO, in testFindIndex() 75 .insertEntry(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_YES, in testFindIndex() 78 assertEquals(4, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_YES, in testFindIndex() 80 assertEquals(3, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_NO, in testFindIndex() 82 assertEquals(2, stats.findIndex(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, in testFindIndex() 84 assertEquals(1, stats.findIndex(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, in testFindIndex() [all …]
|
/frameworks/base/tests/net/common/java/android/net/netstats/ |
D | NetworkStatsApiTest.kt | 67 private const val TEST_IFACE = "test0" constant 76 .addEntry(Entry(TEST_IFACE, TEST_UID1, SET_DEFAULT, TAG_NONE, in setUp() 78 .addEntry(Entry(TEST_IFACE, TEST_UID1, SET_DEFAULT, TAG_NONE, in setUp() 80 .addEntry(Entry(TEST_IFACE, TEST_UID1, SET_DEFAULT, TAG_NONE, in setUp() 82 .addEntry(Entry(TEST_IFACE, TEST_UID1, SET_FOREGROUND, TAG_NONE, in setUp() 85 .addEntry(Entry(TEST_IFACE, TEST_UID1, SET_DEFAULT, TAG_NONE, in setUp() 87 .addEntry(Entry(TEST_IFACE, TEST_UID1, SET_DEFAULT, 0x80, in setUp() 89 .addEntry(Entry(TEST_IFACE, TEST_UID2, SET_DEFAULT, TAG_NONE, in setUp() 97 .addEntry(Entry(TEST_IFACE, TEST_UID1, SET_DEFAULT, 0x80, in setUp() 99 .addEntry(Entry(TEST_IFACE, TEST_UID1, SET_FOREGROUND, TAG_NONE, in setUp() [all …]
|
/frameworks/base/tests/net/java/com/android/server/net/ |
D | NetworkStatsFactoryTest.java | 108 VpnInfo[] vpnInfos = new VpnInfo[] {createVpnInfo(new String[] {TEST_IFACE})}; in testVpnRewriteTrafficThroughItself() 130 assertValues(tunStats, TEST_IFACE, UID_RED, 2000L, 200L, 1000L, 100L); in testVpnRewriteTrafficThroughItself() 131 assertValues(tunStats, TEST_IFACE, UID_BLUE, 1000L, 100L, 500L, 50L); in testVpnRewriteTrafficThroughItself() 132 assertValues(tunStats, TEST_IFACE, UID_VPN, 300L, 0L, 260L, 26L); in testVpnRewriteTrafficThroughItself() 137 VpnInfo[] vpnInfos = new VpnInfo[] {createVpnInfo(new String[] {CLAT_PREFIX + TEST_IFACE})}; in testVpnWithClat() 139 mFactory.noteStackedIface(CLAT_PREFIX + TEST_IFACE, TEST_IFACE); in testVpnWithClat() 163 assertValues(tunStats, CLAT_PREFIX + TEST_IFACE, UID_RED, 2000L, 200L, 1000, 100L); in testVpnWithClat() 164 assertValues(tunStats, CLAT_PREFIX + TEST_IFACE, UID_BLUE, 1000L, 100L, 500L, 50L); in testVpnWithClat() 165 assertValues(tunStats, CLAT_PREFIX + TEST_IFACE, UID_VPN, 6300L, 0L, 3150L, 0L); in testVpnWithClat() 170 VpnInfo[] vpnInfos = new VpnInfo[] {createVpnInfo(new String[] {TEST_IFACE})}; in testVpnWithOneUnderlyingIface() [all …]
|
D | NetworkStatsServiceTest.java | 279 .insertEntry(TEST_IFACE, 1024L, 1L, 2048L, 2L)); 292 .insertEntry(TEST_IFACE, 4096L, 4L, 8192L, 8L)); 322 .insertEntry(TEST_IFACE, 1024L, 8L, 2048L, 16L)); 324 .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, 512L, 4L, 256L, 2L, 0L) 325 .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xFAAD, 256L, 2L, 128L, 1L, 0L) 326 .insertEntry(TEST_IFACE, UID_RED, SET_FOREGROUND, TAG_NONE, 512L, 4L, 256L, 2L, 0L) 327 .insertEntry(TEST_IFACE, UID_RED, SET_FOREGROUND, 0xFAAD, 256L, 2L, 128L, 1L, 0L) 328 .insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 128L, 1L, 128L, 1L, 0L)); 391 .insertEntry(TEST_IFACE, 512L, 4L, 512L, 4L)); 431 .insertEntry(TEST_IFACE, 2048L, 16L, 512L, 4L)); [all …]
|
D | NetworkStatsObserversTest.java | 73 private static final String TEST_IFACE = "test0"; field in NetworkStatsObserversTest 239 mActiveIfaces.put(TEST_IFACE, identSet); in testUpdateStats_initialSample_doesNotNotify() 243 .insertEntry(TEST_IFACE, BASE_BYTES, 8L, BASE_BYTES, 16L); in testUpdateStats_initialSample_doesNotNotify() 263 mActiveIfaces.put(TEST_IFACE, identSet); in testUpdateStats_belowThreshold_doesNotNotify() 267 .insertEntry(TEST_IFACE, BASE_BYTES, 8L, BASE_BYTES, 16L); in testUpdateStats_belowThreshold_doesNotNotify() 274 .insertEntry(TEST_IFACE, BASE_BYTES + 1024L, 10L, BASE_BYTES + 2048L, 20L); in testUpdateStats_belowThreshold_doesNotNotify() 293 mActiveIfaces.put(TEST_IFACE, identSet); in testUpdateStats_deviceAccess_notifies() 297 .insertEntry(TEST_IFACE, BASE_BYTES, 8L, BASE_BYTES, 16L); in testUpdateStats_deviceAccess_notifies() 304 .insertEntry(TEST_IFACE, BASE_BYTES + THRESHOLD_BYTES, 12L, in testUpdateStats_deviceAccess_notifies() 324 mActiveUidIfaces.put(TEST_IFACE, identSet); in testUpdateStats_defaultAccess_notifiesSameUid() [all …]
|
D | NetworkStatsBaseTest.java | 41 static final String TEST_IFACE = "test0"; field in NetworkStatsBaseTest
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/p2p/ |
D | WifiP2pNativeTest.java | 68 private static final String TEST_IFACE = "p2p-p2p0-1"; field in WifiP2pNativeTest 201 assertTrue(mWifiP2pNative.startWpsPbc(TEST_IFACE, TEST_BSSID)); in testStartWpsPbc() 202 verify(mSupplicantP2pIfaceHalMock).startWpsPbc(eq(TEST_IFACE), eq(TEST_BSSID)); in testStartWpsPbc() 212 assertTrue(mWifiP2pNative.startWpsPinKeypad(TEST_IFACE, TEST_PIN)); in testStartWpsPinKeypad() 213 verify(mSupplicantP2pIfaceHalMock).startWpsPinKeypad(eq(TEST_IFACE), eq(TEST_PIN)); in testStartWpsPinKeypad() 223 assertEquals(TEST_PIN, mWifiP2pNative.startWpsPinDisplay(TEST_IFACE, TEST_BSSID)); in testStartWpsPinDisplay() 224 verify(mSupplicantP2pIfaceHalMock).startWpsPinDisplay(eq(TEST_IFACE), eq(TEST_BSSID)); in testStartWpsPinDisplay() 273 assertTrue(mWifiP2pNative.setP2pGroupIdle(TEST_IFACE, TEST_IDLE_TIME)); in testSetP2pGroupIdle() 274 verify(mSupplicantP2pIfaceHalMock).setGroupIdle(eq(TEST_IFACE), eq(TEST_IDLE_TIME)); in testSetP2pGroupIdle() 283 assertTrue(mWifiP2pNative.setP2pPowerSave(TEST_IFACE, true)); in testSetP2pPowerSave() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | SystemInfoTest.java | 49 private static final String TEST_IFACE = "wlan0"; field in SystemInfoTest 97 assertEquals(TEST_MAC, mSystemInfo.getMacAddress(TEST_IFACE)); in getWifiMacAddress()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/net/ |
D | NetworkPolicyManagerServiceTest.java | 208 private static final String TEST_IFACE = "test0"; field in NetworkPolicyManagerServiceTest 1087 .insertEntry(TEST_IFACE, 256L, 2L, 256L, 2L); 1094 mPolicyListener.waitAndVerify().onMeteredIfacesChanged(eq(new String[]{TEST_IFACE})); 1096 verify(mNetworkManager, atLeastOnce()).setInterfaceQuota(TEST_IFACE, 1149 verify(mNetworkManager, atLeastOnce()).setInterfaceQuota(TEST_IFACE, 1166 verify(mNetworkManager, atLeastOnce()).setInterfaceQuota(TEST_IFACE, 1185 verify(mNetworkManager, atLeastOnce()).setInterfaceQuota(TEST_IFACE, 1203 verify(mNetworkManager, atLeastOnce()).setInterfaceQuota(TEST_IFACE, 1); 1217 verify(mNetworkManager, atLeastOnce()).setInterfaceQuota(TEST_IFACE, 1341 .insertEntry(TEST_IFACE, 0L, 0L, 0L, 0L); [all …]
|