Commit Graph

10 Commits

Author SHA1 Message Date
Maurice Lam
046400c2c4 Migrate settings robolectric tests to mockito 2
- Migrated ArgumentMatcher subclasses to lambdas
- Replaced any() with nullable() where tests were failing

Test: cd tests/robotests && mma
Bug: 38456058
Change-Id: Ice8c39b435c45b87f82dbbd9860e68f235314cf8
2017-05-24 15:14:31 -07:00
Ajay Nadathur
4b4c812a02 Add code coverage support for robolectric tests
- To run robolectric tests with code coverage, run:
    make RunSettingsRoboTests-jacoco -j44
- Generated reports are placed under
   $OUT/obj/FAKE/RunSettingsRoboTests_intermediates/coverage

bug:32617403
Test: Ran manually, verified that reports are generated.

Change-Id: Ie51ab86c5fbaa9297d717167fda04a555dadbfe8
2017-02-21 17:45:41 -08:00
Fyodor Kupolov
2328946b58 Tron metrics for special permissions
Added tron metrics for the following special permissions:
Battery optimisation
 - APP_SPECIAL_PERMISSION_BATTERY_ALLOW
 - APP_SPECIAL_PERMISSION_BATTERY_DENY
Device administrators
 - APP_SPECIAL_PERMISSION_ADMIN_ALLOW (when checked)
 - APP_SPECIAL_PERMISSION_ADMIN_DENY (when unchecked)
Do not disturb access
 - APP_SPECIAL_PERMISSION_DND_ALLOW
 - APP_SPECIAL_PERMISSION_DND_DENY
Daw over other apps
 - APP_SPECIAL_PERMISSION_APPDRAW_ALLOW
 - APP_SPECIAL_PERMISSION_APPDRAW_DENY
VR helper services
 - APP_SPECIAL_PERMISSION_VRHELPER_ALLOW
 - APP_SPECIAL_PERMISSION_VRHELPER_DENY
Modify system settings
 - APP_SPECIAL_PERMISSION_SETTINGS_CHANGE_ALLOW
 - APP_SPECIAL_PERMISSION_SETTINGS_CHANGE_DENY
Notification access
 - APP_SPECIAL_PERMISSION_NOTIVIEW_ALLOW
 - APP_SPECIAL_PERMISSION_NOTIVIEW_DENY
Premium SMS access
 - APP_SPECIAL_PERMISSION_PREMIUM_SMS_ALWAYS_ALLOW
 - APP_SPECIAL_PERMISSION_PREMIUM_SMS_ASK
 - APP_SPECIAL_PERMISSION_PREMIUM_SMS_DENY
Unrestricted data access
 - APP_SPECIAL_PERMISSION_UNL_DATA_ALLOW
 - APP_SPECIAL_PERMISSION_UNL_DATA_DENY
Usage access
 - APP_SPECIAL_PERMISSION_USAGE_VIEW_ALLOW
 - APP_SPECIAL_PERMISSION_USAGE_VIEW_DENY

Test: Manual + make RunSettingsRoboTests
Bug: 31008660
Change-Id: Id977e2c9f5aa811a2b0af036372b72c684621435
2017-01-18 10:54:19 -08:00
Paul Duffin
38c844eb11 Use junit instead of junit4-target
Bug: 30188076
Test: make checkbuild
Change-Id: Ic2bc905dd47d771630bb5a7047b0e290fb3dd04f
2016-12-19 14:01:32 +00:00
Fan Zhang
f3b06ef8a0 Fix compile error when robotests references R.* in Settings
Test: make SettingsRoboTests
Change-Id: I85c8bb1b83fa9d1f487658b1bc5dc080f70efa2f
2016-09-22 10:54:15 -07:00
Matthew Fritze
9a3dc4e2a8 Update Robolectric tests to use google truth
Bug: 31545801
Test: make RunSettingsRoboTests
Change-Id: Idb801d51b6a4dc02ea062bc32086e1a8fc28b94b
2016-09-19 11:42:11 -07:00
Matthew Fritze
7a78107332 Revert "Linked google truth to Robolectric tests and added an example."
This reverts commit 21f15a3280.

Change-Id: I07b978438b09c1a905eb58d2198913d21d552d6d
2016-09-14 00:33:31 +00:00
Matthew Fritze
21f15a3280 Linked google truth to Robolectric tests and added an example.
Bug: 31252617
Change-Id: I95aefd4809b8d292fe4cbeac903b8445e6e2a5ea
Test: Target: RunSettingsRoboTests
2016-09-13 16:54:57 +00:00
Daniel Nishi
b0528318e4 Remove unnecessary build flag from Robotests make.
Change-Id: Icd2a06ad7f5dbcf1913d16a5513765c6b2fdbf9f
2016-08-22 12:25:08 -07:00
Matthew Fritze
626a21b0bf Add Robolectric makefile and modify Settings Manifest for testing.
Bug: 30918570
Change-Id: I4ae998676757b4985833fac5ba05d7685e29a8a8
2016-08-17 23:28:38 +00:00