Test: parcel marshalling for user credentials page

Unit test to verify that the internal Credential that gets passed to
dialogs for removing said credential is actually a valid Parcelable
object, since it's hard to provoke a marshal/unmarshal in real-world
usage (but not impossible).

Bug: 22541933
Change-Id: I780ca2d7b01fc6081b9ea8b2810cfc97f0433a86
This commit is contained in:
Robin Lee
2016-01-25 12:24:27 +00:00
parent a6420cdb57
commit e26804208c
2 changed files with 54 additions and 2 deletions

View File

@@ -194,8 +194,8 @@ public class UserCredentialsSettings extends InstrumentedFragment implements OnI
}
}
private static class Credential implements Parcelable {
private static enum Type {
static class Credential implements Parcelable {
static enum Type {
CA_CERTIFICATE (Credentials.CA_CERTIFICATE),
USER_CERTIFICATE (Credentials.USER_CERTIFICATE),
USER_PRIVATE_KEY (Credentials.USER_PRIVATE_KEY),