Files
android_packages_modules_Co…/tests
Felipe Leme 310885be93 Added tests for restricted background APIs.
Although the main purpose of these change is to test the new public
API (ConnectivityManager.getRestrictBackgroundStatus()), it also
indirectly tests the new private API on
INetworkPolicyManager (addRestrictBackgroundWhitelistedUid(),
removeRestrictBackgroundWhitelistedUid(), and
getRestrictBackgroundWhitelistedUids()), since they're used on each test
to setup the device state.

This change also modified how the device-side tests are run: the
runDeviceTests() had a className parameter that was not used, and this
CL not only uses it but also introduces a methodName as well. The
reasoning for this change is that the host-side tests must interact with
the device-side tests many times during each test; in fact, the "real"
test is done at the host side, while the device-side test is just used
to assert the expected result of getRestrictBackgroundStatus()).

BUG: 26451391

Change-Id: I7114e350f3b247d2f05b0c280a09cad383c61f9a
2016-01-27 09:32:44 -08:00
..