James Lemieux
f1dade40d2
Use binary resource support in robolectric
...
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
Fan Zhang
a6c7db1888
Update logging: switch a bunch of action() logging calls.
...
Use generic action(int, int, int, String, int) instead of
action(Context, int, string, Pair...) when possible.
Bug: 117860032
Test: robotests
Change-Id: I5213b52b2b10d80a3c488c37718df81b3b0a428f
2018-11-13 21:50:34 -08:00
Fan Zhang
23f8d59d02
Sort imports
...
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
James Lemieux
22a39c2b93
Use external/robolectric-shadows/run_robotests.mk
...
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
jeffreyhuang
cbfb099a40
Rename SDK_VERSION_O to SDK_VERSION
...
Test: make RunSettingsRoboTests -j40
Change-Id: I6715062d8addadda441e32809db1af55f15e3a90
2017-12-05 16:43:54 -08:00
Fan Zhang
dff6dd687e
Move away from deprecated FakeFeatureFactory.setupForTest()
...
Test: rerun
Change-Id: I896ba414315ddb1664c0499264f4992f0554ef98
2017-12-05 10:12:10 -08:00
jeffreyhuang
253cb2fbc3
Move applications test package to sdk 26
...
Test: make RunSettingsRoboTests -j40
Change-Id: I9815f48ed9c6ddcfdae10cf09fbdf742a7066dfa
2017-11-27 14:57:32 -08:00
Fan Zhang
883d8e7ed1
Return false if can't find package info
...
Change-Id: Iaf667e0977f60abcbf3eb76c46c46f591c00123e
Fixes: 66981347
Test: robotests
2017-10-02 15:38:07 -07:00
Doris Ling
296c46404c
Merge "Fix NPE crash in UsageAccessDetails"
...
am: cd959f28a0
Change-Id: I21f898f7ec8fd67d4f29d73491b4ac57cad7a252
2017-09-21 19:24:52 +00:00
tiansiming
39de7aedee
Fix NPE crash in UsageAccessDetails
...
mPackageInfo will be null in RefreshUI method in UsageAccessDetails.java
Bug:https://issuetracker.google.com/issues/65872768
Test:As explained in the link above
Change-Id: I8bd4b822cfe5d8a3347ca7f5886605cbdfb9b8b6
Signed-off-by: tiansiming <tiansiming@xiaomi.com >
2017-09-21 14:12:50 +08:00
Andrew Sapperstein
9f1e911759
Refactor test runner to use static list of resource paths
...
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.
Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
2017-06-09 09:21:26 -07:00
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
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