Commit Graph

439 Commits

Author SHA1 Message Date
Felipe Leme
999a4fef2d Merge "Added tests for idle apps and doze mode." into nyc-dev
am: f76c309ebe

* commit 'f76c309ebe0287aee4f729bbb997417ea938ef15':
  Added tests for idle apps and doze mode.

Change-Id: I9acd82ca0cb163ea12281418e23dfea0f5cb32ac
2016-05-17 23:06:34 +00:00
TreeHugger Robot
f76c309ebe Merge "Added tests for idle apps and doze mode." into nyc-dev 2016-05-17 22:40:45 +00:00
Aaron Holden
769683c76d Merge "Remove module-level WifiCheck preparers" into nyc-dev
am: 4e0eb2e458

* commit '4e0eb2e4586a7e719e2deabcca1bd759a524a9e7':
  Remove module-level WifiCheck preparers

Change-Id: Iae73d1aaf52636a9e492e69dbedb590699ce2746
2016-05-16 22:57:18 +00:00
Aaron Holden
4e0eb2e458 Merge "Remove module-level WifiCheck preparers" into nyc-dev 2016-05-16 22:45:29 +00:00
Felipe Leme
88debac60e Added tests for idle apps and doze mode.
BUG: 28473659
BUG: 28521946
Change-Id: I4bc9166bf2050136fa86e374aac59f80afd76f1c
2016-05-13 15:08:16 -07:00
Felipe Leme
3eb5851664 Merge "Covers more corner cases on restricted network modes:" into nyc-dev
am: b10c777ceb

* commit 'b10c777cebf2a86605f850c4181f45dc67d2a9a6':
  Covers more corner cases on restricted network modes:

Change-Id: I8fd7ddb841e40f9e5697be2e5f2b109fcc71bf33
2016-05-12 20:08:51 +00:00
Aaron Holden
3361c86147 Remove module-level WifiCheck preparers
As WifiCheck is now declared in the CTS config, remove declarations in
the module configs.

Also downgrade TargetSetupErrors on failure to logged errors

bug:28234985
Change-Id: I2e1a369bc26aeca922686c4c3d8c033bb7f9fbc7
2016-05-11 09:55:44 -07:00
Felipe Leme
ed64e61b5f Covers more corner cases on restricted network modes:
- Tests what happens on foreground applications when a restriction (like
  Data Saver or Battery Saver modes) is turned on (prior tests would
  turn the restriction on *before* switching the app to foreground).
- Tests multiple restrictions simultaneously enabled.

Also improved existing code:

- Fixed background state check.
- Reused some common checks in helper methods.
- Retries checks for process state.

BUG: 28473659

Change-Id: Ifcf9cc6d895ccde0ab5177f9f5d8c347ce53b811
2016-05-09 12:48:29 -07:00
Felipe Leme
10dd3d7a84 Merge "Asserts foreground apps always have network access." into nyc-dev
am: 68aeb4d914

* commit '68aeb4d9147942496beb2bf5fa78ae2428f15c82':
  Asserts foreground apps always have network access.

Change-Id: I32dd08add98d57c3feca224920d8028254102aab
2016-05-06 23:17:12 +00:00
Felipe Leme
6cd41f6d03 Asserts foreground apps always have network access.
BUG: 28473659
Change-Id: Iea6933a4630ff2e9c00a2d2e9e4a6f1a51de70f2
2016-05-06 14:28:03 -07:00
Felipe Leme
11cda18ea6 Merge "Assert whitelists are revoked on uninstall." into nyc-dev
am: cd8e99563b

* commit 'cd8e99563b4accd3162bff1f002468971f4dc771':
  Assert whitelists are revoked on uninstall.

Change-Id: Ic91c283812b15a0db5ca26dc771c25f5aa8603a6
2016-05-06 17:40:49 +00:00
Felipe Leme
aa2e8ea1d8 Assert whitelists are revoked on uninstall.
BUG: 28616418
Change-Id: I909fd4c6024afe5b42560090c6e2f11b43c220de
2016-05-06 09:18:54 -07:00
Felipe Leme
d1fb27d37f Merge "Temporarily disable NetworkInfo check." into nyc-dev
am: cdb30f18e4

* commit 'cdb30f18e44f14b32cfe76c572af22f82a816a00':
  Temporarily disable NetworkInfo check.

Change-Id: I2092f714c8db0b024e1ee9d5ba35e7a9a4023747
2016-05-04 20:06:53 +00:00
Felipe Leme
691e85def7 Temporarily disable NetworkInfo check.
There are known issues that cause these check to fail, and the fix has
not been submitted yet.

BUG: 28473659
BUG: 28521946
Change-Id: I26dfbebc2d07396ef89ac78230645e4791c708ee
2016-05-04 18:48:24 +00:00
Felipe Leme
00cf921893 Merge "Improved connectivity check by also asserting NetworkInfo states." into nyc-dev
am: fe6dc2b966

* commit 'fe6dc2b966686da65dae3e0766e56bf25844500c':
  Improved connectivity check by also asserting NetworkInfo states.

Change-Id: Icba9139f192182fe6adaf03ef813dc20bd66f681
2016-05-04 00:59:59 +00:00
Felipe Leme
50bce69fab Improved connectivity check by also asserting NetworkInfo states.
BUG: 28473659
BUG: 26571724
Change-Id: Iba687003431ed5c353412268726967a798f538da
2016-05-03 08:29:52 -07:00
Felipe Leme
9d9ca56079 Merge "Added test for required packages whitelisted for Data Saver Mode." into nyc-dev
am: 16ae24badd

* commit '16ae24badd79bf100b26dc4e6dfb3ed649a0c3ad':
  Added test for required packages whitelisted for Data Saver Mode.

Change-Id: I1916d82a0fcc883679e200f79594381d29afd6b2
2016-04-29 23:49:49 +00:00
Felipe Leme
fa8e24c3e6 Added test for required packages whitelisted for Data Saver Mode.
Also fixed code that checks for whitelist uids, otherwise it would pass
when the required uid is missing but a superset was present (for
example, when asking for 1009 but 10090 was whitelisted).

BUG: 28431507
Change-Id: Iaaa67e586907dba215496460445ad627ba7b63c5
2016-04-29 14:10:12 -07:00
Lorenzo Colitti
733eb43443 Merge "Add more test coverage to ConnectivityManagerTest." into nyc-dev
am: 25a61dc

* commit '25a61dcae9ab4f0d8828fc8f05965333eccf99e9':
  Add more test coverage to ConnectivityManagerTest.

Change-Id: Id486a044ba5723cb762565c396c75b29bd09cbbe
2016-04-27 10:29:54 +00:00
TreeHugger Robot
25a61dcae9 Merge "Add more test coverage to ConnectivityManagerTest." into nyc-dev 2016-04-27 10:21:48 +00:00
Owain Davies
774ed8f276 Merge "Merge "Add assertion message if testDns ipv6 lookup reutrns ipv4." into lollipop-mr1-cts-dev am: b996de8" into marshmallow-cts-dev am: 48216c2 am: 275a0e6 am: 4be27c8 am: 0399523 am: fd3f832
am: c403c81

* commit 'c403c812184518d391cfc8a986fd304d640e2fb3':
  Add assertion message if testDns ipv6 lookup reutrns ipv4.

Change-Id: Idaf9c0536bd63cbaf5e109508e50c6a5d1808ac0
2016-04-25 23:50:59 +00:00
Owain Davies
6ed611d782 Merge "Merge "Added assertion message to testDns failures" into lollipop-mr1-cts-dev am: 350b2aa" into marshmallow-cts-dev am: 936375b am: 2bfd0e1 am: 2a0f366 am: 39cb9a5 am: 7cde9a8
am: 6d3841c

* commit '6d3841c6a577d23fc4be40b7b6cdd57074ebb589':
  Added assertion message to testDns failures

Change-Id: Iefa78714f2819ba10668b2698903912472aed98a
2016-04-25 23:50:58 +00:00
Owain Davies
c403c81218 Merge "Merge "Add assertion message if testDns ipv6 lookup reutrns ipv4." into lollipop-mr1-cts-dev am: b996de8" into marshmallow-cts-dev am: 48216c2 am: 275a0e6 am: 4be27c8 am: 0399523
am: fd3f832

* commit 'fd3f832fcfb9dc4fa3e4d497a97ebdf1636269b2':
  Add assertion message if testDns ipv6 lookup reutrns ipv4.

Change-Id: I774f8188a4329508bd590564859f38b3ec049f7c
2016-04-25 23:48:09 +00:00
Owain Davies
6d3841c6a5 Merge "Merge "Added assertion message to testDns failures" into lollipop-mr1-cts-dev am: 350b2aa" into marshmallow-cts-dev am: 936375b am: 2bfd0e1 am: 2a0f366 am: 39cb9a5
am: 7cde9a8

* commit '7cde9a81f8ee813b47dd424cea85692fd6f794fb':
  Added assertion message to testDns failures

Change-Id: Icef1c18274c8ae3883b718d823f851d4c1562417
2016-04-25 23:48:07 +00:00
Owain Davies
03995235ba Merge "Merge "Add assertion message if testDns ipv6 lookup reutrns ipv4." into lollipop-mr1-cts-dev am: b996de8" into marshmallow-cts-dev am: 48216c2 am: 275a0e6
am: 4be27c8

* commit '4be27c8e8497987720d58494a330484648e72caa':
  Add assertion message if testDns ipv6 lookup reutrns ipv4.

Change-Id: I03a0a86365929a6bdc8eb2815229341eb7a6a311
2016-04-23 06:19:47 +00:00
Owain Davies
39cb9a5a5c Merge "Merge "Added assertion message to testDns failures" into lollipop-mr1-cts-dev am: 350b2aa" into marshmallow-cts-dev am: 936375b am: 2bfd0e1
am: 2a0f366

* commit '2a0f3660e12cdbaa8f573811d82f07ebd9a8ed51':
  Added assertion message to testDns failures

Change-Id: I36b06607bea7de4f032daa1ddc84d988d6d44399
2016-04-23 06:19:46 +00:00
Owain Davies
4455109378 Merge "Add assertion message if testDns ipv6 lookup reutrns ipv4." into lollipop-mr1-cts-dev
am: b996de8

* commit 'b996de81cde4d1596dc15346591ed0ccb41608ca':
  Add assertion message if testDns ipv6 lookup reutrns ipv4.

Change-Id: I4b791741f7c69f23097ccd9d56d33984a0862b5a
2016-04-23 06:07:33 +00:00
Owain Davies
7db24c68cf Merge "Added assertion message to testDns failures" into lollipop-mr1-cts-dev
am: 350b2aa

* commit '350b2aae5bc303d094a540c12bcb650a8bf5e139':
  Added assertion message to testDns failures

Change-Id: I347197b0db859e3875b14701424d2d55d9059d32
2016-04-23 06:07:31 +00:00
Daniel Xie
b996de81cd Merge "Add assertion message if testDns ipv6 lookup reutrns ipv4." into lollipop-mr1-cts-dev 2016-04-23 06:02:23 +00:00
Chad Brubaker
595345b556 Merge "Rewrite X509TrustManagerExtensionsTest" into nyc-dev
am: 1f8d6e8659

* commit '1f8d6e865939d4ca00157216f70edd02eadc1cac':
  Rewrite X509TrustManagerExtensionsTest

Change-Id: I0bfdcff66da33ba7219da69f8607addb34fdd236
2016-04-22 15:49:25 +00:00
Lorenzo Colitti
8a14c224e3 Add more test coverage to ConnectivityManagerTest.
1. Test NetworkCallbacks as well as CONNECTIVITY_ACTION, since
   we are moving away from CONNECTIVITY_ACTION.
2. Use the Network objects we get back to test
   Network#getSocketFactory().
3. Check that TCP connections are closed with ECONNABORTED when
   a network disconnects.

Bug: 28251576
Change-Id: I41a438b82ef9251e52866332f3445f1bf876e04f
2016-04-22 22:25:51 +09:00
Chad Brubaker
bac071b74f Rewrite X509TrustManagerExtensionsTest
X509TrustManagerExtensionsTest used internal implementation details to
test X509TrustManagerExtensions#isUserAddedCertificate, these
implementation details are no longer the same and so this test failed to
catch the API being broken and then incorrectly flagged the fixed API as
broken.

To ensure that isUserAddedCertificate is properly covered the tests for
the API are split into two places: X509TrustManagerExtensionsTest covers
tests for the default case where there are no added CAs and
CaCertManagementTest to test the behavior when CAs have been added.

Bug:28262103
Change-Id: I14f3211c277fdc9c8bfc3d4ac932be375961fa28
2016-04-20 15:12:38 -07:00
Felipe Leme
eacd0c1670 Merge "Changed order of metered network check." into nyc-dev
am: 901854e

* commit '901854eb92bcc8b12d9aaf350210e72eb7585416':
  Changed order of metered network check.

Change-Id: Iad87c8f35e2a1aac56b9581e2c3f035dd02141e0
2016-04-14 20:08:15 +00:00
Felipe Leme
0e47422a47 Changed order of metered network check.
BUG: 27808364
Change-Id: I8a1088673cdd2c310a787a0b0708ad58876e9ac0
2016-04-14 12:49:31 -07:00
Felipe Leme
c3b35400fb Merge "Improvements on test case setup." into nyc-dev
am: 7b3ee10

* commit '7b3ee108ce80c23f99fc5120a762ac93ad8e708a':
  Improvements on test case setup.

Change-Id: I945cd721b3983d0be4b66af74f1c0cfd284ddfe9
2016-04-14 19:05:37 +00:00
Felipe Leme
f744474a28 Improvements on test case setup.
- On hostside, checks if wi-fi is on instead of checking for connectivity (which can be very slow).
- Don't automatically reset metered network on superclass' tearDown().
- Make sure tearDown() cleans up all state changes.

BUG: 27808364
Change-Id: I4818047c5fb8f6f430b0aab5ecfa77717f860db3
2016-04-14 11:47:34 -07:00
Owain Davies
c408601c24 Add assertion message if testDns ipv6 lookup reutrns ipv4.
Some partner test networks connect by VPN and if the connection
fails during the testing this test will fail as the local internet
provider intercepts the DNS request and returns an ipv4 address.

Added a message to check the network configuration and rerun the test.

Bug: 26560000
Change-Id: I54e4976b2cef549bfe9fd55ff9609ba2e6513239
2016-04-14 16:12:38 +01:00
Owain Davies
8884aac68d Added assertion message to testDns failures
Identify tests that fail testDns because of no network connection.

Bug:26560000
Change-Id: I7683d54d2932ec46c5850bf360c602f6548b179e
2016-04-14 15:54:44 +01:00
Dianne Hackborn
f50e4b1f5b Merge "Test for issue #28156248: Receiving connectivity receiver..." into nyc-dev
am: 9a36b2a

* commit '9a36b2aab7fba6948527b59596b148fe6f0221a0':
  Test for issue #28156248: Receiving connectivity receiver...

Change-Id: I4d0b54ee9e2f74f5a2ded4edb376e1ea157acc5e
2016-04-14 04:20:48 +00:00
Dianne Hackborn
d5dc8fe740 Test for issue #28156248: Receiving connectivity receiver...
...broadcasts in Android N

New test to verify that modern apps can't receive CONNECTIVITY_CHANGE.

Change-Id: I9c5b6e99d14b782b3857460d8297f6a405545d87
2016-04-13 18:05:50 -07:00
Erik Kline
77bd264c3b Merge "Extend CTS test coverage to include registerDefaultNetworkRequest()" into nyc-dev
am: c2f9d8f

* commit 'c2f9d8f3db67f3802ed9a2cd0e91575674b12d58':
  Extend CTS test coverage to include registerDefaultNetworkRequest()

Change-Id: Id9756021ea4e873b39371870ee4a9130890a58e4
2016-04-06 09:22:36 +00:00
Erik Kline
8d422e8c57 Extend CTS test coverage to include registerDefaultNetworkRequest()
Change-Id: I36491c2697ed1510da38c06324d2e4ddf653bc4e
2016-04-06 12:31:32 +09:00
Felipe Leme
faf0a62b69 Merge "Refactored tests to use \'list wifi-networks\'." into nyc-dev
am: 204f3e8

* commit '204f3e835668d606ae175bc55e3af3223e106364':
  Refactored tests to use 'list wifi-networks'.

Change-Id: Idd3ce63df04d1ca33aefd993a9487dbef0b47883
2016-04-01 23:56:15 +00:00
Felipe Leme
52be3a68ad Refactored tests to use 'list wifi-networks'.
BUG: 27808364
Change-Id: Ife3f35e9c3c6a4285b671eeb7d7d0223be908a1b
2016-04-01 15:40:41 -07:00
Felipe Leme
b7eab9574f Merge "Moved wi-fi switch to hostside." into nyc-dev
am: af09243

* commit 'af092432df0c7ff1ebef69ec423c91b80e568e16':
  Moved wi-fi switch to hostside.

Change-Id: I8c7ac6524da761a0977d17e5ee3abe84f8e2cb90
2016-04-01 17:51:32 +00:00
Felipe Leme
af092432df Merge "Moved wi-fi switch to hostside." into nyc-dev 2016-04-01 17:40:15 +00:00
Philip P. Moltmann
85113d6739 Merge "Test that we can set and read txt records." into nyc-dev
am: 058f525

* commit '058f525d3502651dd54041d16bf60948c142119f':
  Test that we can set and read txt records.

Change-Id: Ie0d5c7fe58366a7414346fc5d801ce658fefe10e
2016-03-31 04:00:18 +00:00
Philip P. Moltmann
058f525d35 Merge "Test that we can set and read txt records." into nyc-dev 2016-03-31 03:52:48 +00:00
Felipe Leme
eac0fe6ab1 Moved wi-fi switch to hostside.
BUG: 27808364
Change-Id: I89bca5f5ba90a7dc145d2ac170fd505161fd073d
2016-03-30 18:17:43 -07:00
Felipe Leme
4b9c2ac614 Fixed build broken by bad merge.
am: bbb00ff

* commit 'bbb00ffc0fe58ca94feaa0e940aaba5949572e00':
  Fixed build broken by bad merge.

Change-Id: Ie6a53b63bb5c4e7b4222f542772f823d6f0e9e07
2016-03-31 00:31:32 +00:00